[PATCH 25.11] net/iavf: fix outer QinQ tag for tunnelled packets

Bruce Richardson bruce.richardson at intel.com
Fri Dec 4 13:02:33 CET 2026


When the QinQ feature was enabled along with tunnelling support, the
tunnel options were written directly to the context descriptor quad-word
rather than being merged in. This leads to any QinQ tag in the context
descriptor getting overwritten.

Change order of operations so that the tunnel options go first and the
QinQ tags are merged into that.

Fixes: 4f8259df563a ("net/iavf: enable Tx outer checksum offload on AVX512")
Fixes: 70baceadabf2 ("net/iavf: fix AVX512 Tx")
Cc: stable at dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
---
This patch is a backport of a27ff69395eb ("net/iavf: fix outer QinQ tag for tunnelled packets")
---
 drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
index ac0ce2b1ee..cba3c05d1c 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
@@ -2124,6 +2124,8 @@ ctx_vtx(volatile struct iavf_tx_desc *txdp,
 
 #ifdef IAVF_TX_VLAN_QINQ_OFFLOAD
 		if (offload) {
+			/* tunnel fill assigns low_ctx_qw1; must run before QinQ/VLAN OR below */
+			iavf_fill_ctx_desc_tunnelling_field(&low_ctx_qw1, pkt[1]);
 			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_outer :
@@ -2146,6 +2148,8 @@ ctx_vtx(volatile struct iavf_tx_desc *txdp,
 
 #ifdef IAVF_TX_VLAN_QINQ_OFFLOAD
 		if (offload) {
+			/* tunnel fill assigns low_ctx_qw0; must run before QinQ/VLAN OR below */
+			iavf_fill_ctx_desc_tunnelling_field(&low_ctx_qw0, pkt[0]);
 			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_outer :
@@ -2169,8 +2173,6 @@ ctx_vtx(volatile struct iavf_tx_desc *txdp,
 		if (offload) {
 			iavf_txd_enable_offload(pkt[1], &hi_data_qw1, vlan_flag);
 			iavf_txd_enable_offload(pkt[0], &hi_data_qw0, vlan_flag);
-			iavf_fill_ctx_desc_tunnelling_field(&low_ctx_qw1, pkt[1]);
-			iavf_fill_ctx_desc_tunnelling_field(&low_ctx_qw0, pkt[0]);
 		}
 
 		__m512i desc0_3 =
-- 
2.55.0



More information about the stable mailing list