net/i40e: decouple dependency from superseded structures
RFC 1/5 net/i40e: decouple dependency from superseded structures
From: Junyu Jiang <[email protected]>
The legacy filter API will be removed, the associated rte_eth_ctrl.h will also be removed. This patch replaces these superseded structures by the PMD internal structures. The macros RTE_ETH_FILTER_GENERIC and RTE_ETH_FILTER_GET are not replaced, they are needed to follow librte to change.
Signed-off-by Junyu Jiang <[email protected]>
--- drivers/net/i40e/i40e_ethdev.c | 312 ++++++++++++++-------------- drivers/net/i40e/i40e_ethdev.h | 357 +++++++++++++++++++++++++++++--- drivers/net/i40e/i40e_fdir.c | 8 +- drivers/net/i40e/i40e_flow.c | 111 +++++----- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/i40e/rte_pmd_i40e.c | 30 +-- 6 files changed, 559 insertions(+), 261 deletions(-)
drivers/net/i40e/i40e_ethdev.c +156 -156
@@ -383,7 +383,7 @@ static int i40e_set_default_mac_addr(struct rte_eth_dev *dev,static int i40e_dev_mtu_set (struct rte_eth_dev *dev,uint16_t mtu);static int i40e_ethertype_filter_convert ( -const struct rte_eth_ethertype_filter *input, +const struct i40e_eth_ethertype_filter *input,struct i40e_ethertype_filter *filter);static int i40e_sw_ethertype_filter_insert (struct i40e_pf *pf,struct i40e_ethertype_filter *filter);
@@ -2737,7 +2737,7 @@ i40e_dev_close(struct rte_eth_dev *dev)while ((p_flow =TAILQ_FIRST (&pf->flow_list))) {TAILQ_REMOVE (&pf->flow_list, p_flow, node);/* Do not free FDIR flows since they are static allocated */ -if (p_flow->filter_type !=RTE_ETH_FILTER_FDIR ) +if (p_flow->filter_type !=I40E_ETH_FILTER_FDIR )rte_free (p_flow); }
@@ -4331,9 +4331,9 @@ i40e_macaddr_add(struct rte_eth_dev *dev,rte_memcpy (&mac_filter.mac_addr, mac_addr,RTE_ETHER_ADDR_LEN );if (rxmode->offloads &DEV_RX_OFFLOAD_VLAN_FILTER ) - mac_filter.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + mac_filter.filter_type =I40E_MACVLAN_PERFECT_MATCH ;else - mac_filter.filter_type =RTE_MAC_PERFECT_MATCH ; + mac_filter.filter_type =I40E_MAC_PERFECT_MATCH ;if (pool ==0 ) vsi = pf->main_vsi;
@@ -5652,7 +5652,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi) mac = &f->mac_info.mac_addr;rte_memcpy (&mac->addr_bytes, hw->mac.perm_addr,ETH_ADDR_LEN ); - f->mac_info.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + f->mac_info.filter_type =I40E_MACVLAN_PERFECT_MATCH ;TAILQ_INSERT_TAIL (&vsi->mac_list, f, next); vsi->mac_num++;
@@ -5660,7 +5660,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi) }rte_memcpy (&filter.mac_addr, (struct rte_ether_addr *)(hw->mac.perm_addr),ETH_ADDR_LEN ); - filter.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + filter.filter_type =I40E_MACVLAN_PERFECT_MATCH ;return i40e_vsi_add_mac (vsi, &filter); }
@@ -6126,7 +6126,7 @@ i40e_vsi_setup(struct i40e_pf *pf,/* MAC/VLAN configuration */ rte_memcpy (&filter.mac_addr, &broadcast,RTE_ETHER_ADDR_LEN ); - filter.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + filter.filter_type =I40E_MACVLAN_PERFECT_MATCH ; ret =i40e_vsi_add_mac (vsi, &filter);if (ret !=I40E_SUCCESS ) {
@@ -6154,15 +6154,15 @@ i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on)struct i40e_mac_filter *f;void *temp;struct i40e_mac_filter_info *mac_filter; -enum rte_mac_filter_type desired_filter; +enum i40e_mac_filter_type desired_filter;int ret =I40E_SUCCESS ;if (on) {/* Filter to match MAC and VLAN */ - desired_filter =RTE_MACVLAN_PERFECT_MATCH ; + desired_filter =I40E_MACVLAN_PERFECT_MATCH ; }else {/* Filter to match only MAC */ - desired_filter =RTE_MAC_PERFECT_MATCH ; + desired_filter =I40E_MAC_PERFECT_MATCH ; } num = vsi->mac_num;
@@ -7105,18 +7105,18 @@ i40e_add_macvlan_filters(struct i40e_vsi *vsi,rte_cpu_to_le_16 (filter[num + i].vlan_id);switch (filter[num + i].filter_type) { -case RTE_MAC_PERFECT_MATCH : +case I40E_MAC_PERFECT_MATCH : flags =I40E_AQC_MACVLAN_ADD_PERFECT_MATCH |I40E_AQC_MACVLAN_ADD_IGNORE_VLAN ;break ; -case RTE_MACVLAN_PERFECT_MATCH : +case I40E_MACVLAN_PERFECT_MATCH : flags =I40E_AQC_MACVLAN_ADD_PERFECT_MATCH ;break ; -case RTE_MAC_HASH_MATCH : +case I40E_MAC_HASH_MATCH : flags =I40E_AQC_MACVLAN_ADD_HASH_MATCH |I40E_AQC_MACVLAN_ADD_IGNORE_VLAN ;break ; -case RTE_MACVLAN_HASH_MATCH : +case I40E_MACVLAN_HASH_MATCH : flags =I40E_AQC_MACVLAN_ADD_HASH_MATCH ;break ;default :
@@ -7180,18 +7180,18 @@ i40e_remove_macvlan_filters(struct i40e_vsi *vsi,rte_cpu_to_le_16 (filter[num + i].vlan_id);switch (filter[num + i].filter_type) { -case RTE_MAC_PERFECT_MATCH : +case I40E_MAC_PERFECT_MATCH : flags =I40E_AQC_MACVLAN_DEL_PERFECT_MATCH |I40E_AQC_MACVLAN_DEL_IGNORE_VLAN ;break ; -case RTE_MACVLAN_PERFECT_MATCH : +case I40E_MACVLAN_PERFECT_MATCH : flags =I40E_AQC_MACVLAN_DEL_PERFECT_MATCH ;break ; -case RTE_MAC_HASH_MATCH : +case I40E_MAC_HASH_MATCH : flags =I40E_AQC_MACVLAN_DEL_HASH_MATCH |I40E_AQC_MACVLAN_DEL_IGNORE_VLAN ;break ; -case RTE_MACVLAN_HASH_MATCH : +case I40E_MACVLAN_HASH_MATCH : flags =I40E_AQC_MACVLAN_DEL_HASH_MATCH ;break ;default :
@@ -7536,8 +7536,8 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct i40e_mac_filter_info *mac_filter) f =i40e_find_mac_filter (vsi, &mac_filter->mac_addr);if (f !=NULL )return I40E_SUCCESS ; -if ((mac_filter->filter_type ==RTE_MACVLAN_PERFECT_MATCH ) || - (mac_filter->filter_type ==RTE_MACVLAN_HASH_MATCH )) { +if (mac_filter->filter_type ==I40E_MACVLAN_PERFECT_MATCH || + mac_filter->filter_type ==I40E_MACVLAN_HASH_MATCH ) {/** * If vlan_num is 0, that's the first time to add mac,
@@ -7548,8 +7548,8 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct i40e_mac_filter_info *mac_filter) vsi->vlan_num =1 ; } vlan_num = vsi->vlan_num; - }else if ((mac_filter->filter_type ==RTE_MAC_PERFECT_MATCH ) || - (mac_filter->filter_type ==RTE_MAC_HASH_MATCH )) + }else if ((mac_filter->filter_type ==I40E_MAC_PERFECT_MATCH ) || + (mac_filter->filter_type ==I40E_MAC_HASH_MATCH )) vlan_num =1 ; mv_f =rte_zmalloc ("macvlan_data" , vlan_num *sizeof (*mv_f),0 );
@@ -7564,8 +7564,8 @@ i40e_vsi_add_mac(struct i40e_vsi *vsi, struct i40e_mac_filter_info *mac_filter) ETH_ADDR_LEN); } -if (mac_filter->filter_type ==RTE_MACVLAN_PERFECT_MATCH || - mac_filter->filter_type ==RTE_MACVLAN_HASH_MATCH ) { +if (mac_filter->filter_type ==I40E_MACVLAN_PERFECT_MATCH || + mac_filter->filter_type ==I40E_MACVLAN_HASH_MATCH ) { ret =i40e_find_all_vlan_for_mac (vsi, mv_f, vlan_num, &mac_filter->mac_addr);if (ret !=I40E_SUCCESS )
@@ -7602,7 +7602,7 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct rte_ether_addr *addr)struct i40e_mac_filter *f;struct i40e_macvlan_filter *mv_f;int i, vlan_num; -enum rte_mac_filter_type filter_type; +enum i40e_mac_filter_type filter_type;int ret =I40E_SUCCESS ;/* Can't find it, return an error */
@@ -7612,14 +7612,14 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct rte_ether_addr *addr) vlan_num = vsi->vlan_num; filter_type = f->mac_info.filter_type; -if (filter_type ==RTE_MACVLAN_PERFECT_MATCH || - filter_type ==RTE_MACVLAN_HASH_MATCH ) { +if (filter_type ==I40E_MACVLAN_PERFECT_MATCH || + filter_type ==I40E_MACVLAN_HASH_MATCH ) {if (vlan_num ==0 ) {PMD_DRV_LOG (ERR ,"VLAN number shouldn't be 0" );return I40E_ERR_PARAM ; } - }else if (filter_type ==RTE_MAC_PERFECT_MATCH || - filter_type ==RTE_MAC_HASH_MATCH ) + }else if (filter_type ==I40E_MAC_PERFECT_MATCH || + filter_type ==I40E_MAC_HASH_MATCH ) vlan_num =1 ; mv_f =rte_zmalloc ("macvlan_data" , vlan_num *sizeof (*mv_f),0 );
@@ -7633,8 +7633,8 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct rte_ether_addr *addr)rte_memcpy (&mv_f[i].macaddr, &f->mac_info.mac_addr,ETH_ADDR_LEN ); } -if (filter_type ==RTE_MACVLAN_PERFECT_MATCH || - filter_type ==RTE_MACVLAN_HASH_MATCH ) { +if (filter_type ==I40E_MACVLAN_PERFECT_MATCH || + filter_type ==I40E_MACVLAN_HASH_MATCH ) { ret =i40e_find_all_vlan_for_mac (vsi, mv_f, vlan_num, addr);if (ret !=I40E_SUCCESS ) goto DONE;
@@ -7862,25 +7862,25 @@ static int i40e_dev_get_filter_type(uint16_t filter_type, uint16_t *flag) {switch (filter_type) { -case RTE_TUNNEL_FILTER_IMAC_IVLAN : +case I40E_TUNNEL_FILTER_IMAC_IVLAN : *flag =I40E_AQC_ADD_CLOUD_FILTER_IMAC_IVLAN ;break ; -case RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID : +case I40E_TUNNEL_FILTER_IMAC_IVLAN_TENID : *flag =I40E_AQC_ADD_CLOUD_FILTER_IMAC_IVLAN_TEN_ID ;break ; -case RTE_TUNNEL_FILTER_IMAC_TENID : +case I40E_TUNNEL_FILTER_IMAC_TENID : *flag =I40E_AQC_ADD_CLOUD_FILTER_IMAC_TEN_ID ;break ; -case RTE_TUNNEL_FILTER_OMAC_TENID_IMAC : +case I40E_TUNNEL_FILTER_OMAC_TENID_IMAC : *flag =I40E_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC ;break ; -case ETH_TUNNEL_FILTER_IMAC : +case I40E_TUNNEL_FILTER_IMAC : *flag =I40E_AQC_ADD_CLOUD_FILTER_IMAC ;break ; -case ETH_TUNNEL_FILTER_OIP : +case I40E_TUNNEL_FILTER_OIP : *flag =I40E_AQC_ADD_CLOUD_FILTER_OIP ;break ; -case ETH_TUNNEL_FILTER_IIP : +case I40E_TUNNEL_FILTER_IIP : *flag =I40E_AQC_ADD_CLOUD_FILTER_IIP ;break ;default :
@@ -9316,7 +9316,7 @@ i40e_set_symmetric_hash_enable_per_port(struct i40e_hw *hw, uint8_t enable)*/ static int i40e_get_hash_filter_global_config (struct i40e_hw *hw, -struct rte_eth_hash_global_conf *g_cfg) +struct i40e_hash_global_conf *g_cfg) {struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;uint32_t reg;
@@ -9362,7 +9362,7 @@ i40e_get_hash_filter_global_config(struct i40e_hw *hw,static int i40e_hash_global_config_check (const struct i40e_adapter *adapter, -const struct rte_eth_hash_global_conf *g_cfg) +const struct i40e_hash_global_conf *g_cfg) {uint32_t i;uint64_t mask0, i40e_mask = adapter->flow_types_mask;
@@ -9406,7 +9406,7 @@ i40e_hash_global_config_check(const struct i40e_adapter *adapter,*/ static int i40e_set_hash_filter_global_config (struct i40e_hw *hw, -struct rte_eth_hash_global_conf *g_cfg) +struct i40e_hash_global_conf *g_cfg) {struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;struct i40e_pf *pf = &((struct i40e_adapter *)hw->back)->pf;
@@ -9478,7 +9478,7 @@ i40e_set_hash_filter_global_config(struct i40e_hw *hw,*/ static uint64_t i40e_get_valid_input_set (enum i40e_filter_pctype pctype, -enum rte_filter_type filter) +enum i40e_eth_filter_type filter) {uint64_t valid;
@@ -9726,7 +9726,7 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,if (pctype >I40E_FILTER_PCTYPE_L2_PAYLOAD )return 0 ; -if (filter ==RTE_ETH_FILTER_HASH ) +if (filter ==I40E_ETH_FILTER_HASH ) valid = valid_hash_inset_table[pctype];else valid = valid_fdir_inset_table[pctype];
@@ -9739,7 +9739,7 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype,*/ int i40e_validate_input_set (enum i40e_filter_pctype pctype, -enum rte_filter_type filter,uint64_t inset) +enum i40e_eth_filter_type filter,uint64_t inset) {uint64_t valid;
@@ -9817,76 +9817,76 @@ i40e_get_default_input_set(uint16_t pctype)static int i40e_parse_input_set (uint64_t *inset,enum i40e_filter_pctype pctype, -enum rte_eth_input_set_field *field, +enum i40e_input_set_field *field,uint16_t size) {uint16_t i, j;int ret = -EINVAL ;static const struct { -enum rte_eth_input_set_field field; +enum i40e_input_set_field field;uint64_t inset; } inset_convert_table[] = { - {RTE_ETH_INPUT_SET_NONE ,I40E_INSET_NONE }, - {RTE_ETH_INPUT_SET_L2_SRC_MAC ,I40E_INSET_SMAC }, - {RTE_ETH_INPUT_SET_L2_DST_MAC ,I40E_INSET_DMAC }, - {RTE_ETH_INPUT_SET_L2_OUTER_VLAN ,I40E_INSET_VLAN_OUTER }, - {RTE_ETH_INPUT_SET_L2_INNER_VLAN ,I40E_INSET_VLAN_INNER }, - {RTE_ETH_INPUT_SET_L2_ETHERTYPE ,I40E_INSET_LAST_ETHER_TYPE }, - {RTE_ETH_INPUT_SET_L3_SRC_IP4 ,I40E_INSET_IPV4_SRC }, - {RTE_ETH_INPUT_SET_L3_DST_IP4 ,I40E_INSET_IPV4_DST }, - {RTE_ETH_INPUT_SET_L3_IP4_TOS ,I40E_INSET_IPV4_TOS }, - {RTE_ETH_INPUT_SET_L3_IP4_PROTO ,I40E_INSET_IPV4_PROTO }, - {RTE_ETH_INPUT_SET_L3_IP4_TTL ,I40E_INSET_IPV4_TTL }, - {RTE_ETH_INPUT_SET_L3_SRC_IP6 ,I40E_INSET_IPV6_SRC }, - {RTE_ETH_INPUT_SET_L3_DST_IP6 ,I40E_INSET_IPV6_DST }, - {RTE_ETH_INPUT_SET_L3_IP6_TC ,I40E_INSET_IPV6_TC }, - {RTE_ETH_INPUT_SET_L3_IP6_NEXT_HEADER , + {I40E_INPUT_SET_NONE ,I40E_INSET_NONE }, + {I40E_INPUT_SET_L2_SRC_MAC ,I40E_INSET_SMAC }, + {I40E_INPUT_SET_L2_DST_MAC ,I40E_INSET_DMAC }, + {I40E_INPUT_SET_L2_OUTER_VLAN ,I40E_INSET_VLAN_OUTER }, + {I40E_INPUT_SET_L2_INNER_VLAN ,I40E_INSET_VLAN_INNER }, + {I40E_INPUT_SET_L2_ETHERTYPE ,I40E_INSET_LAST_ETHER_TYPE }, + {I40E_INPUT_SET_L3_SRC_IP4 ,I40E_INSET_IPV4_SRC }, + {I40E_INPUT_SET_L3_DST_IP4 ,I40E_INSET_IPV4_DST }, + {I40E_INPUT_SET_L3_IP4_TOS ,I40E_INSET_IPV4_TOS }, + {I40E_INPUT_SET_L3_IP4_PROTO ,I40E_INSET_IPV4_PROTO }, + {I40E_INPUT_SET_L3_IP4_TTL ,I40E_INSET_IPV4_TTL }, + {I40E_INPUT_SET_L3_SRC_IP6 ,I40E_INSET_IPV6_SRC }, + {I40E_INPUT_SET_L3_DST_IP6 ,I40E_INSET_IPV6_DST }, + {I40E_INPUT_SET_L3_IP6_TC ,I40E_INSET_IPV6_TC }, + {I40E_INPUT_SET_L3_IP6_NEXT_HEADER ,I40E_INSET_IPV6_NEXT_HDR }, - {RTE_ETH_INPUT_SET_L3_IP6_HOP_LIMITS , + {I40E_INPUT_SET_L3_IP6_HOP_LIMITS ,I40E_INSET_IPV6_HOP_LIMIT }, - {RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT ,I40E_INSET_SRC_PORT }, - {RTE_ETH_INPUT_SET_L4_TCP_SRC_PORT ,I40E_INSET_SRC_PORT }, - {RTE_ETH_INPUT_SET_L4_SCTP_SRC_PORT ,I40E_INSET_SRC_PORT }, - {RTE_ETH_INPUT_SET_L4_UDP_DST_PORT ,I40E_INSET_DST_PORT }, - {RTE_ETH_INPUT_SET_L4_TCP_DST_PORT ,I40E_INSET_DST_PORT }, - {RTE_ETH_INPUT_SET_L4_SCTP_DST_PORT ,I40E_INSET_DST_PORT }, - {RTE_ETH_INPUT_SET_L4_SCTP_VERIFICATION_TAG , + {I40E_INPUT_SET_L4_UDP_SRC_PORT ,I40E_INSET_SRC_PORT }, + {I40E_INPUT_SET_L4_TCP_SRC_PORT ,I40E_INSET_SRC_PORT }, + {I40E_INPUT_SET_L4_SCTP_SRC_PORT ,I40E_INSET_SRC_PORT }, + {I40E_INPUT_SET_L4_UDP_DST_PORT ,I40E_INSET_DST_PORT }, + {I40E_INPUT_SET_L4_TCP_DST_PORT ,I40E_INSET_DST_PORT }, + {I40E_INPUT_SET_L4_SCTP_DST_PORT ,I40E_INSET_DST_PORT }, + {I40E_INPUT_SET_L4_SCTP_VERIFICATION_TAG ,I40E_INSET_SCTP_VT }, - {RTE_ETH_INPUT_SET_TUNNEL_L2_INNER_DST_MAC , + {I40E_INPUT_SET_TUNNEL_L2_INNER_DST_MAC ,I40E_INSET_TUNNEL_DMAC }, - {RTE_ETH_INPUT_SET_TUNNEL_L2_INNER_VLAN , + {I40E_INPUT_SET_TUNNEL_L2_INNER_VLAN ,I40E_INSET_VLAN_TUNNEL }, - {RTE_ETH_INPUT_SET_TUNNEL_L4_UDP_KEY , + {I40E_INPUT_SET_TUNNEL_L4_UDP_KEY ,I40E_INSET_TUNNEL_ID }, - {RTE_ETH_INPUT_SET_TUNNEL_GRE_KEY ,I40E_INSET_TUNNEL_ID }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_1ST_WORD , + {I40E_INPUT_SET_TUNNEL_GRE_KEY ,I40E_INSET_TUNNEL_ID }, + {I40E_INPUT_SET_FLEX_PAYLOAD_1ST_WORD ,I40E_INSET_FLEX_PAYLOAD_W1 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_2ND_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_2ND_WORD ,I40E_INSET_FLEX_PAYLOAD_W2 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_3RD_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_3RD_WORD ,I40E_INSET_FLEX_PAYLOAD_W3 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_4TH_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_4TH_WORD ,I40E_INSET_FLEX_PAYLOAD_W4 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_5TH_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_5TH_WORD ,I40E_INSET_FLEX_PAYLOAD_W5 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_6TH_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_6TH_WORD ,I40E_INSET_FLEX_PAYLOAD_W6 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_7TH_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_7TH_WORD ,I40E_INSET_FLEX_PAYLOAD_W7 }, - {RTE_ETH_INPUT_SET_FLEX_PAYLOAD_8TH_WORD , + {I40E_INPUT_SET_FLEX_PAYLOAD_8TH_WORD ,I40E_INSET_FLEX_PAYLOAD_W8 }, }; -if (!inset || !field || size >RTE_ETH_INSET_SIZE_MAX ) +if (!inset || !field || size >I40E_INSET_SIZE_MAX )return ret;/* Only one item allowed for default or all */ if (size ==1 ) { -if (field[0 ] ==RTE_ETH_INPUT_SET_DEFAULT ) { +if (field[0 ] ==I40E_INPUT_SET_DEFAULT ) { *inset =i40e_get_default_input_set (pctype);return 0 ; - }else if (field[0 ] ==RTE_ETH_INPUT_SET_NONE ) { + }else if (field[0 ] ==I40E_INPUT_SET_NONE ) { *inset =I40E_INSET_NONE ;return 0 ; }
@@ -10149,7 +10149,7 @@ i40e_filter_input_set_init(struct i40e_pf *pf)int i40e_hash_filter_inset_select (struct i40e_hw *hw, -struct rte_eth_input_set_conf *conf) +struct i40e_input_set_conf *conf) {struct i40e_pf *pf = &((struct i40e_adapter *)hw->back)->pf;enum i40e_filter_pctype pctype;
@@ -10161,8 +10161,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,PMD_DRV_LOG (ERR ,"Invalid pointer" );return -EFAULT ; } -if (conf->op !=RTE_ETH_INPUT_SET_SELECT && - conf->op !=RTE_ETH_INPUT_SET_ADD ) { +if (conf->op !=I40E_INPUT_SET_SELECT && + conf->op !=I40E_INPUT_SET_ADD ) {PMD_DRV_LOG (ERR ,"Unsupported input set operation" );return -EINVAL ; }
@@ -10191,7 +10191,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,return -EINVAL ; } -if (conf->op ==RTE_ETH_INPUT_SET_ADD ) { +if (conf->op ==I40E_INPUT_SET_ADD ) {/* get inset value in register */ inset_reg =i40e_read_rx_ctl (hw,I40E_GLQF_HASH_INSET (1 , pctype)); inset_reg <<=I40E_32_BIT_WIDTH ;
@@ -10226,7 +10226,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,int i40e_fdir_filter_inset_select (struct i40e_pf *pf, -struct rte_eth_input_set_conf *conf) +struct i40e_input_set_conf *conf) {struct i40e_hw *hw =I40E_PF_TO_HW (pf);enum i40e_filter_pctype pctype;
@@ -10238,8 +10238,8 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf,PMD_DRV_LOG (ERR ,"Invalid pointer" );return -EFAULT ; } -if (conf->op !=RTE_ETH_INPUT_SET_SELECT && - conf->op !=RTE_ETH_INPUT_SET_ADD ) { +if (conf->op !=I40E_INPUT_SET_SELECT && + conf->op !=I40E_INPUT_SET_ADD ) {PMD_DRV_LOG (ERR ,"Unsupported input set operation" );return -EINVAL ; }
@@ -10267,7 +10267,7 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf,* it is done by writing I40E_PRTQF_FD_FLXINSET * in i40e_set_flex_mask_on_pctype. */ -if (conf->op ==RTE_ETH_INPUT_SET_SELECT ) +if (conf->op ==I40E_INPUT_SET_SELECT ) inset_reg &=I40E_REG_INSET_FLEX_PAYLOAD_WORDS ;else input_set |= pf->fdir.input_set[pctype];
@@ -10308,7 +10308,7 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf, }static int -i40e_hash_filter_get (struct i40e_hw *hw,struct rte_eth_hash_filter_info *info) +i40e_hash_filter_get (struct i40e_hw *hw,struct i40e_hash_filter_info *info) {int ret =0 ;
@@ -10318,11 +10318,11 @@ i40e_hash_filter_get(struct i40e_hw *hw, struct rte_eth_hash_filter_info *info) }switch (info->info_type) { -case RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT : +case I40E_HASH_FILTER_SYM_HASH_ENA_PER_PORT :i40e_get_symmetric_hash_enable_per_port (hw, &(info->info.enable));break ; -case RTE_ETH_HASH_FILTER_GLOBAL_CONFIG : +case I40E_HASH_FILTER_GLOBAL_CONFIG : ret =i40e_get_hash_filter_global_config (hw, &(info->info.global_conf));break ;
@@ -10337,7 +10337,7 @@ i40e_hash_filter_get(struct i40e_hw *hw, struct rte_eth_hash_filter_info *info) }static int -i40e_hash_filter_set (struct i40e_hw *hw,struct rte_eth_hash_filter_info *info) +i40e_hash_filter_set (struct i40e_hw *hw,struct i40e_hash_filter_info *info) {int ret =0 ;
@@ -10347,14 +10347,14 @@ i40e_hash_filter_set(struct i40e_hw *hw, struct rte_eth_hash_filter_info *info) }switch (info->info_type) { -case RTE_ETH_HASH_FILTER_SYM_HASH_ENA_PER_PORT : +case I40E_HASH_FILTER_SYM_HASH_ENA_PER_PORT :i40e_set_symmetric_hash_enable_per_port (hw, info->info.enable);break ; -case RTE_ETH_HASH_FILTER_GLOBAL_CONFIG : +case I40E_HASH_FILTER_GLOBAL_CONFIG : ret =i40e_set_hash_filter_global_config (hw, &(info->info.global_conf));break ; -case RTE_ETH_HASH_FILTER_INPUT_SET_SELECT : +case I40E_HASH_FILTER_INPUT_SET_SELECT : ret =i40e_hash_filter_inset_select (hw, &(info->info.input_set_conf));break ;
@@ -10383,11 +10383,11 @@ i40e_hash_filter_ctrl(struct rte_eth_dev *dev,break ;case RTE_ETH_FILTER_GET : ret =i40e_hash_filter_get (hw, - (struct rte_eth_hash_filter_info *)arg); + (struct i40e_hash_filter_info *)arg);break ;case RTE_ETH_FILTER_SET : ret =i40e_hash_filter_set (hw, - (struct rte_eth_hash_filter_info *)arg); + (struct i40e_hash_filter_info *)arg);break ;default : PMD_DRV_LOG(WARNING, "Filter operation (%d) not supported",
@@ -10401,7 +10401,7 @@ i40e_hash_filter_ctrl(struct rte_eth_dev *dev,/* Convert ethertype filter structure */ static int -i40e_ethertype_filter_convert (const struct rte_eth_ethertype_filter *input, +i40e_ethertype_filter_convert (const struct i40e_eth_ethertype_filter *input,struct i40e_ethertype_filter *filter) { rte_memcpy(&filter->input.mac_addr, &input->mac_addr,
@@ -10482,7 +10482,7 @@ i40e_sw_ethertype_filter_del(struct i40e_pf *pf,*/ int i40e_ethertype_filter_set (struct i40e_pf *pf, -struct rte_eth_ethertype_filter *filter, +struct i40e_eth_ethertype_filter *filter,bool add) {struct i40e_hw *hw =I40E_PF_TO_HW (pf);
@@ -10523,9 +10523,9 @@ i40e_ethertype_filter_set(struct i40e_pf *pf,return -EINVAL ; } -if (!(filter->flags &RTE_ETHTYPE_FLAGS_MAC )) +if (!(filter->flags &I40E_ETHTYPE_FLAGS_MAC )) flags |=I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC ; -if (filter->flags &RTE_ETHTYPE_FLAGS_DROP ) +if (filter->flags &I40E_ETHTYPE_FLAGS_DROP ) flags |=I40E_AQC_ADD_CONTROL_PACKET_FLAGS_DROP ; flags |=I40E_AQC_ADD_CONTROL_PACKET_FLAGS_TO_QUEUE ;
@@ -10587,12 +10587,12 @@ i40e_ethertype_filter_handle(struct rte_eth_dev *dev,switch (filter_op) {case RTE_ETH_FILTER_ADD : ret =i40e_ethertype_filter_set (pf, - (struct rte_eth_ethertype_filter *)arg, + (struct i40e_eth_ethertype_filter *)arg, TRUE);break ;case RTE_ETH_FILTER_DELETE : ret =i40e_ethertype_filter_set (pf, - (struct rte_eth_ethertype_filter *)arg, + (struct i40e_eth_ethertype_filter *)arg, FALSE);break ;default :
@@ -12550,9 +12550,9 @@ i40e_ethertype_filter_restore(struct i40e_pf *pf) TAILQ_FOREACH(f, ethertype_list, rules) { flags =0 ; -if (!(f->flags &RTE_ETHTYPE_FLAGS_MAC )) +if (!(f->flags &I40E_ETHTYPE_FLAGS_MAC )) flags |=I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC ; -if (f->flags &RTE_ETHTYPE_FLAGS_DROP ) +if (f->flags &I40E_ETHTYPE_FLAGS_DROP ) flags |=I40E_AQC_ADD_CONTROL_PACKET_FLAGS_DROP ; flags |=I40E_AQC_ADD_CONTROL_PACKET_FLAGS_TO_QUEUE ;
@@ -13271,108 +13271,108 @@ static int i40e_rss_conf_hash_inset(struct i40e_pf *pf, uint64_t types) {struct i40e_hw *hw =I40E_PF_TO_HW (pf); -struct rte_eth_input_set_conf conf; +struct i40e_input_set_conf conf;uint64_t mask0;int ret =0 ;uint32_t j;int i;static const struct {uint64_t type; -enum rte_eth_input_set_field field; +enum i40e_input_set_field field; } inset_match_table[] = { {ETH_RSS_FRAG_IPV4 |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP4 }, +I40E_INPUT_SET_L3_SRC_IP4 }, {ETH_RSS_FRAG_IPV4 |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP4 }, +I40E_INPUT_SET_L3_DST_IP4 }, {ETH_RSS_FRAG_IPV4 |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_FRAG_IPV4 |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_NONFRAG_IPV4_TCP |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP4 }, +I40E_INPUT_SET_L3_SRC_IP4 }, {ETH_RSS_NONFRAG_IPV4_TCP |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP4 }, +I40E_INPUT_SET_L3_DST_IP4 }, {ETH_RSS_NONFRAG_IPV4_TCP |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_L4_TCP_SRC_PORT }, +I40E_INPUT_SET_L4_TCP_SRC_PORT }, {ETH_RSS_NONFRAG_IPV4_TCP |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_L4_TCP_DST_PORT }, +I40E_INPUT_SET_L4_TCP_DST_PORT }, {ETH_RSS_NONFRAG_IPV4_UDP |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP4 }, +I40E_INPUT_SET_L3_SRC_IP4 }, {ETH_RSS_NONFRAG_IPV4_UDP |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP4 }, +I40E_INPUT_SET_L3_DST_IP4 }, {ETH_RSS_NONFRAG_IPV4_UDP |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT }, +I40E_INPUT_SET_L4_UDP_SRC_PORT }, {ETH_RSS_NONFRAG_IPV4_UDP |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_L4_UDP_DST_PORT }, +I40E_INPUT_SET_L4_UDP_DST_PORT }, {ETH_RSS_NONFRAG_IPV4_SCTP |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP4 }, +I40E_INPUT_SET_L3_SRC_IP4 }, {ETH_RSS_NONFRAG_IPV4_SCTP |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP4 }, +I40E_INPUT_SET_L3_DST_IP4 }, {ETH_RSS_NONFRAG_IPV4_SCTP |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_L4_SCTP_SRC_PORT }, +I40E_INPUT_SET_L4_SCTP_SRC_PORT }, {ETH_RSS_NONFRAG_IPV4_SCTP |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_L4_SCTP_DST_PORT }, +I40E_INPUT_SET_L4_SCTP_DST_PORT }, {ETH_RSS_NONFRAG_IPV4_OTHER |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP4 }, +I40E_INPUT_SET_L3_SRC_IP4 }, {ETH_RSS_NONFRAG_IPV4_OTHER |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP4 }, +I40E_INPUT_SET_L3_DST_IP4 }, {ETH_RSS_NONFRAG_IPV4_OTHER |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_NONFRAG_IPV4_OTHER |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_FRAG_IPV6 |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP6 }, +I40E_INPUT_SET_L3_SRC_IP6 }, {ETH_RSS_FRAG_IPV6 |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP6 }, +I40E_INPUT_SET_L3_DST_IP6 }, {ETH_RSS_FRAG_IPV6 |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_FRAG_IPV6 |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_NONFRAG_IPV6_TCP |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP6 }, +I40E_INPUT_SET_L3_SRC_IP6 }, {ETH_RSS_NONFRAG_IPV6_TCP |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP6 }, +I40E_INPUT_SET_L3_DST_IP6 }, {ETH_RSS_NONFRAG_IPV6_TCP |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_L4_TCP_SRC_PORT }, +I40E_INPUT_SET_L4_TCP_SRC_PORT }, {ETH_RSS_NONFRAG_IPV6_TCP |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_L4_TCP_DST_PORT }, +I40E_INPUT_SET_L4_TCP_DST_PORT }, {ETH_RSS_NONFRAG_IPV6_UDP |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP6 }, +I40E_INPUT_SET_L3_SRC_IP6 }, {ETH_RSS_NONFRAG_IPV6_UDP |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP6 }, +I40E_INPUT_SET_L3_DST_IP6 }, {ETH_RSS_NONFRAG_IPV6_UDP |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_L4_UDP_SRC_PORT }, +I40E_INPUT_SET_L4_UDP_SRC_PORT }, {ETH_RSS_NONFRAG_IPV6_UDP |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_L4_UDP_DST_PORT }, +I40E_INPUT_SET_L4_UDP_DST_PORT }, {ETH_RSS_NONFRAG_IPV6_SCTP |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP6 }, +I40E_INPUT_SET_L3_SRC_IP6 }, {ETH_RSS_NONFRAG_IPV6_SCTP |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP6 }, +I40E_INPUT_SET_L3_DST_IP6 }, {ETH_RSS_NONFRAG_IPV6_SCTP |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_L4_SCTP_SRC_PORT }, +I40E_INPUT_SET_L4_SCTP_SRC_PORT }, {ETH_RSS_NONFRAG_IPV6_SCTP |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_L4_SCTP_DST_PORT }, +I40E_INPUT_SET_L4_SCTP_DST_PORT }, {ETH_RSS_NONFRAG_IPV6_OTHER |ETH_RSS_L3_SRC_ONLY , -RTE_ETH_INPUT_SET_L3_SRC_IP6 }, +I40E_INPUT_SET_L3_SRC_IP6 }, {ETH_RSS_NONFRAG_IPV6_OTHER |ETH_RSS_L3_DST_ONLY , -RTE_ETH_INPUT_SET_L3_DST_IP6 }, +I40E_INPUT_SET_L3_DST_IP6 }, {ETH_RSS_NONFRAG_IPV6_OTHER |ETH_RSS_L4_SRC_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, {ETH_RSS_NONFRAG_IPV6_OTHER |ETH_RSS_L4_DST_ONLY , -RTE_ETH_INPUT_SET_UNKNOWN }, +I40E_INPUT_SET_UNKNOWN }, }; mask0 = types & pf->adapter->flow_types_mask; - conf.op =RTE_ETH_INPUT_SET_SELECT ; + conf.op =I40E_INPUT_SET_SELECT ; conf.inset_size =0 ;for (i =RTE_ETH_FLOW_UNKNOWN +1 ; i <RTE_ETH_FLOW_MAX ; i++) {if (mask0 & (1ULL << i)) {
@@ -13385,7 +13385,7 @@ i40e_rss_conf_hash_inset(struct i40e_pf *pf, uint64_t types)if ((types & inset_match_table[j].type) == inset_match_table[j].type) {if (inset_match_table[j].field == -RTE_ETH_INPUT_SET_UNKNOWN ) +I40E_INPUT_SET_UNKNOWN )return -EINVAL ; conf.field[conf.inset_size] =
@@ -13645,12 +13645,12 @@ i40e_rss_disable_hash(struct i40e_pf *pf,continue ;/* Configure default input set */ -struct rte_eth_input_set_conf input_conf = { - .op =RTE_ETH_INPUT_SET_SELECT , +struct i40e_input_set_conf input_conf = { + .op =I40E_INPUT_SET_SELECT , .flow_type = i, .inset_size =1 , }; - input_conf.field[0 ] =RTE_ETH_INPUT_SET_DEFAULT ; + input_conf.field[0 ] =I40E_INPUT_SET_DEFAULT ;i40e_hash_filter_inset_select (hw, &input_conf); }
drivers/net/i40e/i40e_ethdev.h +328 -29
475 lines not on this page · raw message
drivers/net/i40e/i40e_fdir.c +4 -4
@@ -2360,7 +2360,7 @@ i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir) (uint32_t )hw->func_caps.fd_filters_best_effort; fdir->max_flexpayload =I40E_FDIR_MAX_FLEX_LEN ; fdir->flow_types_mask[0 ] =I40E_FDIR_FLOWS ; -for (i =1 ; i <RTE_FLOW_MASK_ARRAY_SIZE ; i++) +for (i =1 ; i <I40E_FLOW_MASK_ARRAY_SIZE ; i++) fdir->flow_types_mask[i] =0ULL ; fdir->flex_payload_unit =sizeof (uint16_t ); fdir->flex_bitmask_unit =sizeof (uint16_t );
@@ -2403,7 +2403,7 @@ i40e_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *stat)static int i40e_fdir_filter_set (struct rte_eth_dev *dev, -struct rte_eth_fdir_filter_info *info) +struct i40e_fdir_filter_info *info) {struct i40e_pf *pf =I40E_DEV_PRIVATE_TO_PF (dev->data->dev_private);int ret =0 ;
@@ -2414,7 +2414,7 @@ i40e_fdir_filter_set(struct rte_eth_dev *dev, }switch (info->info_type) { -case RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT : +case I40E_FDIR_FILTER_INPUT_SET_SELECT : ret =i40e_fdir_filter_inset_select (pf, &(info->info.input_set_conf));break ;
@@ -2469,7 +2469,7 @@ i40e_fdir_ctrl_func(struct rte_eth_dev *dev,break ;case RTE_ETH_FILTER_SET : ret =i40e_fdir_filter_set (dev, - (struct rte_eth_fdir_filter_info *)arg); + (struct i40e_fdir_filter_info *)arg);break ;case RTE_ETH_FILTER_STATS :i40e_fdir_stats_get (dev, (struct rte_eth_fdir_stats *)arg);
drivers/net/i40e/i40e_flow.c +55 -56
377 lines not on this page · raw message
drivers/net/i40e/i40e_pf.c +1 -1
@@ -844,7 +844,7 @@ i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf,for (i =0 ; i < addr_list->num_elements; i++) { mac = (struct rte_ether_addr *)(addr_list->list[i].addr);rte_memcpy (&filter.mac_addr, mac,RTE_ETHER_ADDR_LEN ); - filter.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + filter.filter_type =I40E_MACVLAN_PERFECT_MATCH ;if (rte_is_zero_ether_addr (mac) ||i40e_vsi_add_mac (vf->vsi, &filter)) { ret =I40E_ERR_INVALID_MAC_ADDR ;
drivers/net/i40e/rte_pmd_i40e.c +15 -15
@@ -211,7 +211,7 @@ i40e_vsi_rm_mac_filter(struct i40e_vsi *vsi)struct i40e_mac_filter *f;struct i40e_macvlan_filter *mv_f;int i, vlan_num; -enum rte_mac_filter_type filter_type; +enum i40e_mac_filter_type filter_type;int ret =I40E_SUCCESS ;void *temp;
@@ -219,14 +219,14 @@ i40e_vsi_rm_mac_filter(struct i40e_vsi *vsi) TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { vlan_num = vsi->vlan_num; filter_type = f->mac_info.filter_type; -if (filter_type ==RTE_MACVLAN_PERFECT_MATCH || - filter_type ==RTE_MACVLAN_HASH_MATCH ) { +if (filter_type ==I40E_MACVLAN_PERFECT_MATCH || + filter_type ==I40E_MACVLAN_HASH_MATCH ) {if (vlan_num ==0 ) {PMD_DRV_LOG (ERR ,"VLAN number shouldn't be 0" );return I40E_ERR_PARAM ; } - }else if (filter_type ==RTE_MAC_PERFECT_MATCH || - filter_type ==RTE_MAC_HASH_MATCH ) + }else if (filter_type ==I40E_MAC_PERFECT_MATCH || + filter_type ==I40E_MAC_HASH_MATCH ) vlan_num =1 ; mv_f =rte_zmalloc ("macvlan_data" , vlan_num *sizeof (*mv_f),0 );
@@ -241,8 +241,8 @@ i40e_vsi_rm_mac_filter(struct i40e_vsi *vsi) &f->mac_info.mac_addr, ETH_ADDR_LEN); } -if (filter_type ==RTE_MACVLAN_PERFECT_MATCH || - filter_type ==RTE_MACVLAN_HASH_MATCH ) { +if (filter_type ==I40E_MACVLAN_PERFECT_MATCH || + filter_type ==I40E_MACVLAN_HASH_MATCH ) { ret =i40e_find_all_vlan_for_mac (vsi, mv_f, vlan_num, &f->mac_info.mac_addr);if (ret !=I40E_SUCCESS ) {
@@ -275,8 +275,8 @@ i40e_vsi_restore_mac_filter(struct i40e_vsi *vsi)/* restore all the MACs */ TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp) { -if ((f->mac_info.filter_type ==RTE_MACVLAN_PERFECT_MATCH ) || - (f->mac_info.filter_type ==RTE_MACVLAN_HASH_MATCH )) { +if (f->mac_info.filter_type ==I40E_MACVLAN_PERFECT_MATCH || + f->mac_info.filter_type ==I40E_MACVLAN_HASH_MATCH ) {/** * If vlan_num is 0, that's the first time to add mac, * set mask for vlan_id 0.
@@ -286,8 +286,8 @@ i40e_vsi_restore_mac_filter(struct i40e_vsi *vsi) vsi->vlan_num =1 ; } vlan_num = vsi->vlan_num; - }else if ((f->mac_info.filter_type ==RTE_MAC_PERFECT_MATCH ) || - (f->mac_info.filter_type ==RTE_MAC_HASH_MATCH )) + }else if (f->mac_info.filter_type ==I40E_MAC_PERFECT_MATCH || + f->mac_info.filter_type ==I40E_MAC_HASH_MATCH ) vlan_num =1 ; mv_f =rte_zmalloc ("macvlan_data" , vlan_num *sizeof (*mv_f),0 );
@@ -303,8 +303,8 @@ i40e_vsi_restore_mac_filter(struct i40e_vsi *vsi) ETH_ADDR_LEN); } -if (f->mac_info.filter_type ==RTE_MACVLAN_PERFECT_MATCH || - f->mac_info.filter_type ==RTE_MACVLAN_HASH_MATCH ) { +if (f->mac_info.filter_type ==I40E_MACVLAN_PERFECT_MATCH || + f->mac_info.filter_type ==I40E_MACVLAN_HASH_MATCH ) { ret =i40e_find_all_vlan_for_mac (vsi, mv_f, vlan_num, &f->mac_info.mac_addr);if (ret !=I40E_SUCCESS ) {
@@ -768,7 +768,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,if (on) {rte_memcpy (&filter.mac_addr, &broadcast,RTE_ETHER_ADDR_LEN ); - filter.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + filter.filter_type =I40E_MACVLAN_PERFECT_MATCH ; ret =i40e_vsi_add_mac (vsi, &filter); }else { ret =i40e_vsi_delete_mac (vsi, &broadcast);
@@ -2388,7 +2388,7 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,return -EINVAL ; } - mac_filter.filter_type =RTE_MACVLAN_PERFECT_MATCH ; + mac_filter.filter_type =I40E_MACVLAN_PERFECT_MATCH ;rte_ether_addr_copy (mac_addr, &mac_filter.mac_addr); ret =i40e_vsi_add_mac (vsi, &mac_filter);if (ret !=I40E_SUCCESS ) {
Signature · 1 line
2.17.1