patch 'net/mlx5: fix leak of flow indexed pools' has been queued to stable release 22.11.11
    luca.boccassi at gmail.com 
    luca.boccassi at gmail.com
       
    Mon Oct 27 17:19:30 CET 2025
    
    
  
Hi,
FYI, your patch has been queued to stable release 22.11.11
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3911c9348a430b3b94a0aa8a9f2392f0c58d1b2d
Thanks.
Luca Boccassi
---
>From 3911c9348a430b3b94a0aa8a9f2392f0c58d1b2d Mon Sep 17 00:00:00 2001
From: Roi Dayan <roid at nvidia.com>
Date: Sun, 5 Oct 2025 10:23:45 +0300
Subject: [PATCH] net/mlx5: fix leak of flow indexed pools
[ upstream commit eefec46eeb89672815afd6c2497d21b928d77c54 ]
The cited commit allocated indexed pools but those pools
were never released. Fix it.
Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool")
Signed-off-by: Roi Dayan <roid at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 .mailmap                |  1 +
 drivers/net/mlx5/mlx5.c | 13 +++++++++++++
 2 files changed, 14 insertions(+)
diff --git a/.mailmap b/.mailmap
index 6a7af0e981..fb9c3d74f9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1192,6 +1192,7 @@ Rob Miller <rob.miller at broadcom.com>
 Rob Scheepens <rob.scheepens at nutanix.com>
 Roger Melton <rmelton at cisco.com>
 Rohit Raj <rohit.raj at nxp.com>
+Roi Dayan <roid at nvidia.com>
 Roland Qi <roland.qi at ucloud.cn>
 Rolf Neugebauer <rolf.neugebauer at netronome.com>
 Romain Delhomel <romain.delhomel at 6wind.com>
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 94873dfe89..357f5eac11 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2007,6 +2007,18 @@ mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
 	dev->process_private = NULL;
 }
 
+static void
+mlx5_flow_pools_destroy(struct mlx5_priv *priv)
+{
+	int i;
+
+	for (i = 0; i < MLX5_FLOW_TYPE_MAXI; i++) {
+		if (!priv->flows[i])
+			continue;
+		mlx5_ipool_destroy(priv->flows[i]);
+	}
+}
+
 /**
  * DPDK callback to close the device.
  *
@@ -2180,6 +2192,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		if (!c)
 			claim_zero(rte_eth_switch_domain_free(priv->domain_id));
 	}
+	mlx5_flow_pools_destroy(priv);
 	memset(priv, 0, sizeof(*priv));
 	priv->domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
 	/*
-- 
2.47.3
---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-27 15:54:36.713332392 +0000
+++ 0052-net-mlx5-fix-leak-of-flow-indexed-pools.patch	2025-10-27 15:54:34.823950251 +0000
@@ -1 +1 @@
-From eefec46eeb89672815afd6c2497d21b928d77c54 Mon Sep 17 00:00:00 2001
+From 3911c9348a430b3b94a0aa8a9f2392f0c58d1b2d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eefec46eeb89672815afd6c2497d21b928d77c54 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index aef57a4c32..ff13bf09fb 100644
+index 6a7af0e981..fb9c3d74f9 100644
@@ -23,2 +24,2 @@
-@@ -1361,6 +1361,7 @@ Rob Scheepens <rob.scheepens at nutanix.com>
- Rogelio Domínguez Hernández <rogelio.dominguez at gmail.com>
+@@ -1192,6 +1192,7 @@ Rob Miller <rob.miller at broadcom.com>
+ Rob Scheepens <rob.scheepens at nutanix.com>
@@ -32 +33 @@
-index ece29fb216..b018a4f0e2 100644
+index 94873dfe89..357f5eac11 100644
@@ -35 +36 @@
-@@ -2318,6 +2318,18 @@ mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
+@@ -2007,6 +2007,18 @@ mlx5_proc_priv_uninit(struct rte_eth_dev *dev)
@@ -54 +55 @@
-@@ -2507,6 +2519,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2180,6 +2192,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
    
    
More information about the stable
mailing list