diff mbox series

net/iavf: fix port VLAN cfg err for AVF with SVM

Message ID 20210122133541.1799915-1-junfeng.guo@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series net/iavf: fix port VLAN cfg err for AVF with SVM | expand

Checks

Context Check Description
ci/iol-testing warning Testing issues
ci/iol-testing warning Testing issues
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Junfeng Guo Jan. 22, 2021, 1:35 p.m. UTC
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>
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Wang, Haiyue Jan. 22, 2021, 6:12 a.m. UTC | #1
> -----Original Message-----
> From: Guo, Junfeng <junfeng.guo@intel.com>
> Sent: Friday, January 22, 2021 21:36
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>; Guo,
> Junfeng <junfeng.guo@intel.com>
> Subject: [PATCH] net/iavf: fix port VLAN cfg err for AVF with SVM
> 
> 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>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 3 +++
>  1 file changed, 3 insertions(+)

Good catch, I missed this scenario handling. ;-)

Acked-by: Haiyue Wang <haiyue.wang@intel.com>

> --
> 2.25.1
Zhang, Qi Z Jan. 25, 2021, 12:49 p.m. UTC | #2
> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Friday, January 22, 2021 2:12 PM
> To: Guo, Junfeng <junfeng.guo@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Zhang, Yuying <yuying.zhang@intel.com>
> Subject: RE: [PATCH] net/iavf: fix port VLAN cfg err for AVF with SVM
> 
> > -----Original Message-----
> > From: Guo, Junfeng <junfeng.guo@intel.com>
> > Sent: Friday, January 22, 2021 21:36
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; Zhang, Yuying
> > <yuying.zhang@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>
> > Subject: [PATCH] net/iavf: fix port VLAN cfg err for AVF with SVM
> >
> > 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>
> > ---
> >  drivers/net/iavf/iavf_ethdev.c | 3 +++
> >  1 file changed, 3 insertions(+)
> 
> Good catch, I missed this scenario handling. ;-)
> 
> Acked-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

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;
 	}