DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5/hws: fix memory leak on general pool db init
@ 2023-01-11 19:49 Alex Vesker
  2023-01-26 12:34 ` Matan Azrad
  2023-02-12 13:34 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Vesker @ 2023-01-11 19:49 UTC (permalink / raw)
  To: valex, viacheslavo, thomas, suanmingm, Matan Azrad; +Cc: dev, orika

On elemend db init we allocated the element_manager
which was unused and not freed.

Fixes: b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_pool.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_pool.c b/drivers/net/mlx5/hws/mlx5dr_pool.c
index fdbd3d438d..af6a5c743b 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pool.c
+++ b/drivers/net/mlx5/hws/mlx5dr_pool.c
@@ -464,13 +464,6 @@ static void mlx5dr_pool_general_element_db_uninit(struct mlx5dr_pool *pool)
  */
 static int mlx5dr_pool_general_element_db_init(struct mlx5dr_pool *pool)
 {
-	pool->db.element_manager = simple_calloc(1, sizeof(*pool->db.element_manager));
-	if (!pool->db.element_manager) {
-		DR_LOG(ERR, "No mem for general elemnt_manager");
-		rte_errno = ENOMEM;
-		return rte_errno;
-	}
-
 	pool->p_db_uninit = &mlx5dr_pool_general_element_db_uninit;
 	pool->p_get_chunk = &mlx5dr_pool_general_element_db_get_chunk;
 	pool->p_put_chunk = &mlx5dr_pool_general_element_db_put_chunk;
-- 
2.18.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] net/mlx5/hws: fix memory leak on general pool db init
  2023-01-11 19:49 [PATCH] net/mlx5/hws: fix memory leak on general pool db init Alex Vesker
@ 2023-01-26 12:34 ` Matan Azrad
  2023-02-12 13:34 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2023-01-26 12:34 UTC (permalink / raw)
  To: Alex Vesker, Slava Ovsiienko,
	NBU-Contact-Thomas Monjalon (EXTERNAL),
	Suanming Mou
  Cc: dev, Ori Kam



From: Alex Vesker <valex@nvidia.com>
> On elemend db init we allocated the element_manager which was unused
> and not freed.
> 
> Fixes: b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy")
> Signed-off-by: Alex Vesker <valex@nvidia.com>
> Reviewed-by: Erez Shitrit <erezsh@nvidia.com>

Acked-by: Matan Azrad <matan@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] net/mlx5/hws: fix memory leak on general pool db init
  2023-01-11 19:49 [PATCH] net/mlx5/hws: fix memory leak on general pool db init Alex Vesker
  2023-01-26 12:34 ` Matan Azrad
@ 2023-02-12 13:34 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2023-02-12 13:34 UTC (permalink / raw)
  To: Alex Vesker, Alex Vesker, Slava Ovsiienko,
	NBU-Contact-Thomas Monjalon (EXTERNAL),
	Suanming Mou, Matan Azrad
  Cc: dev, Ori Kam

Hi,

> -----Original Message-----
> From: Alex Vesker <valex@nvidia.com>
> Sent: Wednesday, January 11, 2023 9:49 PM
> To: Alex Vesker <valex@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas@monjalon.net>; Suanming Mou <suanmingm@nvidia.com>;
> Matan Azrad <matan@nvidia.com>
> Cc: dev@dpdk.org; Ori Kam <orika@nvidia.com>
> Subject: [PATCH] net/mlx5/hws: fix memory leak on general pool db init
> 
> On elemend db init we allocated the element_manager which was unused
> and not freed.
> 
> Fixes: b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy")
> Signed-off-by: Alex Vesker <valex@nvidia.com>
> Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
> ---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-12 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 19:49 [PATCH] net/mlx5/hws: fix memory leak on general pool db init Alex Vesker
2023-01-26 12:34 ` Matan Azrad
2023-02-12 13:34 ` 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).