net/iavf: fix VLAN strip configuration
authorJunfeng Guo <junfeng.guo@intel.com>
Fri, 22 Jan 2021 13:35:41 +0000 (13:35 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:08 +0000 (18:16 +0100)
For AVF with single VLAN mode (SVM), port VLAN stripping config
has already been disabled by PF. In this scenario, the error of
-ENOTSUP can be ignored.

Fixes: 1c301e8c3cff ("net/iavf: support new VLAN capabilities")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/iavf/iavf_ethdev.c

index e9c8c11..a5c5d2e 100644 (file)
@@ -1092,6 +1092,9 @@ iavf_dev_vlan_offload_set_v2(struct rte_eth_dev *dev, int mask)
                enable = !!(rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP);
 
                err = iavf_config_vlan_strip_v2(adapter, enable);
+               /* If not support, the stripping is already disabled by PF */
+               if (err == -ENOTSUP && !enable)
+                       err = 0;
                if (err)
                        return -EIO;
        }