net/i40e: remove dependency on old Rx flags
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 22 May 2018 01:01:20 +0000 (09:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 22 May 2018 22:35:01 +0000 (00:35 +0200)
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 <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/i40e_rxtx_vec_common.h
drivers/net/i40e/i40e_vf_representor.c

index 3ffedcb..63cb177 100644 (file)
@@ -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;
index 8dc94b4..f9f1316 100644 (file)
@@ -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);