Skip to contentSkip to conversation

net/ice: fix inconsistency in Rx queue VLAN tag placement

PATCH In review Bruce Richardson 2 participants 3 messages Jun 27, 2025 – Jul 1, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix inconsistency in Rx queue VLAN tag placement

When VLAN or QinQ stripping is enabled in the ice driver, an inconsistency was observed between the placement of the VLAN tag in the descriptors of the final Rx queue (irrespective of the number of queues) vs descriptors of all other queues. This inconsistency was due to the fact that the driver - when updating l2tsel (L2 tag selection) field - used the queue id, rather than the register index for the queue. Queue 0 is normally HW queue 1, etc., meaning the final queue never had its field updated.

Fixes de5da9d16430 ("net/ice: support double VLAN")
---
 drivers/net/intel/ice/ice_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/ice/ice_ethdev.c +2 -2
index 680e7724cd..513777e372 100644
@@ -4988,11 +4988,11 @@ static void ice_vsi_update_l2tsel(struct ice_vsi *vsi, enum ice_l2tsel l2tsel)
 		l2tsel_bit = BIT(ICE_L2TSEL_BIT_OFFSET);
 
 	for (i = 0; i < dev_data->nb_rx_queues; i++) {
+		const struct ci_rx_queue *rxq = dev_data->rx_queues[i];
 		u32 qrx_context_offset;
 		u32 regval;
 
-		qrx_context_offset =
-			QRX_CONTEXT(ICE_L2TSEL_QRX_CONTEXT_REG_IDX, i);
+		qrx_context_offset = QRX_CONTEXT(ICE_L2TSEL_QRX_CONTEXT_REG_IDX, rxq->reg_idx);
 
 		regval = rd32(hw, qrx_context_offset);
 		regval &= ~BIT(ICE_L2TSEL_BIT_OFFSET);
Signature · 1 line
2.48.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Bruce Richardson

When VLAN or QinQ stripping is enabled in the ice driver, an inconsistency was observed between the placement of the VLAN tag in the descriptors of the final Rx queue (irrespective of the number of queues) vs descriptors of all other queues. This inconsistency was due to the fact that the driver - when updating l2tsel (L2 tag selection) field - used the queue id, rather than the register index for the queue. Queue 0 is normally HW queue 1, etc., meaning the final queue never had its field updated.

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

---

Signature · 2 lines
Thanks,
Anatoly
author Applied
#2 lore raw
Quoted 10 lines · Anatoly
Quoted 9 lines · Bruce Richardson

When VLAN or QinQ stripping is enabled in the ice driver, an inconsistency was observed between the placement of the VLAN tag in the descriptors of the final Rx queue (irrespective of the number of queues) vs descriptors of all other queues. This inconsistency was due to the fact that the driver - when updating l2tsel (L2 tag selection) field - used the queue id, rather than the register index for the queue. Queue 0 is normally HW queue 1, etc., meaning the final queue never had its field updated.

Quoted 8 lines
Quoted 5 lines
Fixes de5da9d16430 ("net/ice: support double VLAN")

---

Applied to dpdk-next-net-intel

/Bruce