patch 'net/mlx5: fix meter ASO action leak on release to pool' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Fri Mar 27 11:01:09 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/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/967f95800654e2464a3e4a521bf9dd5ba4e0e492

Thanks.

Kevin

---
>From 967f95800654e2464a3e4a521bf9dd5ba4e0e492 Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz at nvidia.com>
Date: Sun, 15 Mar 2026 10:36:36 +0200
Subject: [PATCH] net/mlx5: fix meter ASO action leak on release to pool
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b74b4258cb03a796cb3dbb93df2da86ca58b10ce ]

flow_dv_aso_mtr_release_to_pool() uses memset to zero the entire
mlx5_flow_meter_info struct when returning a meter to the free pool.
This erases the meter_action_g and meter_action_y pointers without
calling destroy_flow_action on the underlying DR ASO actions.

The leak compounds on repeated meter create/destroy cycles because
the caching check in flow_dv_mtr_alloc() — if (!fm.meter_action_g) —
always sees NULL and allocates a new action every time instead of
reusing the existing one.
At shutdown, mlx5_aso_flow_mtrs_mng_close() also skips destruction
since the pointers are already NULL.

Fixed by saving and restoring meter_action_g and meter_action_y across
the memset so the cached actions survive pool recycling and are
properly destroyed only at shutdown.

Fixes: e6100c7b6226 ("net/mlx5: add flow meter pool to manage meter object")

Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 47f6d28410..69d3bcfa3d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7277,8 +7277,14 @@ flow_dv_aso_mtr_release_to_pool(struct rte_eth_dev *dev, uint32_t mtr_idx)
 				&priv->sh->mtrmng->pools_mng;
 	struct mlx5_aso_mtr *aso_mtr = mlx5_aso_meter_by_idx(priv, mtr_idx);
+	void *meter_action_g;
+	void *meter_action_y;
 
 	MLX5_ASSERT(aso_mtr);
 	rte_spinlock_lock(&pools_mng->mtrsl);
+	meter_action_g = aso_mtr->fm.meter_action_g;
+	meter_action_y = aso_mtr->fm.meter_action_y;
 	memset(&aso_mtr->fm, 0, sizeof(struct mlx5_flow_meter_info));
+	aso_mtr->fm.meter_action_g = meter_action_g;
+	aso_mtr->fm.meter_action_y = meter_action_y;
 	aso_mtr->state = ASO_METER_FREE;
 	LIST_INSERT_HEAD(&pools_mng->meters, aso_mtr, next);
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-27 09:58:26.427804858 +0000
+++ 0009-net-mlx5-fix-meter-ASO-action-leak-on-release-to-poo.patch	2026-03-27 09:58:26.130625509 +0000
@@ -1 +1 @@
-From b74b4258cb03a796cb3dbb93df2da86ca58b10ce Mon Sep 17 00:00:00 2001
+From 967f95800654e2464a3e4a521bf9dd5ba4e0e492 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b74b4258cb03a796cb3dbb93df2da86ca58b10ce ]
+
@@ -26 +27,0 @@
-Cc: stable at dpdk.org
@@ -35 +36 @@
-index d1bed18077..32e75b063f 100644
+index 47f6d28410..69d3bcfa3d 100644
@@ -38 +39 @@
-@@ -7287,8 +7287,14 @@ flow_dv_aso_mtr_release_to_pool(struct rte_eth_dev *dev, uint32_t mtr_idx)
+@@ -7277,8 +7277,14 @@ flow_dv_aso_mtr_release_to_pool(struct rte_eth_dev *dev, uint32_t mtr_idx)



More information about the stable mailing list