From: Michael Baum <michaelba@nvidia.com>
To: <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
Raslan Darawsheh <rasland@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
<michaelba@nvidia.com>
Subject: [PATCH] net/mlx5: fix wrong free function in HWS AGE info
Date: Mon, 24 Oct 2022 16:28:23 +0300 [thread overview]
Message-ID: <20221024132823.3246243-1-michaelba@nvidia.com> (raw)
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")
Cc: michaelba@nvidia.com
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_hws_cnt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index 9c37700f94..b8ce69af57 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -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;
}
--
2.25.1
next reply other threads:[~2022-10-24 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 13:28 Michael Baum [this message]
2022-10-24 13:34 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221024132823.3246243-1-michaelba@nvidia.com \
--to=michaelba@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).