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>,
stable@dpdk.org
Subject: [dpdk-stable] [PATCH v3 03/19] net/mlx5: fix ASO SQ creation error flow
Date: Wed, 6 Jan 2021 08:19:25 +0000 [thread overview]
Message-ID: <1609921181-5019-4-git-send-email-michaelba@nvidia.com> (raw)
In-Reply-To: <1609921181-5019-1-git-send-email-michaelba@nvidia.com>
In ASO SQ creation, the PMD allocates umem buffer for SQ.
When umem buffer allocation is fails, the MR and CQ memory are not freed
what caused a memory leak.
Free it.
Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_age.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_age.c b/drivers/net/mlx5/mlx5_flow_age.c
index 1f15f19..e867607 100644
--- a/drivers/net/mlx5/mlx5_flow_age.c
+++ b/drivers/net/mlx5/mlx5_flow_age.c
@@ -279,7 +279,8 @@
sizeof(*sq->db_rec) * 2, 4096, socket);
if (!sq->umem_buf) {
DRV_LOG(ERR, "Can't allocate wqe buffer.");
- return -ENOMEM;
+ rte_errno = ENOMEM;
+ goto error;
}
sq->wqe_umem = mlx5_os_umem_reg(ctx,
(void *)(uintptr_t)sq->umem_buf,
--
1.8.3.1
prev parent reply other threads:[~2021-01-06 8:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1608205475-20067-1-git-send-email-michaelba@nvidia.com>
2020-12-17 11:44 ` [dpdk-stable] [PATCH 01/17] " Michael Baum
[not found] ` <1609231944-29274-1-git-send-email-michaelba@nvidia.com>
2020-12-29 8:52 ` [dpdk-stable] [PATCH v2 " Michael Baum
[not found] ` <1609921181-5019-1-git-send-email-michaelba@nvidia.com>
2021-01-06 8:19 ` [dpdk-stable] [PATCH v3 01/19] common/mlx5: fix completion queue entry size configuration Michael Baum
2021-01-06 8:19 ` [dpdk-stable] [PATCH v3 02/19] net/mlx5: remove CQE padding device argument Michael Baum
2021-01-06 8:19 ` Michael Baum [this message]
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=1609921181-5019-4-git-send-email-michaelba@nvidia.com \
--to=michaelba@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--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).