patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: release allocated indexed pools
@ 2025-10-05  7:23 Maayan Kashani
  0 siblings, 0 replies; only message in thread
From: Maayan Kashani @ 2025-10-05  7:23 UTC (permalink / raw)
  To: dev
  Cc: mkashani, rasland, Roi Dayan, stable, Bing Zhao,
	Dariusz Sosnowski, Viacheslav Ovsiienko, Ori Kam, Suanming Mou,
	Matan Azrad

From: Roi Dayan <roid@nvidia.com>

The cited commit allocated indexped pools but those pools
were never released. Fix it.

Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool")
Cc: stable@dpdk.org

Signed-off-by: Roi Dayan <roid@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ece29fb2164..b018a4f0e2c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2318,6 +2318,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.
  *
@@ -2507,6 +2519,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.21.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-05  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-05  7:23 [PATCH] net/mlx5: release allocated indexed pools Maayan Kashani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).