patch 'net/intel: fix assumption about tag placement order' has been queued to stable release 24.11.4
Kevin Traynor
ktraynor at redhat.com
Fri Oct 31 15:32:48 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/05/25. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3624bcf1ddfea8da6ed526319e44f980158076dd
Thanks.
Kevin
---
>From 3624bcf1ddfea8da6ed526319e44f980158076dd Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Fri, 18 Jul 2025 16:43:12 +0100
Subject: [PATCH] net/intel: fix assumption about tag placement order
[ upstream commit 21168355589ea9edfcb2925f4952ecb05470f92f ]
The specific placement of outer/inner VLAN tags in NIC descriptors
is configurable. Therefore, remove the assumption that if the L2Tag2
field is filled in, that the L2Tag1 must also be. Instead, check the
existing mbuf VLAN flags, and move tags and set flags as appropriate.
This fixes an issue where, with QinQ packets with different Tag ethtypes
(0x88a8 vs 0x8100), we get an mbuf reporting two valid tags, but only
having had one tag stripped.
Fixes: cc9d0456b870 ("i40e: support double vlan stripping and insertion")
Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 10 +++++++---
drivers/net/iavf/iavf_rxtx.c | 12 +++++++-----
drivers/net/ice/ice_rxtx.c | 10 +++++++---
3 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 0392c41005..4b0b3d0074 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -129,7 +129,11 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp)
if (rte_le_to_cpu_16(rxdp->wb.qword2.ext_status) &
(1 << I40E_RX_DESC_EXT_STATUS_L2TAG2P_SHIFT)) {
- mb->ol_flags |= RTE_MBUF_F_RX_QINQ_STRIPPED | RTE_MBUF_F_RX_QINQ |
- RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN;
- mb->vlan_tci_outer = mb->vlan_tci;
+ if ((mb->ol_flags & RTE_MBUF_F_RX_VLAN_STRIPPED) == 0) {
+ mb->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
+ } else {
+ /* if two tags, move Tag1 to outer tag field */
+ mb->ol_flags |= RTE_MBUF_F_RX_QINQ_STRIPPED | RTE_MBUF_F_RX_QINQ;
+ mb->vlan_tci_outer = mb->vlan_tci;
+ }
mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.qword2.l2tag2_2);
PMD_RX_LOG(DEBUG, "Descriptor l2tag2_1: %u, l2tag2_2: %u",
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index cce4917a3f..8fdf0f92e2 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1201,9 +1201,11 @@ iavf_flex_rxd_to_vlan_tci(struct rte_mbuf *mb,
if (rte_le_to_cpu_16(rxdp->wb.status_error1) &
(1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S)) {
- mb->ol_flags |= RTE_MBUF_F_RX_QINQ_STRIPPED |
- RTE_MBUF_F_RX_QINQ |
- RTE_MBUF_F_RX_VLAN_STRIPPED |
- RTE_MBUF_F_RX_VLAN;
- mb->vlan_tci_outer = mb->vlan_tci;
+ if ((mb->ol_flags & RTE_MBUF_F_RX_VLAN_STRIPPED) == 0) {
+ mb->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
+ } else {
+ /* if two tags, move Tag1 to outer tag field */
+ mb->ol_flags |= RTE_MBUF_F_RX_QINQ_STRIPPED | RTE_MBUF_F_RX_QINQ;
+ mb->vlan_tci_outer = mb->vlan_tci;
+ }
mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);
PMD_RX_LOG(DEBUG, "Descriptor l2tag2_1: %u, l2tag2_2: %u",
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f58df9bdfe..417dc80a3a 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1686,7 +1686,11 @@ ice_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ice_rx_flex_desc *rxdp)
if (rte_le_to_cpu_16(rxdp->wb.status_error1) &
(1 << ICE_RX_FLEX_DESC_STATUS1_L2TAG2P_S)) {
- mb->ol_flags |= RTE_MBUF_F_RX_QINQ_STRIPPED | RTE_MBUF_F_RX_QINQ |
- RTE_MBUF_F_RX_VLAN_STRIPPED | RTE_MBUF_F_RX_VLAN;
- mb->vlan_tci_outer = mb->vlan_tci;
+ if ((mb->ol_flags & RTE_MBUF_F_RX_VLAN_STRIPPED) == 0) {
+ mb->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
+ } else {
+ /* if two tags, move Tag1 to outer tag field */
+ mb->ol_flags |= RTE_MBUF_F_RX_QINQ_STRIPPED | RTE_MBUF_F_RX_QINQ;
+ mb->vlan_tci_outer = mb->vlan_tci;
+ }
mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);
PMD_RX_LOG(DEBUG, "Descriptor l2tag2_1: %u, l2tag2_2: %u",
--
2.51.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-10-31 13:53:53.712831057 +0000
+++ 0046-net-intel-fix-assumption-about-tag-placement-order.patch 2025-10-31 13:53:52.148523718 +0000
@@ -1 +1 @@
-From 21168355589ea9edfcb2925f4952ecb05470f92f Mon Sep 17 00:00:00 2001
+From 3624bcf1ddfea8da6ed526319e44f980158076dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21168355589ea9edfcb2925f4952ecb05470f92f ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -22,3 +23,3 @@
- drivers/net/intel/i40e/i40e_rxtx.c | 10 +++++++---
- drivers/net/intel/iavf/iavf_rxtx.c | 12 +++++++-----
- drivers/net/intel/ice/ice_rxtx.c | 10 +++++++---
+ drivers/net/i40e/i40e_rxtx.c | 10 +++++++---
+ drivers/net/iavf/iavf_rxtx.c | 12 +++++++-----
+ drivers/net/ice/ice_rxtx.c | 10 +++++++---
@@ -27,5 +28,5 @@
-diff --git a/drivers/net/intel/i40e/i40e_rxtx.c b/drivers/net/intel/i40e/i40e_rxtx.c
-index b149a4c127..50b74149e3 100644
---- a/drivers/net/intel/i40e/i40e_rxtx.c
-+++ b/drivers/net/intel/i40e/i40e_rxtx.c
-@@ -129,7 +129,11 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ci_rx_desc *rxdp)
+diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
+index 0392c41005..4b0b3d0074 100644
+--- a/drivers/net/i40e/i40e_rxtx.c
++++ b/drivers/net/i40e/i40e_rxtx.c
+@@ -129,7 +129,11 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp)
@@ -46,5 +47,5 @@
-diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
-index 50adc7ea1a..982e16f929 100644
---- a/drivers/net/intel/iavf/iavf_rxtx.c
-+++ b/drivers/net/intel/iavf/iavf_rxtx.c
-@@ -1185,9 +1185,11 @@ iavf_flex_rxd_to_vlan_tci(struct rte_mbuf *mb,
+diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
+index cce4917a3f..8fdf0f92e2 100644
+--- a/drivers/net/iavf/iavf_rxtx.c
++++ b/drivers/net/iavf/iavf_rxtx.c
+@@ -1201,9 +1201,11 @@ iavf_flex_rxd_to_vlan_tci(struct rte_mbuf *mb,
@@ -67,5 +68,5 @@
-diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
-index 5e72c231f7..aa8b838955 100644
---- a/drivers/net/intel/ice/ice_rxtx.c
-+++ b/drivers/net/intel/ice/ice_rxtx.c
-@@ -1836,7 +1836,11 @@ ice_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ci_rx_flex_desc *rxdp)
+diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
+index f58df9bdfe..417dc80a3a 100644
+--- a/drivers/net/ice/ice_rxtx.c
++++ b/drivers/net/ice/ice_rxtx.c
+@@ -1686,7 +1686,11 @@ ice_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ice_rx_flex_desc *rxdp)
More information about the stable
mailing list