Skip to contentSkip to conversation

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

PATCH Applied Junfeng Guo 3 participants 3 messages Jan 22, 2021 – Jan 25, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/iavf/iavf_ethdev.c +3 -0
index cf6ea0b15..8175c7729 100644
@@ -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;
 	}
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Friday, January 22, 2021 21:36
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Wang, Haiyue <[email protected]>; Zhang, Yuying <[email protected]>; Guo, Junfeng <[email protected]>
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.

Quoted 5 lines
Fixes 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

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

Quoted 2 lines

--
2.25.1

Applied
#2 lore raw
Quoted 30 lines

-----Original Message-----
From: Wang, Haiyue <[email protected]>
Sent: Friday, January 22, 2021 2:12 PM
To: Guo, Junfeng <[email protected]>; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Yuying <[email protected]>
Subject: RE: [PATCH] net/iavf: fix port VLAN cfg err for AVF with SVM

Quoted 13 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Friday, January 22, 2021 21:36
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Wang, Haiyue <[email protected]>; Zhang, Yuying <[email protected]>; Guo, Junfeng <[email protected]>
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.

Quoted 5 lines
Fixes 1c301e8c3cff ("net/iavf: support new VLAN capabilities")
---
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
Quoted 3 lines

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

Applied to dpdk-next-net-intel.

Thanks
Qi