patch 'net/ice: fix VLAN tag reporting on Rx' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Oct 31 15:32:49 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/6dda64fea0d806098c80f7c17823ce9ebb3de13c

Thanks.

Kevin

---
>From 6dda64fea0d806098c80f7c17823ce9ebb3de13c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 7 Aug 2025 20:08:26 +0100
Subject: [PATCH] net/ice: fix VLAN tag reporting on Rx

[ upstream commit fba64e026d03f4926e1ddc15a2128b8447b73d69 ]

The ice driver expects the first, or outer, VLAN tag in a packet to be
written to the L2TAG1 field of the descriptor, as configured by the
l2tsel field when configuring the queue context initially for the
device. However, when configuring the actual VLAN or QinQ strip
behaviour, that l2tsel field was changed, sending the single/outer vlan
tag to the L2TAG2 field in the descriptor. This meant that it was not
getting picked up correctly by the Rx paths.

This issue has been around for a long time, but was previously
partially hidden by the issue fixed in [1], since due to that bug,
the l2tsel field was not getting overridden in the single-queue case
(since the single queue was the final queue).

Fix the issue by just removing the code updating the l2tsel field, and
leave it as set by default in the initial queue configuration.

[1] commit 4cd8c72f661c ("net/ice: fix inconsistency in Rx queue VLAN tag placement")

Fixes: de5da9d16430 ("net/ice: support double VLAN")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
---
 drivers/net/ice/ice_ethdev.c | 83 ++----------------------------------
 1 file changed, 3 insertions(+), 80 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2929f1253d..ada0558863 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -69,12 +69,4 @@ static const char * const ice_valid_args[] = {
 #define ICE_MAX_NUM_VSIS          (768UL)
 
-/* The 119 bit offset of the LAN Rx queue context is the L2TSEL control bit. */
-#define ICE_L2TSEL_QRX_CONTEXT_REG_IDX	3
-#define ICE_L2TSEL_BIT_OFFSET		   23
-enum ice_l2tsel {
-	ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG2_2ND,
-	ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG1,
-};
-
 struct proto_xtr_ol_flag {
 	const struct rte_mbuf_dynflag param;
@@ -4974,40 +4966,4 @@ ice_vsi_config_vlan_stripping(struct ice_vsi *vsi, bool ena)
 }
 
-/**
- * ice_vsi_update_l2tsel - update l2tsel field for all Rx rings on this VSI
- * @vsi: VSI used to update l2tsel on
- * @l2tsel: l2tsel setting requested
- *
- * Use the l2tsel setting to update all of the Rx queue context bits for l2tsel.
- * This will modify which descriptor field the first offloaded VLAN will be
- * stripped into.
- */
-static void ice_vsi_update_l2tsel(struct ice_vsi *vsi, enum ice_l2tsel l2tsel)
-{
-	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
-	struct ice_pf *pf = ICE_VSI_TO_PF(vsi);
-	struct rte_eth_dev_data *dev_data = pf->dev_data;
-	u32 l2tsel_bit;
-	uint16_t i;
-
-	if (l2tsel == ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG2_2ND)
-		l2tsel_bit = 0;
-	else
-		l2tsel_bit = BIT(ICE_L2TSEL_BIT_OFFSET);
-
-	for (i = 0; i < dev_data->nb_rx_queues; i++) {
-		u32 qrx_context_offset;
-		u32 regval;
-
-		qrx_context_offset =
-			QRX_CONTEXT(ICE_L2TSEL_QRX_CONTEXT_REG_IDX, i);
-
-		regval = rd32(hw, qrx_context_offset);
-		regval &= ~BIT(ICE_L2TSEL_BIT_OFFSET);
-		regval |= l2tsel_bit;
-		wr32(hw, qrx_context_offset, regval);
-	}
-}
-
 /* Configure outer vlan stripping on or off in QinQ mode */
 static int
@@ -5016,5 +4972,4 @@ ice_vsi_config_outer_vlan_stripping(struct ice_vsi *vsi, bool on)
 	uint16_t outer_ethertype = vsi->adapter->pf.outer_ethertype;
 	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
-	int err = 0;
 
 	if (vsi->vsi_id >= ICE_MAX_NUM_VSIS) {
@@ -5028,39 +4983,7 @@ ice_vsi_config_outer_vlan_stripping(struct ice_vsi *vsi, bool on)
 	}
 
-	if (on) {
-		err = ice_vsi_ena_outer_stripping(vsi, outer_ethertype);
-		if (!err) {
-			enum ice_l2tsel l2tsel =
-				ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG2_2ND;
-
-			/* PF tells the VF that the outer VLAN tag is always
-			 * extracted to VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2_2 and
-			 * inner is always extracted to
-			 * VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1. This is needed to
-			 * support outer stripping so the first tag always ends
-			 * up in L2TAG2_2ND and the second/inner tag, if
-			 * enabled, is extracted in L2TAG1.
-			 */
-			ice_vsi_update_l2tsel(vsi, l2tsel);
-		}
-	} else {
-		err = ice_vsi_dis_outer_stripping(vsi);
-		if (!err) {
-			enum ice_l2tsel l2tsel =
-				ICE_L2TSEL_EXTRACT_FIRST_TAG_L2TAG1;
-
-			/* PF tells the VF that the outer VLAN tag is always
-			 * extracted to VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2_2 and
-			 * inner is always extracted to
-			 * VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1. This is needed to
-			 * support inner stripping while outer stripping is
-			 * disabled so that the first and only tag is extracted
-			 * in L2TAG1.
-			 */
-			ice_vsi_update_l2tsel(vsi, l2tsel);
-		}
-	}
-
-	return err;
+	return on ?
+		ice_vsi_ena_outer_stripping(vsi, outer_ethertype) :
+		ice_vsi_dis_outer_stripping(vsi);
 }
 
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-31 13:53:53.743721558 +0000
+++ 0047-net-ice-fix-VLAN-tag-reporting-on-Rx.patch	2025-10-31 13:53:52.152523730 +0000
@@ -1 +1 @@
-From fba64e026d03f4926e1ddc15a2128b8447b73d69 Mon Sep 17 00:00:00 2001
+From 6dda64fea0d806098c80f7c17823ce9ebb3de13c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fba64e026d03f4926e1ddc15a2128b8447b73d69 ]
+
@@ -25 +26,0 @@
-Cc: stable at dpdk.org
@@ -30 +31 @@
- drivers/net/intel/ice/ice_ethdev.c | 83 ++----------------------------
+ drivers/net/ice/ice_ethdev.c | 83 ++----------------------------------
@@ -33,5 +34,5 @@
-diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
-index 513777e372..6c65a8341a 100644
---- a/drivers/net/intel/ice/ice_ethdev.c
-+++ b/drivers/net/intel/ice/ice_ethdev.c
-@@ -66,12 +66,4 @@ static const char * const ice_valid_args[] = {
+diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
+index 2929f1253d..ada0558863 100644
+--- a/drivers/net/ice/ice_ethdev.c
++++ b/drivers/net/ice/ice_ethdev.c
+@@ -69,12 +69,4 @@ static const char * const ice_valid_args[] = {
@@ -50 +51 @@
-@@ -4966,40 +4958,4 @@ ice_vsi_config_vlan_stripping(struct ice_vsi *vsi, bool ena)
+@@ -4974,40 +4966,4 @@ ice_vsi_config_vlan_stripping(struct ice_vsi *vsi, bool ena)
@@ -76 +76,0 @@
--		const struct ci_rx_queue *rxq = dev_data->rx_queues[i];
@@ -80 +80,2 @@
--		qrx_context_offset = QRX_CONTEXT(ICE_L2TSEL_QRX_CONTEXT_REG_IDX, rxq->reg_idx);
+-		qrx_context_offset =
+-			QRX_CONTEXT(ICE_L2TSEL_QRX_CONTEXT_REG_IDX, i);
@@ -91 +92 @@
-@@ -5008,5 +4964,4 @@ ice_vsi_config_outer_vlan_stripping(struct ice_vsi *vsi, bool on)
+@@ -5016,5 +4972,4 @@ ice_vsi_config_outer_vlan_stripping(struct ice_vsi *vsi, bool on)
@@ -97 +98 @@
-@@ -5020,39 +4975,7 @@ ice_vsi_config_outer_vlan_stripping(struct ice_vsi *vsi, bool on)
+@@ -5028,39 +4983,7 @@ ice_vsi_config_outer_vlan_stripping(struct ice_vsi *vsi, bool on)



More information about the stable mailing list