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

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:08 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/1d09bc70c2400f6e7e01be19ff702017070cc4b2

Thanks.

Shani

---
>From 1d09bc70c2400f6e7e01be19ff702017070cc4b2 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 2be9ddf186..cf5382ab60 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6951,10 +6951,16 @@ flow_dv_aso_mtr_release_to_pool(struct rte_eth_dev *dev, uint32_t mtr_idx)
 	struct mlx5_aso_mtr_pools_mng *pools_mng =
 				&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);
 	rte_spinlock_unlock(&pools_mng->mtrsl);
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:35.135490615 +0300
+++ 0067-net-mlx5-fix-meter-ASO-action-leak-on-release-to-poo.patch	2026-04-14 14:44:28.756471000 +0300
@@ -1 +1 @@
-From b74b4258cb03a796cb3dbb93df2da86ca58b10ce Mon Sep 17 00:00:00 2001
+From 1d09bc70c2400f6e7e01be19ff702017070cc4b2 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 2be9ddf186..cf5382ab60 100644
@@ -38 +39 @@
-@@ -7286,10 +7286,16 @@ flow_dv_aso_mtr_release_to_pool(struct rte_eth_dev *dev, uint32_t mtr_idx)
+@@ -6951,10 +6951,16 @@ flow_dv_aso_mtr_release_to_pool(struct rte_eth_dev *dev, uint32_t mtr_idx)


More information about the stable mailing list