From: Junfeng Guo Date: Fri, 22 Jan 2021 13:35:41 +0000 (+0000) Subject: net/iavf: fix VLAN strip configuration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=87b81daeeb871660cc1c96e64e1887c43ec4c3b2;p=dpdk.git net/iavf: fix VLAN strip configuration 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 Acked-by: Haiyue Wang --- diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index e9c8c1157a..a5c5d2e2a1 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; }