[dpdk-dev] [PATCH] net/iavf: fix port VLAN cfg err for AVF with SVM
Junfeng Guo
junfeng.guo at intel.com
Fri Jan 22 14:35:41 CET 2021
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 at intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index cf6ea0b15..8175c7729 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
}
--
2.25.1
More information about the dev
mailing list