net/i40e: fix VLAN offload setting
authorQi Zhang <qi.z.zhang@intel.com>
Wed, 29 Nov 2017 10:27:30 +0000 (05:27 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
Vlan offload flag "rx_mode.hw_vlan_extend" should be considerred at
rte_eth_dev_configure stage as well as "rx_mode.hw_vlan_strip" and
"rx_mode.hw_vlan_filter".

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/i40e_ethdev.c

index fc38615..3515f24 100644 (file)
@@ -5286,15 +5286,15 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
        int mask = 0;
 
        /* Apply vlan offload setting */
-       mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK;
+       mask = ETH_VLAN_STRIP_MASK |
+              ETH_VLAN_FILTER_MASK |
+              ETH_VLAN_EXTEND_MASK;
        ret = i40e_vlan_offload_set(dev, mask);
        if (ret) {
                PMD_DRV_LOG(INFO, "Failed to update vlan offload");
                return ret;
        }
 
-       /* Apply double-vlan setting, not implemented yet */
-
        /* Apply pvid setting */
        ret = i40e_vlan_pvid_set(dev, data->dev_conf.txmode.pvid,
                                data->dev_conf.txmode.hw_vlan_insert_pvid);