linux/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2013 - 2018 Intel Corporation. */

#ifndef _I40E_LAN_HMC_H_
#define _I40E_LAN_HMC_H_

#include "i40e_hmc.h"

/* forward-declare the HW struct for the compiler */
struct i40e_hw;

/* HMC element context information */

/* Rx queue context data
 *
 * The sizes of the variables may be larger than needed due to crossing byte
 * boundaries. If we do not have the width of the variable set to the correct
 * size then we could end up shifting bits off the top of the variable when the
 * variable is at the top of a byte and crosses over into the next byte.
 */
struct i40e_hmc_obj_rxq {};

/* Tx queue context data
*
* The sizes of the variables may be larger than needed due to crossing byte
* boundaries. If we do not have the width of the variable set to the correct
* size then we could end up shifting bits off the top of the variable when the
* variable is at the top of a byte and crosses over into the next byte.
*/
struct i40e_hmc_obj_txq {};

/* for hsplit_0 field of Rx HMC context */
enum i40e_hmc_obj_rx_hsplit_0 {};

/* fcoe_cntx and fcoe_filt are for debugging purpose only */
struct i40e_hmc_obj_fcoe_cntx {};

struct i40e_hmc_obj_fcoe_filt {};

/* Context sizes for LAN objects */
enum i40e_hmc_lan_object_size {};

#define I40E_HMC_L2OBJ_BASE_ALIGNMENT
#define I40E_HMC_OBJ_SIZE_TXQ
#define I40E_HMC_OBJ_SIZE_RXQ
#define I40E_HMC_OBJ_SIZE_FCOE_CNTX
#define I40E_HMC_OBJ_SIZE_FCOE_FILT

enum i40e_hmc_lan_rsrc_type {};

enum i40e_hmc_model {};

struct i40e_hmc_lan_create_obj_info {};

struct i40e_hmc_lan_delete_obj_info {};

int i40e_init_lan_hmc(struct i40e_hw *hw, u32 txq_num,
		      u32 rxq_num, u32 fcoe_cntx_num,
		      u32 fcoe_filt_num);
int i40e_configure_lan_hmc(struct i40e_hw *hw,
			   enum i40e_hmc_model model);
int i40e_shutdown_lan_hmc(struct i40e_hw *hw);

int i40e_clear_lan_tx_queue_context(struct i40e_hw *hw,
				    u16 queue);
int i40e_set_lan_tx_queue_context(struct i40e_hw *hw,
				  u16 queue,
				  struct i40e_hmc_obj_txq *s);
int i40e_clear_lan_rx_queue_context(struct i40e_hw *hw,
				    u16 queue);
int i40e_set_lan_rx_queue_context(struct i40e_hw *hw,
				  u16 queue,
				  struct i40e_hmc_obj_rxq *s);

#endif /* _I40E_LAN_HMC_H_ */