patch 'net/txgbe: restrict VLAN strip configuration on VF' has been queued to stable release 24.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Jul 18 21:31:22 CEST 2025
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 <jiawenwu at trustnetic.com>
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 <jiawenwu at trustnetic.com>
---
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 at 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
More information about the stable
mailing list