Skip to contentSkip to conversation

net/mlx5: release allocated indexed pools

PATCH In review Maayan Kashani 2 participants 2 messages Oct 5, 2025 – Oct 16, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: release allocated indexed pools

From: Roi Dayan <[email protected]>

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

Fixes b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool")
---
 drivers/net/mlx5/mlx5.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/net/mlx5/mlx5.c +13 -0
index ece29fb2164..b018a4f0e2c 100644
@@ -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;
 	/*
Signature · 1 line
2.21.0