Skip to contentSkip to conversation

net/iavf: fix order of tags for AVX512 Tx QinQ offload

PATCH Applied Ciara Loftus 2 participants 3 messages Mar 6 – Mar 11 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix order of tags for AVX512 Tx QinQ offload

The tags were not inserted the correct order in the bulk context descriptor function on the AVX512 path. Fix it so that it is consistent with the single packet function and the scalar path implementation.

Fixes 23ef9b485dec ("net/iavf: fix conditions for AVX-512 VLAN offload")
---
 drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c +4 -4
index 9a93a0b062..4e8bf94fa0 100644
@@ -2125,8 +2125,8 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
 		if (offload) {
 			if (pkt[1]->ol_flags & RTE_MBUF_F_TX_QINQ) {
 				uint64_t qinq_tag = vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ?
-					(uint64_t)pkt[1]->vlan_tci :
-					(uint64_t)pkt[1]->vlan_tci_outer;
+					(uint64_t)pkt[1]->vlan_tci_outer :
+					(uint64_t)pkt[1]->vlan_tci;
 				hi_ctx_qw1 |= CI_TX_CTX_DESC_IL2TAG2 << CI_TXD_QW1_CMD_S;
 				low_ctx_qw1 |= qinq_tag << IAVF_TXD_CTX_QW0_L2TAG2_PARAM;
 			} else if (pkt[1]->ol_flags & RTE_MBUF_F_TX_VLAN &&
@@ -2145,8 +2145,8 @@ ctx_vtx(volatile struct ci_tx_desc *txdp,
 		if (offload) {
 			if (pkt[0]->ol_flags & RTE_MBUF_F_TX_QINQ) {
 				uint64_t qinq_tag = vlan_flag & IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ?
-					(uint64_t)pkt[0]->vlan_tci :
-					(uint64_t)pkt[0]->vlan_tci_outer;
+					(uint64_t)pkt[0]->vlan_tci_outer :
+					(uint64_t)pkt[0]->vlan_tci;
 				hi_ctx_qw0 |= IAVF_TX_CTX_DESC_IL2TAG2 << CI_TXD_QW1_CMD_S;
 				low_ctx_qw0 |= qinq_tag << IAVF_TXD_CTX_QW0_L2TAG2_PARAM;
 			} else if (pkt[0]->ol_flags & RTE_MBUF_F_TX_VLAN &&
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Ciara Loftus

The tags were not inserted the correct order in the bulk context descriptor function on the AVX512 path. Fix it so that it is consistent with the single packet function and the scalar path implementation.

Fixes 23ef9b485dec ("net/iavf: fix conditions for AVX-512 VLAN offload")
---
 drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
#2 lore raw
Quoted 5 lines · Bruce Richardson
Quoted 4 lines · Ciara Loftus

The tags were not inserted the correct order in the bulk context descriptor function on the AVX512 path. Fix it so that it is consistent with the single packet function and the scalar path implementation.

Quoted 8 lines
Quoted 7 lines
Fixes 23ef9b485dec ("net/iavf: fix conditions for AVX-512 VLAN offload")
---
 drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Applied to dpdk-next-net-intel

Thanks,
/Bruce