From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E090D45B50; Wed, 16 Oct 2024 10:39:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9136F40656; Wed, 16 Oct 2024 10:39:05 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2084.outbound.protection.outlook.com [40.107.92.84]) by mails.dpdk.org (Postfix) with ESMTP id A644240652; Wed, 16 Oct 2024 10:39:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VeTLQfptrEG6EX3pxmm0JgYbO5pc7jGpWq+JP3Y691IqfW5cWccHUbhaHj2sBVHFgB5XA8aC/tDoIXTZnp/aZV7XzDN6BN4buI8apr6BMWhdp+6pNJ40YuQRFdk9/mMsOKGZrII+tSxR6XEtqDQ8xVn4REhqbVFYRyHS4F9f86z4HYVFdXWgi4aX6yVD8cZ57ULFMHwZaxlp4TUDVpa6PkDCLbsFjZT1C15cKU9NuCp1If9QI7l7pM9zEeCTDiTxcO20S5UN84YDQHjujrDF6sVQ4sTOkMv/QDxRoZNfNj0kwOgZQPmmd+IOMRkvvUG/ItwSy/7OjaSZPzmiY9ntbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XeLsPFFdNWth6uZVxHpyPgJvhSqQiyTmKP4lpkeujZk=; b=ZSvtyDw9fsWZb2QZq9PwwADIWbFk8YGyUcQ052lbwvZduLo2qalzyPi/YGSuPmNWdDEr5tft7tHxv9pSXPz85vShfKlZhmjkmmP+byl3BL4Y09QIaftvlDOnV7ESMMNls+/rI9qXAg0ba1LyZ0t9vEVCB+4gOk0+xKHSdP4u+8hpFFNXpefYjOxLe5wQuzmi2dAQpF3sqkgDVDe6NERs0ISJVy0mdOcIAOu1WqgJL7XEJqh72xrH3sD870qPddcebXD0Y2SEseaHo7C8we03YefaxjBC7L97C5sTiZCJ66G1cfo4D2u1exsJ4rTg+OrOHP5de7GVUs+mGHD5EeiyoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XeLsPFFdNWth6uZVxHpyPgJvhSqQiyTmKP4lpkeujZk=; b=K7vU+eCIttCK0E+lisRWJaj+h/mVPg25REGmnCEFh93i4bYQ3xRs1x3Pjqg0wCRCxDBd+QtFV6EsXKJK9ANv9RZwH6HGaCCI5INfJGwArOqdNhvODR/g3gm1Wnnh+bDI4KS57azyLvJrk+wRqlBDqc5ZRZESFFIg7Lb7epaCTCMEh7fQNh9RFfeh37LFeLVNZYiUfpp4IwnwO2JV0ATMX5mUh1JROTiirrDc6m6HhC+d/5NMUzRg3J5sv0gS+O4/vwxr0swjELiwTP1MtcPdhJZwuUIJQQEIXBl/RrgsobkjO4p7c4otUFpNYyM83Mzh926BYMnXgNxoyRZNlxyIRw== Received: from BY5PR04CA0007.namprd04.prod.outlook.com (2603:10b6:a03:1d0::17) by DS7PR12MB5981.namprd12.prod.outlook.com (2603:10b6:8:7c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Wed, 16 Oct 2024 08:39:00 +0000 Received: from MWH0EPF000989EA.namprd02.prod.outlook.com (2603:10b6:a03:1d0:cafe::ff) by BY5PR04CA0007.outlook.office365.com (2603:10b6:a03:1d0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 08:38:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MWH0EPF000989EA.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 08:38:59 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 16 Oct 2024 01:38:49 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 16 Oct 2024 01:38:46 -0700 From: "Minggang Li(Gavin)" To: , , , , Dariusz Sosnowski , Bing Zhao , Suanming Mou , Spike Du CC: , , Subject: [PATCH V1 4/7] common/mlx5: fix Netlink socket leak Date: Wed, 16 Oct 2024 11:38:15 +0300 Message-ID: <20241016083818.662020-5-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241016083818.662020-1-gavinl@nvidia.com> References: <20241016083818.662020-1-gavinl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EA:EE_|DS7PR12MB5981:EE_ X-MS-Office365-Filtering-Correlation-Id: 62111108-1686-4e6f-fa55-08dcedbdfaf9 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/2X1T2qWpCSCPHWIQYsB0uBlpqlEhSyTHUQmXiTpARe47OAp+cJOPbJ9BVWf?= =?us-ascii?Q?fzJMWddxRMeTIpTeDogCBTMAhqvfYsmwNE8vlWpB7OUijoP/c5kQV1atYEvo?= =?us-ascii?Q?eoyV9R/9C1JEokoumW6qjYC9y4s9eGpM8Ba7GjwhIi/cBK2Rnu3wC0T1q08q?= =?us-ascii?Q?U+O26+6Izmh1bVHq/GZjmG/axIFpqtoipuAgrVUi8Os8sXiA3ppFqdaq97hq?= =?us-ascii?Q?mnePKFu8uNn67mdjp3chj1C1YHnXblwqDt5owuNhhC4+x2OKxlD51vjQgopI?= =?us-ascii?Q?BZkdXzcxXdIVcjlVCWEn1ghCeoMb6PmltwneMF6ZHfaIj/lRGgbKr4b0S34V?= =?us-ascii?Q?OrOyF9rMtQR7oT+lIR0sRqdKpVaX+VpN+JP7B382mmKmB6TB0mcokq0TmU9w?= =?us-ascii?Q?tCgpK1JsSDO9SJe5fnAyTgEJXLeQsHchlT1Jz+m+nrx9+GvZjKg0RVaXEPYh?= =?us-ascii?Q?/1d/QU9egGkyepTIP2WVtjlLi+9/+LD4KVeRWCIN2VZxOuoL6gYv7CXYQh/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-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 08:38:59.4274 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62111108-1686-4e6f-fa55-08dcedbdfaf9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989EA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5981 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: , Errors-To: dev-bounces@dpdk.org Fixes: 72d7efe464b1 ("common/mlx5: share interrupt management") Cc: stable@dpdk.org Signed-off-by: Minggang Li(Gavin) Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_os.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index a408790d1e..6609527934 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -3073,10 +3073,15 @@ mlx5_os_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh) void mlx5_os_dev_shared_handler_uninstall(struct mlx5_dev_ctx_shared *sh) { + int fd; + mlx5_os_interrupt_handler_destroy(sh->intr_handle, mlx5_dev_interrupt_handler, sh); + fd = rte_intr_fd_get(sh->intr_handle_nl); mlx5_os_interrupt_handler_destroy(sh->intr_handle_nl, mlx5_dev_interrupt_handler_nl, sh); + if (fd >= 0) + close(fd); #ifdef HAVE_IBV_DEVX_ASYNC mlx5_os_interrupt_handler_destroy(sh->intr_handle_devx, mlx5_dev_interrupt_handler_devx, sh); -- 2.34.1