do { \
uint32_t ori_val; \
struct rte_eth_dev *dev; \
+ struct rte_eth_dev_data *dev_data; \
ori_val = I40E_READ_REG((hw), (reg)); \
- dev = ((struct i40e_adapter *)hw->back)->eth_dev; \
+ dev_data = ((struct i40e_adapter *)hw->back)->pf.dev_data; \
+ dev = &rte_eth_devices[dev_data->port_id]; \
I40E_PCI_REG_WRITE(I40E_PCI_REG_ADDR((hw), \
(reg)), (value)); \
if (ori_val != value) \
uint8_t raw_id;
uint8_t is_vf; /* 1 for VF, 0 for port dev */
uint16_t dst_id; /* VF ID, available when is_vf is 1*/
+ uint64_t input_set;
bool inner_ip; /* If there is inner ip */
enum i40e_fdir_ip_type iip_type; /* ip type for inner ip */
enum i40e_fdir_ip_type oip_type; /* ip type for outer ip */
bool flex_pit_flag[I40E_MAX_FLXPLD_LAYER];
bool flex_mask_flag[I40E_FILTER_PCTYPE_MAX];
- bool inset_flag[I40E_FILTER_PCTYPE_MAX]; /* Mark if input set is set */
+ uint32_t flow_count[I40E_FILTER_PCTYPE_MAX];
uint32_t flex_flow_count[I40E_MAX_FLXPLD_LAYER];
};
struct i40e_adapter {
/* Common for both PF and VF */
struct i40e_hw hw;
- struct rte_eth_dev *eth_dev;
/* Specific for PF or VF */
union {
/* For RSS reta table update */
uint8_t rss_reta_updated;
+#ifdef RTE_ARCH_X86
+ bool rx_use_avx2;
+ bool rx_use_avx512;
+ bool tx_use_avx2;
+ bool tx_use_avx512;
+#endif
};
/**
uint8_t enable);
int i40e_validate_input_set(enum i40e_filter_pctype pctype,
enum rte_filter_type filter, uint64_t inset);
-int i40e_generate_inset_mask_reg(uint64_t inset, uint32_t *mask,
- uint8_t nb_elem);
+int i40e_generate_inset_mask_reg(struct i40e_hw *hw, uint64_t inset,
+ uint32_t *mask, uint8_t nb_elem);
uint64_t i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input);
void i40e_check_write_reg(struct i40e_hw *hw, uint32_t addr, uint32_t val);
void i40e_check_write_global_reg(struct i40e_hw *hw,
#define I40E_VSI_TO_DEV_DATA(vsi) \
(((struct i40e_vsi *)vsi)->adapter->pf.dev_data)
#define I40E_VSI_TO_ETH_DEV(vsi) \
- (((struct i40e_vsi *)vsi)->adapter->eth_dev)
+ (&rte_eth_devices[((struct i40e_vsi *)vsi)->adapter->pf.dev_data->port_id])
/* I40E_PF_TO */
#define I40E_PF_TO_HW(pf) \