From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
stable@dpdk.org,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Zhichao Zeng <zhichaox.zeng@intel.com>,
Yiding Zhou <yidingx.zhou@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>
Subject: [PATCH 6/7] net/iavf: fix missing outer QinQ tag for tunnelled packets
Date: Mon, 31 Aug 2026 11:26:19 +0100 [thread overview]
Message-ID: <20260831102621.495759-7-bruce.richardson@intel.com> (raw)
In-Reply-To: <20260831102621.495759-1-bruce.richardson@intel.com>
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@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 6 ++++--
drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
index 715805c65a..d05e6101ad 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c
@@ -1969,6 +1969,8 @@ ctx_vtx(volatile struct ci_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_tunneling_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 :
@@ -1990,6 +1992,8 @@ ctx_vtx(volatile struct ci_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_tunneling_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 :
@@ -2012,8 +2016,6 @@ ctx_vtx(volatile struct ci_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_tunneling_field(&low_ctx_qw1, pkt[1]);
- iavf_fill_ctx_desc_tunneling_field(&low_ctx_qw0, pkt[0]);
}
__m256i desc2_3 =
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
index dfbbea80f7..bae9b2af9c 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c
@@ -2111,6 +2111,8 @@ ctx_vtx(volatile struct ci_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 :
@@ -2131,6 +2133,8 @@ ctx_vtx(volatile struct ci_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 :
@@ -2151,8 +2155,6 @@ ctx_vtx(volatile struct ci_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.53.0
next prev parent reply other threads:[~2026-08-31 10:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 10:26 [PATCH 0/7] VLAN and QinQ fixes for iavf Bruce Richardson
2026-08-31 10:26 ` [PATCH 1/7] net/iavf: disable broken QinQ strip on Rx Bruce Richardson
2026-09-03 13:58 ` Loftus, Ciara
2026-08-31 10:26 ` [PATCH 2/7] net/iavf: fix VLAN tag placement logic Bruce Richardson
2026-09-03 13:59 ` Loftus, Ciara
2026-08-31 10:26 ` [PATCH 3/7] net/iavf: fix VLAN outer TPID setting on Tx Bruce Richardson
2026-09-03 12:58 ` Loftus, Ciara
2026-09-03 14:27 ` Bruce Richardson
2026-08-31 10:26 ` [PATCH 4/7] net/intel: fix unclear enum names Bruce Richardson
2026-09-03 14:01 ` Loftus, Ciara
2026-08-31 10:26 ` [PATCH 5/7] net/intel: fix VLAN and QinQ tag position logic Bruce Richardson
2026-09-03 14:04 ` Loftus, Ciara
2026-08-31 10:26 ` Bruce Richardson [this message]
2026-09-03 14:07 ` [PATCH 6/7] net/iavf: fix missing outer QinQ tag for tunnelled packets Loftus, Ciara
2026-08-31 10:26 ` [PATCH 7/7] net/iavf: remove undocumented conditional macros Bruce Richardson
2026-08-31 10:58 ` David Marchand
2026-08-31 11:01 ` Bruce Richardson
2026-09-03 14:15 ` Loftus, Ciara
2026-09-03 14:37 ` [PATCH v2 0/7] VLAN and QinQ fixes for iavf Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 1/7] net/iavf: disable broken QinQ strip on Rx Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 2/7] net/iavf: fix VLAN tag placement logic Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 3/7] net/iavf: fix VLAN outer TPID setting on Tx Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 4/7] net/intel: fix unclear enum names Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 5/7] net/intel: fix VLAN and QinQ tag position logic Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 6/7] net/iavf: fix missing outer QinQ tag for tunnelled packets Bruce Richardson
2026-09-03 14:37 ` [PATCH v2 7/7] net/iavf: remove undocumented conditional macros Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260831102621.495759-7-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=vladimir.medvedkin@intel.com \
--cc=yidingx.zhou@intel.com \
--cc=zhichaox.zeng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox