patch 'net/mlx5: fix table leak on HWS sample action destruction' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 16 23:51:37 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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/18/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9de68c668e081c54b8bebb9be67bd0bea5402bf3

Thanks.

Luca Boccassi

---
>From 9de68c668e081c54b8bebb9be67bd0bea5402bf3 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Sun, 16 Aug 2026 11:15:24 +0300
Subject: [PATCH] net/mlx5: fix table leak on HWS sample action destruction

[ upstream commit 7080da376f9321d97639f83f28e2a901e241149b ]

Destroy the composite dest_array mirror action before releasing its
clone destinations. Releasing a JUMP clone can drop the last group
table reference while the dest_array still points at that table,
leaving the firmware flow table objects leaked on port close.

Fixes: 3564e928c759 ("net/mlx5: support HWS flow mirror action")

Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index df68c90564..b11fe683b9 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -14365,10 +14365,18 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror)
 	uint32_t i;
 
 	mlx5_indirect_list_remove_entry(&mirror->indirect);
-	for (i = 0; i < mirror->clones_num; i++)
-		mlx5_mirror_destroy_clone(dev, &mirror->clone[i]);
+	/*
+	 * The mirror action is a composite dest_array that references each
+	 * clone destination (jump table or Rx queue). It must be destroyed
+	 * before the clones so the underlying destinations are no longer
+	 * referenced when they are released; otherwise releasing a clone can
+	 * drop the last reference to a group table and destroy it while the
+	 * dest_array still points at it, leaking the firmware flow table.
+	 */
 	if (mirror->mirror_action)
 		mlx5dr_action_destroy(mirror->mirror_action);
+	for (i = 0; i < mirror->clones_num; i++)
+		mlx5_mirror_destroy_clone(dev, &mirror->clone[i]);
 	mlx5_free(mirror);
 }
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-16 22:52:17.435960560 +0000
+++ 0023-net-mlx5-fix-table-leak-on-HWS-sample-action-destruc.patch	2026-11-16 22:52:16.452232530 +0000
@@ -1 +1 @@
-From 7080da376f9321d97639f83f28e2a901e241149b Mon Sep 17 00:00:00 2001
+From 9de68c668e081c54b8bebb9be67bd0bea5402bf3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7080da376f9321d97639f83f28e2a901e241149b ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 8dabf21b76..8b74f66770 100644
+index df68c90564..b11fe683b9 100644
@@ -24 +25 @@
-@@ -14646,10 +14646,18 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror)
+@@ -14365,10 +14365,18 @@ mlx5_hw_mirror_destroy(struct rte_eth_dev *dev, struct mlx5_mirror *mirror)


More information about the stable mailing list