From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F420248A44 for ; Fri, 31 Oct 2025 15:37:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBEC840150; Fri, 31 Oct 2025 15:37:14 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 99D4940150 for ; Fri, 31 Oct 2025 15:37:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761921433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dZo1ikOgaT8blrTlh8CFbzONURGT+DbsIQvCk8dHZxk=; b=gDO8YnBYeKlIZ/E6Q6IKGeKwLxy7syQzvPl6q9tzu75+Gb8Ph4m0bBDh+yrgErdiunoRuN xF9AE2RXSlzW8SapdI/9zVj3Vvv7a9Obz461PRooAzCWwOREotMVTSy/BO3VNrHAxbAnvv vi9YyoRiefCZdWsbqJsJ8yR5E+bPF5I= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-bTChY9gQMgiNTq0GVO-6hw-1; Fri, 31 Oct 2025 10:37:09 -0400 X-MC-Unique: bTChY9gQMgiNTq0GVO-6hw-1 X-Mimecast-MFC-AGG-ID: bTChY9gQMgiNTq0GVO-6hw_1761921428 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7BF9519560B7; Fri, 31 Oct 2025 14:37:08 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.50]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EA6C1180044F; Fri, 31 Oct 2025 14:37:06 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Ciara Loftus , dpdk stable Subject: patch 'net/ice: fix VLAN tag reporting on Rx' has been queued to stable release 24.11.4 Date: Fri, 31 Oct 2025 14:32:49 +0000 Message-ID: <20251031143421.324432-47-ktraynor@redhat.com> In-Reply-To: <20251031143421.324432-1-ktraynor@redhat.com> References: <20251031143421.324432-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lKPCdTOTNXoFs2SI2e2eNrhjWiwe6RSqu0E0XLF4bBg_1761921428 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Ciara Loftus --- 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@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)