Skip to contentSkip to conversation

net/mlx5: fix wrong free function in HWS AGE info

PATCH In review Michael Baum 2 participants 2 messages Oct 24, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix wrong free function in HWS AGE info

In AGE info initialization, the mlx5_hws_q_age_info structure is allocated by "mlx5_malloc" function.

However, in case of failure, this structure is released by "rte_free".

This patch changes it to use "mlx5_free".

Fixes 32c98171674f ("net/mlx5: add HWS AGE action support")
---
 drivers/net/mlx5/mlx5_hws_cnt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_hws_cnt.c +1 -1
index 9c37700f94..b8ce69af57 100644
@@ -1100,7 +1100,7 @@ mlx5_hws_age_info_init(struct rte_eth_dev *dev, uint16_t nb_queues,
 	MLX5_ASSERT(strict_queue);
 	while (qidx--)
 		rte_ring_free(age_info->hw_q_age->aged_lists[qidx]);
-	rte_free(age_info->hw_q_age);
+	mlx5_free(age_info->hw_q_age);
 	return -1;
 }
 
Signature · 1 line
2.25.1
#1 lore raw

Hi,

Quoted 14 lines

-----Original Message-----
From: Michael Baum <[email protected]>
Sent: Monday, October 24, 2022 4:28 PM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Michael Baum <[email protected]>
Subject: [PATCH] net/mlx5: fix wrong free function in HWS AGE info

In AGE info initialization, the mlx5_hws_q_age_info structure is allocated by "mlx5_malloc" function.

However, in case of failure, this structure is released by "rte_free".

Quoted 7 lines

This patch changes it to use "mlx5_free".

Fixes 32c98171674f ("net/mlx5: add HWS AGE action support")

Patch squashed into relevant commit in next-net-mlx,

Kindest regards,
Raslan Darawsheh