Skip to contentSkip to conversation

net/iavf: fix VLAN insertion

PATCH Applied Yiding Zhou 2 participants 2 messages Aug 12, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix VLAN insertion

When the PF driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location.

This commit is to fix the issue by using normal Tx path to handle L2TAG2 case.

Fixes 3aa957338503 ("net/iavf: fix VLAN insert")
---
 drivers/net/iavf/iavf_rxtx_vec_common.h | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/iavf/iavf_rxtx_vec_common.h +3 -0
index a59cb2ceee..4ab22c6b2b 100644
@@ -253,6 +253,9 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
 	if (txq->offloads & IAVF_TX_NO_VECTOR_FLAGS)
 		return -1;
 
+	if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
+		return -1;
+
 	if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD)
 		return IAVF_VECTOR_OFFLOAD_PATH;
 
Signature · 1 line
2.34.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Yiding Zhou <[email protected]>
Sent: Friday, August 12, 2022 10:53 AM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>
Subject: [PATCH] net/iavf: fix VLAN insertion

When the PF driver tells the VF to insert VLAN tag using the L2TAG2 field, vector Tx path does not use Tx context descriptor and would cause VLAN tag inserted into the wrong location.

Quoted 6 lines

This commit is to fix the issue by using normal Tx path to handle L2TAG2 case.

Fixes 3aa957338503 ("net/iavf: fix VLAN insert")

Applied to dpdk-next-net-intel.

Thanks
Qi