From patchwork Wed Jul 24 08:54:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dekel Peled X-Patchwork-Id: 57003 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D6A81C1B3; Wed, 24 Jul 2019 10:54:45 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 707E71C1B0 for ; Wed, 24 Jul 2019 10:54:43 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 24 Jul 2019 11:54:39 +0300 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6O8scbp003538; Wed, 24 Jul 2019 11:54:39 +0300 From: Dekel Peled To: yskoh@mellanox.com, viacheslavo@mellanox.com, shahafs@mellanox.com Cc: orika@mellanox.com, dev@dpdk.org Date: Wed, 24 Jul 2019 11:54:19 +0300 Message-Id: <657215c5e0635b452d5245cd0bfbdcf8315baf6a.1563958238.git.dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <0bf488cf0466b23710a4cf2cd68943a3354de6ef.1563896047.git.dekelp@mellanox.com> References: <0bf488cf0466b23710a4cf2cd68943a3354de6ef.1563896047.git.dekelp@mellanox.com> Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix Rx queue release of resources 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" Function rxq_release_rq_resources() releases resources of RQ object created by DevX API. This patch updates this function to properly clear the released resources, to avoid repeated release of the same resource. Fixes: 69abf7b1db4a ("net/mlx5: create advanced RxQ using new API") Signed-off-by: Dekel Peled Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index c9df8b0..441f158 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -573,8 +573,10 @@ rte_free((void *)(uintptr_t)rxq_ctrl->rxq.wqes); rxq_ctrl->rxq.wqes = NULL; } - if (rxq_ctrl->wq_umem) + if (rxq_ctrl->wq_umem) { mlx5_glue->devx_umem_dereg(rxq_ctrl->wq_umem); + rxq_ctrl->wq_umem = NULL; + } } /**