patch 'net/mlx5: skip Rx control flow tables in isolated mode' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Nov 21 12:21:18 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/26/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/d288d0f9a1919f6c676573408bdbec9115102b03

Thanks.

Kevin

---
>From d288d0f9a1919f6c676573408bdbec9115102b03 Mon Sep 17 00:00:00 2001
From: Nupur Uttarwar <nuttarwar at nvidia.com>
Date: Mon, 17 Nov 2025 07:05:57 +0200
Subject: [PATCH] net/mlx5: skip Rx control flow tables in isolated mode

[ upstream commit 327682174e1a282c1351c83aacd2b9e8f8d352f2 ]

If flow isolation is enabled, then skip flow_hw_create_ctrl_rx_tables
because these are not used with flow isolation. This is used to save
the unneeded resource allocation and also speed up the device startup
time.

Fixes: 9fa7c1cddb85 ("net/mlx5: create control flow rules with HWS")

Signed-off-by: Nupur Uttarwar <nuttarwar at nvidia.com>
Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    |  2 ++
 drivers/net/mlx5/mlx5_flow_hw.c | 17 ++++-------------
 drivers/net/mlx5/mlx5_trigger.c | 14 +++++++++++++-
 3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index bb11ad204e..ee6ad206b8 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -2998,4 +2998,6 @@ struct mlx5_flow_hw_ctrl_fdb {
 
 int mlx5_flow_hw_ctrl_flows(struct rte_eth_dev *dev, uint32_t flags);
+int mlx5_flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev);
+void mlx5_flow_hw_cleanup_ctrl_rx_tables(struct rte_eth_dev *dev);
 
 /** Create a control flow rule for matching unicast DMAC with VLAN (Verbs and DV). */
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 11ea9ae152..9bd237b82a 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -10990,6 +10990,6 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
 }
 
-static void
-flow_hw_cleanup_ctrl_rx_tables(struct rte_eth_dev *dev)
+void
+mlx5_flow_hw_cleanup_ctrl_rx_tables(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
@@ -11276,6 +11276,6 @@ flow_hw_create_ctrl_rx_pattern_template
 }
 
-static int
-flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev)
+int
+mlx5_flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
@@ -11313,6 +11313,4 @@ flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev)
 err:
 	ret = rte_errno;
-	flow_hw_cleanup_ctrl_rx_tables(dev);
-	rte_errno = ret;
 	return -ret;
 }
@@ -11508,5 +11506,4 @@ __flow_hw_resource_release(struct rte_eth_dev *dev, bool ctx_close)
 	flow_hw_cleanup_ctrl_fdb_tables(dev);
 	flow_hw_cleanup_tx_repr_tagging(dev);
-	flow_hw_cleanup_ctrl_rx_tables(dev);
 	flow_hw_action_template_drop_release(dev);
 	grp = LIST_FIRST(&priv->flow_hw_grp);
@@ -11865,10 +11862,4 @@ __flow_hw_configure(struct rte_eth_dev *dev,
 	if (ret)
 		goto err;
-	ret = flow_hw_create_ctrl_rx_tables(dev);
-	if (ret) {
-		rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-				   "Failed to set up Rx control flow templates");
-		goto err;
-	}
 	/* Initialize quotas */
 	if (port_attr->nb_quotas || (host_priv && host_priv->quota_ctx.devx_obj)) {
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index e2a94ca14c..dbb34ee2f2 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1539,4 +1539,10 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
 	if (priv->isolated)
 		return 0;
+	ret = mlx5_flow_hw_create_ctrl_rx_tables(dev);
+	if (ret) {
+		DRV_LOG(ERR, "Failed to set up Rx control flow templates for port %u, %d",
+			dev->data->port_id, -ret);
+		goto error;
+	}
 	if (dev->data->promiscuous)
 		flags |= MLX5_CTRL_PROMISCUOUS;
@@ -1552,4 +1558,5 @@ error:
 	ret = rte_errno;
 	mlx5_flow_hw_flush_ctrl_flows(dev);
+	mlx5_flow_hw_cleanup_ctrl_rx_tables(dev);
 	rte_errno = ret;
 	return -rte_errno;
@@ -1786,6 +1793,11 @@ mlx5_traffic_disable(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	if (priv->sh->config.dv_flow_en == 2)
+	if (priv->sh->config.dv_flow_en == 2) {
+		/* Device started flag was cleared before, this is used to derefer the Rx queues. */
+		priv->hws_rule_flushing = true;
 		mlx5_flow_hw_flush_ctrl_flows(dev);
+		mlx5_flow_hw_cleanup_ctrl_rx_tables(dev);
+		priv->hws_rule_flushing = false;
+	}
 	else
 #endif
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-11-21 11:05:12.494490215 +0000
+++ 0094-net-mlx5-skip-Rx-control-flow-tables-in-isolated-mod.patch	2025-11-21 11:05:09.631201886 +0000
@@ -1 +1 @@
-From 327682174e1a282c1351c83aacd2b9e8f8d352f2 Mon Sep 17 00:00:00 2001
+From d288d0f9a1919f6c676573408bdbec9115102b03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 327682174e1a282c1351c83aacd2b9e8f8d352f2 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 8159008504..d7c9d4d0ea 100644
+index bb11ad204e..ee6ad206b8 100644
@@ -27 +28 @@
-@@ -3055,4 +3055,6 @@ struct mlx5_flow_hw_ctrl_nic {
+@@ -2998,4 +2998,6 @@ struct mlx5_flow_hw_ctrl_fdb {
@@ -35 +36 @@
-index 2695d047c7..c60f836de4 100644
+index 11ea9ae152..9bd237b82a 100644
@@ -38 +39 @@
-@@ -11184,6 +11184,6 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
+@@ -10990,6 +10990,6 @@ flow_hw_create_vlan(struct rte_eth_dev *dev)
@@ -47 +48 @@
-@@ -11470,6 +11470,6 @@ flow_hw_create_ctrl_rx_pattern_template
+@@ -11276,6 +11276,6 @@ flow_hw_create_ctrl_rx_pattern_template
@@ -56 +57 @@
-@@ -11507,6 +11507,4 @@ flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev)
+@@ -11313,6 +11313,4 @@ flow_hw_create_ctrl_rx_tables(struct rte_eth_dev *dev)
@@ -63,2 +64,2 @@
-@@ -11707,5 +11705,4 @@ __flow_hw_resource_release(struct rte_eth_dev *dev, bool ctx_close)
- 	flow_hw_cleanup_ctrl_nic_tables(dev);
+@@ -11508,5 +11506,4 @@ __flow_hw_resource_release(struct rte_eth_dev *dev, bool ctx_close)
+ 	flow_hw_cleanup_ctrl_fdb_tables(dev);
@@ -69 +70 @@
-@@ -12065,10 +12062,4 @@ __flow_hw_configure(struct rte_eth_dev *dev,
+@@ -11865,10 +11862,4 @@ __flow_hw_configure(struct rte_eth_dev *dev,
@@ -81 +82 @@
-index 9aa36ae9a8..028844e45d 100644
+index e2a94ca14c..dbb34ee2f2 100644
@@ -84 +85 @@
-@@ -1677,4 +1677,10 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
+@@ -1539,4 +1539,10 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
@@ -95 +96 @@
-@@ -1690,4 +1696,5 @@ error:
+@@ -1552,4 +1558,5 @@ error:
@@ -101 +102 @@
-@@ -1930,6 +1937,11 @@ mlx5_traffic_disable(struct rte_eth_dev *dev)
+@@ -1786,6 +1793,11 @@ mlx5_traffic_disable(struct rte_eth_dev *dev)



More information about the stable mailing list