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 0DF0246BAE for ; Fri, 18 Jul 2025 21:38:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09A6540E42; Fri, 18 Jul 2025 21:38:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E71A740E42 for ; Fri, 18 Jul 2025 21:38:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867489; 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=gkSSzUnfpQ8iBcP2OLCMkfBwRZ453y3gIcwUaPPJGWY=; b=WUQr1LZtGIzM47e1tww0HF9Dd5upqsAOju3dpAF0xehGvTRLyl4h1x/VRJ4SodLGzE2qcG nLaoL8mCNgaa1SSJ/vYyyF9+3YNxj6ox68iHmJv076fizQkNbnH+4WjO87wgYARqQ6noDf lZhLfAN9wIwxE+UnJZKoWS5wJ+AbkWs= Received: from mx-prod-mc-01.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-9-ehcwIctzN4CMoqo8OQ2wSA-1; Fri, 18 Jul 2025 15:38:02 -0400 X-MC-Unique: ehcwIctzN4CMoqo8OQ2wSA-1 X-Mimecast-MFC-AGG-ID: ehcwIctzN4CMoqo8OQ2wSA_1752867480 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2677C195FDD9; Fri, 18 Jul 2025 19:38:00 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D35B8180045B; Fri, 18 Jul 2025 19:37:58 +0000 (UTC) From: Kevin Traynor To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: restrict VLAN strip configuration on VF' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:31:22 +0100 Message-ID: <20250718193247.1008129-148-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 8JfzE7_tThlqcqeOhJSZGChgIjSrXoBeySDj44kdYMA_1752867480 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/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/6554f3a1b18a64fca2bbdb9d4ae9f2941ca2ec73 Thanks. Kevin --- >From 6554f3a1b18a64fca2bbdb9d4ae9f2941ca2ec73 Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Fri, 13 Jun 2025 16:41:57 +0800 Subject: [PATCH] net/txgbe: restrict VLAN strip configuration on VF [ upstream commit b8c3d76e790cb06b54469b71a1af822de50c790d ] Fix the same issue as PF in commit 66364efcf958 ("net/txgbe: restrict configuration of VLAN strip offload"). There is a hardware limitation that Rx ring config register is not writable when Rx ring is enabled, i.e. the TXGBE_RXCFG_ENA bit is set. But disabling the ring when there is traffic will cause ring get stuck. So restrict the configuration of VLAN strip offload only if device is started. Fixes: aa1ae7941e71 ("net/txgbe: support VF VLAN") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev_vf.c | 31 +++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c index d075f9d232..67e1dc696b 100644 --- a/drivers/net/txgbe/txgbe_ethdev_vf.c +++ b/drivers/net/txgbe/txgbe_ethdev_vf.c @@ -865,5 +865,5 @@ txgbevf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) static void -txgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) +txgbevf_vlan_strip_q_set(struct rte_eth_dev *dev, uint16_t queue, int on) { struct txgbe_hw *hw = TXGBE_DEV_HW(dev); @@ -876,18 +876,26 @@ txgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) ctrl = rd32(hw, TXGBE_RXCFG(queue)); - txgbe_dev_save_rx_queue(hw, queue); if (on) ctrl |= TXGBE_RXCFG_VLAN; else ctrl &= ~TXGBE_RXCFG_VLAN; - wr32(hw, TXGBE_RXCFG(queue), 0); - msec_delay(100); - txgbe_dev_store_rx_queue(hw, queue); - wr32m(hw, TXGBE_RXCFG(queue), - TXGBE_RXCFG_VLAN | TXGBE_RXCFG_ENA, ctrl); + wr32(hw, TXGBE_RXCFG(queue), ctrl); txgbe_vlan_hw_strip_bitmap_set(dev, queue, on); } +static void +txgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) +{ + struct txgbe_hw *hw = TXGBE_DEV_HW(dev); + + if (!hw->adapter_stopped) { + PMD_DRV_LOG(ERR, "Please stop port first"); + return; + } + + txgbevf_vlan_strip_q_set(dev, queue, on); +} + static int txgbevf_vlan_offload_config(struct rte_eth_dev *dev, int mask) @@ -902,5 +910,5 @@ txgbevf_vlan_offload_config(struct rte_eth_dev *dev, int mask) rxq = dev->data->rx_queues[i]; on = !!(rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP); - txgbevf_vlan_strip_queue_set(dev, i, on); + txgbevf_vlan_strip_q_set(dev, i, on); } } @@ -912,4 +920,11 @@ static int txgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask) { + struct txgbe_hw *hw = TXGBE_DEV_HW(dev); + + if (!hw->adapter_stopped && (mask & RTE_ETH_VLAN_STRIP_MASK)) { + PMD_DRV_LOG(ERR, "Please stop port first"); + return -EPERM; + } + txgbe_config_vlan_strip_on_all_queues(dev, mask); -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:16.195543614 +0100 +++ 0148-net-txgbe-restrict-VLAN-strip-configuration-on-VF.patch 2025-07-18 20:29:11.126907931 +0100 @@ -1 +1 @@ -From b8c3d76e790cb06b54469b71a1af822de50c790d Mon Sep 17 00:00:00 2001 +From 6554f3a1b18a64fca2bbdb9d4ae9f2941ca2ec73 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b8c3d76e790cb06b54469b71a1af822de50c790d ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index c0d8aa15b2..847febf8c3 100644 +index d075f9d232..67e1dc696b 100644 @@ -27 +28 @@ -@@ -936,5 +936,5 @@ txgbevf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) +@@ -865,5 +865,5 @@ txgbevf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) @@ -34 +35 @@ -@@ -947,18 +947,26 @@ txgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) +@@ -876,18 +876,26 @@ txgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on) @@ -67 +68 @@ -@@ -973,5 +981,5 @@ txgbevf_vlan_offload_config(struct rte_eth_dev *dev, int mask) +@@ -902,5 +910,5 @@ txgbevf_vlan_offload_config(struct rte_eth_dev *dev, int mask) @@ -74 +75 @@ -@@ -983,4 +991,11 @@ static int +@@ -912,4 +920,11 @@ static int