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 5C84345BFD; Mon, 28 Oct 2024 10:19:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D512740E31; Mon, 28 Oct 2024 10:19:20 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2051.outbound.protection.outlook.com [40.107.93.51]) by mails.dpdk.org (Postfix) with ESMTP id 9946040DF8; Mon, 28 Oct 2024 10:19:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BprrVQDHQJgZYmT7Jv/RJqDbF6GoDNeQVB9mN6PH9jHmvFe5MajI0R1cqYvSD+tivGa8u5EFPU05I4/Q3UBttqZohXh+dLclJgg1EA5fVHLOD5GKux/suxw/fWqou02Bb0UZI6d2a3aFnR0FwhFG64epKG1KAdcqrdLv8gIjeZOSXlVJlcnmoj4X3Y2nnvOiyYVfskDTBDyNGOoKx/X3eGIAJ4spjAz8F3JKllFXujKMFmhOkOoIaH+k9XTmqsEMOFsn3L7DrWImjalFbv5Jvw7gU5sOME7JOpQd9y4NvH3rredc8wjGS9ijNkd8guxpbmsn52wtFv4vmG87J4T63Q== 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=zPliLrtttYQWvGYt9hAqMrB/j3sPiyqivf7bHjolOoM=; b=Qjoxw9QeHw4bnu+PXOUo4+yAgItE3LRhZQbujEDR7dTjAjXTQXcK0by0n++uk3RURoAOs1qHzC3a2HxEmP/9i1TFFMADsvScnA3QJyDVWlq2CLQKgBkHHSgI8XsB+/bPoDqJmho5LZvy0dcYkzq1QKPxxl7/m5X+Hg38W5J3VT5az0P6ywfJbkJe2ggsfiraEWanr6hh4EjATmIa5FjEb0GREDW2KONxsrMZDUuIeeskZIVUtYROoVtsHRagMBB9tgcHmbxnwPSsGjYEeqbhdZI3L2Q8vqiD9XTW7c6xb9vgPcs3bsDUAtsK5vtEykCUN/sF81pZWMg53JCSXa3IiQ== 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=zPliLrtttYQWvGYt9hAqMrB/j3sPiyqivf7bHjolOoM=; b=SxP5xl60176nN9mkdt4AHYnXVo2UGZrprDujKeuD0TKnndrrYjvtWN/wcBrW8U35JP11HyKRML/DPdYPVTz7QdWRIesRvFXoqCpqIgu8PuiIJZuz4SewJrMc9gOtDuc1hPXHvNL4aNXkWq54/bkVkhS1DWlzrw2oh0Gb8G6xOZ7Lhs3EzdlAYQekpX5Tz7lXCX7k4fu8mhJ3L/ZWBvPuc9sKFB/70lBK1b7Rh1bEZCyv5CQ9HTAmnbFKOxsCihQ9kk/JtlmM7UoqoeTEYJb0euXV8TQBMzv2bKv2WOhS8jv/E6dd0DsU4lmuC5BxsbbtFBFQq9xD1+L9JCImdlXVvg== Received: from CH0PR13CA0035.namprd13.prod.outlook.com (2603:10b6:610:b2::10) by PH7PR12MB5687.namprd12.prod.outlook.com (2603:10b6:510:13e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 09:19:06 +0000 Received: from CH2PEPF0000013D.namprd02.prod.outlook.com (2603:10b6:610:b2:cafe::d9) by CH0PR13CA0035.outlook.office365.com (2603:10b6:610:b2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.8 via Frontend Transport; Mon, 28 Oct 2024 09:19:06 +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 CH2PEPF0000013D.mail.protection.outlook.com (10.167.244.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Mon, 28 Oct 2024 09:19:06 +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; Mon, 28 Oct 2024 02:18:54 -0700 Received: from nvidia.com (10.126.230.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; Mon, 28 Oct 2024 02:18:51 -0700 From: "Minggang Li(Gavin)" To: , , , , Dariusz Sosnowski , Bing Zhao , Suanming Mou , Spike Du CC: , , Subject: [PATCH V2 4/7] common/mlx5: fix Netlink socket leak Date: Mon, 28 Oct 2024 11:18:19 +0200 Message-ID: <20241028091822.860660-5-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028091822.860660-1-gavinl@nvidia.com> References: <20241016083818.662020-8-gavinl@nvidia.com> <20241028091822.860660-1-gavinl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: CH2PEPF0000013D:EE_|PH7PR12MB5687:EE_ X-MS-Office365-Filtering-Correlation-Id: 9de3aa62-c5a8-4308-505e-08dcf73192a9 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|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?DG+lqRYMhG8L8PlCHeNGI5EQMQ4ttVeOuiH1QTSfqKGxBDKC2r/vNtsv5JVZ?= =?us-ascii?Q?p9/io/0xx6ZftDtAdiXQiAJFWIwUcWU/Aw9nwjCQqZtOrVw10YV2pJt6+1DU?= =?us-ascii?Q?ewe3RjCwR8oWCdywSPkpLDkJqejzrZVU0hbfSjhJkA+GYikyazF4ael9XLCf?= =?us-ascii?Q?C/7JBva4ESwqx84rzaLFDHn5s9OnL69q4igkeoyrOtrEuRrQdZp0rPTYcgmq?= =?us-ascii?Q?gHfAZ5uk0Hdw9VpWtCihrfHN8bpUQZxRHn+G/ZzbNcPUk2zxi5ulZBob3xg3?= =?us-ascii?Q?5Gfm75R8FAM8dAybDgNq2nEzZAMaZnQUKCj0UYxBM1vTV1qT49Pg9MALE+9Z?= =?us-ascii?Q?ekG/n73S4yowjnOivmGHaG99s3pxwHnSW6V0eRA6/DWB1couywkMHh7VP88I?= =?us-ascii?Q?A9eDa/jfYO6IaOPujl7TBCJKtGO19WX2EwMdh0JmgpDMO0ICqxXs9RUh7VwK?= =?us-ascii?Q?BqgAYsAPVCueX87Eo+bahod0uAMnM88y465bw+zMsY2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DiHgBJC7Era8NtxMZR+Qf56JVGVnA=3D=3D?= X-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)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 09:19:06.4233 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9de3aa62-c5a8-4308-505e-08dcf73192a9 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: CH2PEPF0000013D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5687 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 4c2caa21e9..8df45ef010 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -3076,10 +3076,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