* [PATCH] net/mlx5: fix ipool memory leak
@ 2025-07-23 6:49 Rongwei Liu
2025-08-18 6:30 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Rongwei Liu @ 2025-07-23 6:49 UTC (permalink / raw)
To: matan, viacheslavo, orika, thomas, Dariusz Sosnowski, Bing Zhao,
Suanming Mou, Shani Peretz
Cc: dev, rasland
When ipool debug is enabled, there is internal memory
to maintain the ipool cache allocation. Need to free it
when destroying the ipool.
Fixes: 3a2bda363 ("net/mlx5: add ipool debug checks")
Cc: shperetz@nvidia.com
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index ac218868e6..58249b596f 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -871,6 +871,10 @@ mlx5_ipool_destroy(struct mlx5_indexed_pool *pool)
pool->cfg.free(trunks);
if (gc)
pool->cfg.free(gc);
+#ifdef POOL_DEBUG
+ if (pool->cache_validator.bmp_mem)
+ pool->cfg.free(pool->cache_validator.bmp_mem);
+#endif
mlx5_ipool_unlock(pool);
mlx5_free(pool);
return 0;
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/mlx5: fix ipool memory leak
2025-07-23 6:49 [PATCH] net/mlx5: fix ipool memory leak Rongwei Liu
@ 2025-08-18 6:30 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2025-08-18 6:30 UTC (permalink / raw)
To: Rongwei Liu, matan, viacheslavo, orika, thomas,
Dariusz Sosnowski, Bing Zhao, Suanming Mou, Shani Peretz
Cc: dev
Hi,
On 23/07/2025 9:49 AM, Rongwei Liu wrote:
> When ipool debug is enabled, there is internal memory
> to maintain the ipool cache allocation. Need to free it
> when destroying the ipool.
>
> Fixes: 3a2bda363 ("net/mlx5: add ipool debug checks")
> Cc: shperetz@nvidia.com
> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-18 6:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-23 6:49 [PATCH] net/mlx5: fix ipool memory leak Rongwei Liu
2025-08-18 6:30 ` Raslan Darawsheh
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).