From 87b81daeeb871660cc1c96e64e1887c43ec4c3b2 Mon Sep 17 00:00:00 2001 From: Junfeng Guo Date: Fri, 22 Jan 2021 13:35:41 +0000 Subject: [PATCH] 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 --- 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 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; } -- 2.20.1