patch 'net/mlx5: fix HWS meter ASO SQ leak on multi-port init' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:03:00 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. 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/3a162e456d9bd6e139f29c0f484d6ace88d373bb

Thanks.

Kevin

---
>From 3a162e456d9bd6e139f29c0f484d6ace88d373bb Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Sun, 18 Oct 2026 11:55:09 +0300
Subject: [PATCH] net/mlx5: fix HWS meter ASO SQ leak on multi-port init

[ upstream commit d94b526e08a37bc4890dc8de2aaad6698620ce3e ]

When multiple ports on the same device initialize HWS meters via
rte_flow_configure(), mlx5_aso_mtr_queue_init() recreates the shared
pools_mng ASO send queue without destroying the previous one. Each
additional port with meters configured leaks one SQ/CQ pair until the
shared device context is torn down.

This is observed as steady growth of hugepage allocations (dump
socket_mem count alloc) when repeatedly attaching and detaching a device
with multiple SF representors configured with meters in HWS mode.

Create pools_mng.sq only when its DevX object is missing. A send-queue
id of zero is valid, so sqn cannot be used as the existence check.

Do not destroy that queue from mlx5_flow_meter_uninit(). It is shared
by every port on the device, and releasing it when one port closes
breaks meters still configured on the others. The queue is released
with the shared context in mlx5_aso_flow_mtrs_mng_close().

Fixes: 24865366e495 ("net/mlx5: support flow meter action for HWS")

Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_aso.c   | 7 ++++++-
 drivers/net/mlx5/mlx5_flow_meter.c | 6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_aso.c b/drivers/net/mlx5/mlx5_flow_aso.c
index 5e2a81ef9c..8f95a8f5e6 100644
--- a/drivers/net/mlx5/mlx5_flow_aso.c
+++ b/drivers/net/mlx5/mlx5_flow_aso.c
@@ -319,5 +319,10 @@ mlx5_aso_mtr_queue_init(struct mlx5_dev_ctx_shared *sh,
 		hws_pool->nb_sq = nb_queues;
 	}
-	if (pool_mng) {
+	/*
+	 * pools_mng->sq is shared by every port on the device.
+	 * A send-queue id of zero is valid, so the DevX object pointer
+	 * is the indicator that the queue was already created.
+	 */
+	if (pool_mng != NULL && pool_mng->sq.sq_obj.sq == NULL) {
 		if (mlx5_aso_sq_create(cdev, &pool_mng->sq,
 				       sh->tx_uar.obj,
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index cd6a804593..e5f5a39b36 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -62,5 +62,9 @@ mlx5_flow_meter_uninit(struct rte_eth_dev *dev)
 		priv->mtr_bulk.aso = NULL;
 		priv->mtr_bulk.size = 0;
-		mlx5_aso_queue_uninit(priv->sh, ASO_OPC_MOD_POLICER);
+		/*
+		 * pools_mng->sq is shared by every port on this device.
+		 * Destroying it here would break meters still in use on
+		 * another port. It is released with the shared context.
+		 */
 	}
 	if (priv->mtr_bulk.action) {
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:46.435671623 +0000
+++ 0254-net-mlx5-fix-HWS-meter-ASO-SQ-leak-on-multi-port-ini.patch	2026-12-03 12:52:39.207938716 +0000
@@ -1 +1 @@
-From d94b526e08a37bc4890dc8de2aaad6698620ce3e Mon Sep 17 00:00:00 2001
+From 3a162e456d9bd6e139f29c0f484d6ace88d373bb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d94b526e08a37bc4890dc8de2aaad6698620ce3e ]
+
@@ -25 +26,0 @@
-Cc: stable at dpdk.org
@@ -35 +36 @@
-index cd84ab1966..caaa319d10 100644
+index 5e2a81ef9c..8f95a8f5e6 100644
@@ -38 +39 @@
-@@ -317,5 +317,10 @@ mlx5_aso_mtr_queue_init(struct mlx5_dev_ctx_shared *sh,
+@@ -319,5 +319,10 @@ mlx5_aso_mtr_queue_init(struct mlx5_dev_ctx_shared *sh,
@@ -51 +52 @@
-index e7afcf5399..6d30f31852 100644
+index cd6a804593..e5f5a39b36 100644
@@ -54 +55 @@
-@@ -61,5 +61,9 @@ mlx5_flow_meter_uninit(struct rte_eth_dev *dev)
+@@ -62,5 +62,9 @@ mlx5_flow_meter_uninit(struct rte_eth_dev *dev)



More information about the stable mailing list