From patchwork Wed Jul 6 17:22:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 113753 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D21FA0540; Wed, 6 Jul 2022 19:22:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9108140DF7; Wed, 6 Jul 2022 19:22:37 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BBD2740A89 for ; Wed, 6 Jul 2022 19:22:35 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id F1EF020DDCBC; Wed, 6 Jul 2022 10:22:34 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F1EF020DDCBC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1657128154; bh=CN5FJ/KOkbEROOPKM3RmBJZwTU08VNpMMHJHcHvjMvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=QKVsMbutaK971V5T8eceSa7npHFOzQ8+xp2UrhN/wZuGHS8Ji1bjPksJjVh6Fddbr SBEk7oASzZZ2KM39nxPRgGT5YVvKg41ct7bShh/qA6alFc16twdyxfqP/azcKF24yy TMDBFHSVi3r866u/XS7/vgRkAzBwfy3nnh1BwH2U= From: longli@linuxonhyperv.com To: Matan Azrad , Ferruh Yigit Cc: dev@dpdk.org, Long Li Subject: [PATCH] net/mlx5: fix verbs fd leak in the secondary process Date: Wed, 6 Jul 2022 10:22:25 -0700 Message-Id: <1657128145-7764-2-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1657128145-7764-1-git-send-email-longli@linuxonhyperv.com> References: <1657128145-7764-1-git-send-email-longli@linuxonhyperv.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: longli@microsoft.com Errors-To: dev-bounces@dpdk.org From: Long Li FDs passed from rte_mp_msg are duplicated to the secondary process and need to be closed. Fixes: 9a8ab29b84 ("net/mlx5: replace IPC socket with EAL API") Signed-off-by: Long Li --- drivers/net/mlx5/mlx5_txq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 4e0bf7af9c..df55a4cd25 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -636,6 +636,7 @@ mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd) if (ret) goto error; } + close(fd); return 0; error: /* Rollback. */ @@ -646,6 +647,7 @@ mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd) txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq); txq_uar_uninit_secondary(txq_ctrl); } while (i--); + close(fd); return -rte_errno; }