From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BF96A09D2; Wed, 11 Nov 2020 08:37:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC3BF569B; Wed, 11 Nov 2020 08:37:19 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C163B4C90 for ; Wed, 11 Nov 2020 08:37:18 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 11 Nov 2020 09:37:13 +0200 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AB7b2wm028356; Wed, 11 Nov 2020 09:37:13 +0200 From: Michael Baum To: dev@dpdk.org Cc: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko Date: Wed, 11 Nov 2020 07:36:45 +0000 Message-Id: <1605080208-12165-2-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1605080208-12165-1-git-send-email-michaelba@nvidia.com> References: <1605080208-12165-1-git-send-email-michaelba@nvidia.com> Subject: [dpdk-dev] [PATCH 2/5] net/mlx5: fix Rx queue creation error flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Matan Azrad --- 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