DPDK patches and discussions
 help / color / mirror / Atom feed
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>
Subject: [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow
Date: Wed, 11 Nov 2020 07:36:45 +0000	[thread overview]
Message-ID: <1605080208-12165-2-git-send-email-michaelba@nvidia.com> (raw)
In-Reply-To: <1605080208-12165-1-git-send-email-michaelba@nvidia.com>

In Rx queue creation, there is a validation for the Rx configuration.

When scatter offload validation for buffer split is failed, the Rx queue
object memory was not freed what caused a memory leak.

Free it.

Fixes: a0a45e8af723 ("net/mlx5: configure Rx queue for buffer split")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 4e6b8f4..0693c92 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1506,7 +1506,7 @@ struct mlx5_rxq_ctrl *
 			dev->data->port_id, idx, mb_len, max_rx_pkt_len,
 			RTE_PKTMBUF_HEADROOM);
 		rte_errno = ENOSPC;
-		return NULL;
+		goto error;
 	}
 	tmpl->type = MLX5_RXQ_TYPE_STANDARD;
 	if (mlx5_mr_btree_init(&tmpl->rxq.mr_ctrl.cache_bh,
-- 
1.8.3.1


  reply	other threads:[~2020-11-11  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  7:36 [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Michael Baum
2020-11-11  7:36 ` Michael Baum [this message]
2020-11-11  7:36 ` [dpdk-dev] [PATCH 3/5] net/mlx5: fix ASO age pools resize error flow Michael Baum
2020-11-11  7:36 ` [dpdk-dev] [PATCH 4/5] net/mlx5: fix compiler code arrangement in probe Michael Baum
2020-11-11  7:36 ` [dpdk-dev] [PATCH 5/5] common/mlx5: fix flex parser creation error flow Michael Baum
2020-11-13 22:26 ` [dpdk-dev] [PATCH 1/5] net/mlx5: fix unused calculation in RSS expansion Thomas Monjalon

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=1605080208-12165-2-git-send-email-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).