From: Qi Zhang Date: Tue, 22 May 2018 01:01:20 +0000 (+0800) Subject: net/i40e: remove dependency on old Rx flags X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=853b2a68e42eab058c72da588e58d92abbadc58d;p=dpdk.git net/i40e: remove dependency on old Rx flags Cleanup remain dependency on old rxmode flags since we move to new offload APIs. Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API") Fixes: e0cb96204b71 ("net/i40e: add support for representor ports") Signed-off-by: Qi Zhang Acked-by: Beilei Xing --- diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 3ffedcb9e6..63cb177424 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -202,11 +202,11 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev) /* - no csum error report support * - no header split support */ - if (rxmode->header_split == 1) + if (rxmode->offloads & DEV_RX_OFFLOAD_HEADER_SPLIT) return -1; /* no QinQ support */ - if (rxmode->hw_vlan_extend == 1) + if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND) return -1; return 0; diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c index 8dc94b479f..f9f1316110 100644 --- a/drivers/net/i40e/i40e_vf_representor.c +++ b/drivers/net/i40e/i40e_vf_representor.c @@ -378,7 +378,8 @@ i40e_vf_representor_vlan_offload_set(struct rte_eth_dev *ethdev, int mask) if (mask & ETH_VLAN_FILTER_MASK) { /* Enable or disable VLAN filtering offload */ - if (ethdev->data->dev_conf.rxmode.hw_vlan_filter) + if (ethdev->data->dev_conf.rxmode.offloads & + DEV_RX_OFFLOAD_VLAN_FILTER) return i40e_vsi_config_vlan_filter(vsi, TRUE); else return i40e_vsi_config_vlan_filter(vsi, FALSE); @@ -386,7 +387,8 @@ i40e_vf_representor_vlan_offload_set(struct rte_eth_dev *ethdev, int mask) if (mask & ETH_VLAN_STRIP_MASK) { /* Enable or disable VLAN stripping offload */ - if (ethdev->data->dev_conf.rxmode.hw_vlan_strip) + if (ethdev->data->dev_conf.rxmode.offloads & + DEV_RX_OFFLOAD_VLAN_STRIP) return i40e_vsi_config_vlan_stripping(vsi, TRUE); else return i40e_vsi_config_vlan_stripping(vsi, FALSE);