patch 'net/iavf: fix VLAN tag placement logic' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:00:29 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. 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/86b7f01ae78f47909a425b5c1927c64eb8f52d2f
Thanks.
Kevin
---
>From 86b7f01ae78f47909a425b5c1927c64eb8f52d2f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 3 Sep 2026 15:37:24 +0100
Subject: [PATCH] net/iavf: fix VLAN tag placement logic
[ upstream commit 75b96d693ace6962496d9c0f9b4bd46b63d7a8d9 ]
Depending on what is reported by the PF to the VF the VLAN tag or VLAN +
QinQ tags can be in either the L2Tag1 or the L2Tag2 fields. This needs
to be taken into account when reading the vlan tags from the flex
descriptors, rather than assuming that the tag is always present in a
fixed location.
Fixes: 1e728b01120c ("net/iavf: rework Tx path")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.c | 49 +++++++++++++++---------------
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 9b8ef209f6..5bc8b40ccf 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -1154,31 +1154,30 @@ iavf_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ci_rx_desc *rxdp)
static inline void
iavf_flex_rxd_to_vlan_tci(struct rte_mbuf *mb,
- volatile union ci_rx_flex_desc *rxdp)
+ volatile union ci_rx_flex_desc *rxdp,
+ uint8_t rx_flags)
{
- if (rte_le_to_cpu_64(rxdp->wb.status_error0) &
- (1 << IAVF_RX_FLEX_DESC_STATUS0_L2TAG1P_S)) {
- mb->ol_flags |= RTE_MBUF_F_RX_VLAN |
- RTE_MBUF_F_RX_VLAN_STRIPPED;
- mb->vlan_tci =
- rte_le_to_cpu_16(rxdp->wb.l2tag1);
- } else {
- mb->vlan_tci = 0;
- }
-
- if (rte_le_to_cpu_16(rxdp->wb.status_error1) &
- (1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S)) {
- 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;
+ bool l2tag1_valid = rte_le_to_cpu_16(rxdp->wb.status_error0) &
+ (1 << IAVF_RX_FLEX_DESC_STATUS0_L2TAG1P_S);
+ bool l2tag2_valid = rte_le_to_cpu_16(rxdp->wb.status_error1) &
+ (1 << IAVF_RX_FLEX_DESC_STATUS1_L2TAG2P_S);
+ if (l2tag1_valid && l2tag2_valid) {
+ mb->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED |
+ RTE_MBUF_F_RX_QINQ | RTE_MBUF_F_RX_QINQ_STRIPPED;
+ /* with both tags, the rx_flags say which is outer vs inner */
+ if (rx_flags & IAVF_RX_FLAGS_VLAN_TAG_LOC_L2TAG2_2) {
+ mb->vlan_tci_outer = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);
+ mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag1);
} 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_outer = rte_le_to_cpu_16(rxdp->wb.l2tag1);
+ mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);
}
- mb->vlan_tci = rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd);
- PMD_RX_LOG(DEBUG, "Descriptor l2tag2_1: %u, l2tag2_2: %u",
- rte_le_to_cpu_16(rxdp->wb.l2tag2_1st),
- rte_le_to_cpu_16(rxdp->wb.l2tag2_2nd));
+ } else if (l2tag1_valid || l2tag2_valid) {
+ mb->ol_flags |= RTE_MBUF_F_RX_VLAN | RTE_MBUF_F_RX_VLAN_STRIPPED;
+ mb->vlan_tci_outer = 0;
+ mb->vlan_tci = rte_le_to_cpu_16(
+ l2tag1_valid ? rxdp->wb.l2tag1 : rxdp->wb.l2tag2_2nd);
} else {
mb->vlan_tci_outer = 0;
+ mb->vlan_tci = 0;
}
}
@@ -1567,5 +1566,5 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
rxm->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
- iavf_flex_rxd_to_vlan_tci(rxm, &rxd);
+ iavf_flex_rxd_to_vlan_tci(rxm, &rxd, rxq->rx_flags);
iavf_flex_rxd_to_ipsec_crypto_status(rxm, &rxd,
&rxq->stats->ipsec_crypto);
@@ -1734,5 +1733,5 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
first_seg->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
- iavf_flex_rxd_to_vlan_tci(first_seg, &rxd);
+ iavf_flex_rxd_to_vlan_tci(first_seg, &rxd, rxq->rx_flags);
iavf_flex_rxd_to_ipsec_crypto_status(first_seg, &rxd,
&rxq->stats->ipsec_crypto);
@@ -2016,5 +2015,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct ci_rx_queue *rxq,
mb->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
rte_le_to_cpu_16(rxdp[j].wb.ptype_flex_flags0)];
- iavf_flex_rxd_to_vlan_tci(mb, &rxdp[j]);
+ iavf_flex_rxd_to_vlan_tci(mb, &rxdp[j], rxq->rx_flags);
iavf_flex_rxd_to_ipsec_crypto_status(mb, &rxdp[j],
&rxq->stats->ipsec_crypto);
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:42.215257558 +0000
+++ 0103-net-iavf-fix-VLAN-tag-placement-logic.patch 2026-12-03 12:52:39.096982932 +0000
@@ -1 +1 @@
-From 75b96d693ace6962496d9c0f9b4bd46b63d7a8d9 Mon Sep 17 00:00:00 2001
+From 86b7f01ae78f47909a425b5c1927c64eb8f52d2f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75b96d693ace6962496d9c0f9b4bd46b63d7a8d9 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index d65a518f8e..39bcbebf56 100644
+index 9b8ef209f6..5bc8b40ccf 100644
@@ -25 +26 @@
-@@ -1152,31 +1152,30 @@ iavf_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ci_rx_desc *rxdp)
+@@ -1154,31 +1154,30 @@ iavf_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ci_rx_desc *rxdp)
@@ -78 +79 @@
-@@ -1565,5 +1564,5 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
+@@ -1567,5 +1566,5 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
@@ -85 +86 @@
-@@ -1732,5 +1731,5 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1734,5 +1733,5 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -92 +93 @@
-@@ -2014,5 +2013,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct ci_rx_queue *rxq,
+@@ -2016,5 +2015,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct ci_rx_queue *rxq,
More information about the stable
mailing list