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 A732645F20; Mon, 23 Dec 2024 11:12:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CC0D40B98; Mon, 23 Dec 2024 11:11:53 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2065.outbound.protection.outlook.com [40.107.95.65]) by mails.dpdk.org (Postfix) with ESMTP id 0E14640A7F; Mon, 23 Dec 2024 11:11:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ky8jNJZc1fZSivvhbptN2VoErIobpj3ker3hckI+2/3jBVmL47Wok87k3yyHJTFr9+Y8Ph0qtnBohEisxr6+vEkREmuJuGganxzSmb2bpSF+gMXC3rSsFFZKbI03c/RWhONMgFMwQgm4Cj5qLxgjT2x3xIQ+F0HyXQ+EC3dY9uMfCQVyUXSSFH50ufqrVZz592gBJQxQtF82+8a+7JLIkTGmup1VIxWkPHF58VdflET09PBBW9hEBYNpLWSzDlLYxUzbGT9lsekGEd42BsmtjR+n4jHGqNJT/x4XWVU9onFDxs+Vg3p+DBuh5dJIgXhkteW0rL6TqOBv1uNwEQgILQ== 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=htQ+aK34Jum5czOtPgDnOeUfGDaUEddCTsukZmu1+4U=; b=dzANDhXBU0Me9ZwqedI4FBoXlqwPXfCkVmiMyYjiwDhoZ+EQiV90P5Ld1i2DJXRI+/HEiEtJlmQUFBhhvhqDlLU+jeY7lOcF8aT95VJ+H7JOLW9xZYOfreznupS0tiAqAbYGvP+l8PUVgAbKW/cVFj+p2fm+ZAiuWhipFqzFF6/fk7DuCn5xTwODfbdQva5VgnTilnTUlhn5yH2/j6IeiZRwY5Tgch7rYmFPLr5fRTocACI2Srb/3CcwaB1xQ1OGr9+RsLJ4Fa3iSOcM9odeuT5JVirHFBh8KvkpIfA7ulhBGF0wB8Xc/DUsFQX+Lsz+OVxO9E+q8i1iS5o+2bSY5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=htQ+aK34Jum5czOtPgDnOeUfGDaUEddCTsukZmu1+4U=; b=fLS9YJvSqJ3Ok+Zg+atEk6Zux2F7/JZGn8v5pq1aWaUHiROTZoGeRwhn0TNOZObCGwv04ddOIceYIycbgGO6oqAS9sZiesceyDMkfxpfMwI8raTSKVKt+IGC0b+CFMeshgTmYRK5RA0Fp13T34paNp+/ADpz/6zFSGPhVOTMsMA4HLrIEvhey3yIlGPg2TLUDrh4rjqg1t0J4af4mLvmV5fVvqSFa28OhLjN+q2IsRRo171c3OKcFik7mEIbLGB6NgHTSlsslraBGfWtPQqvMXVziKa/Kft476CFMp+UAGTVhWNlEr1BDTSMMiRF+kwj4VyOamVe/h+6thVtml6xQA== Received: from SJ0PR03CA0105.namprd03.prod.outlook.com (2603:10b6:a03:333::20) by SA1PR12MB8887.namprd12.prod.outlook.com (2603:10b6:806:386::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.18; Mon, 23 Dec 2024 10:11:42 +0000 Received: from SJ1PEPF0000231B.namprd03.prod.outlook.com (2603:10b6:a03:333:cafe::47) by SJ0PR03CA0105.outlook.office365.com (2603:10b6:a03:333::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8272.18 via Frontend Transport; Mon, 23 Dec 2024 10:11:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF0000231B.mail.protection.outlook.com (10.167.242.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8293.12 via Frontend Transport; Mon, 23 Dec 2024 10:11:42 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 23 Dec 2024 02:11:31 -0800 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, 23 Dec 2024 02:11:28 -0800 From: "Minggang Li(Gavin)" To: , , , , Dariusz Sosnowski , Bing Zhao , Suanming Mou , Spike Du CC: , , Subject: [PATCH 4/7] common/mlx5: fix Netlink socket leak Date: Mon, 23 Dec 2024 12:10:58 +0200 Message-ID: <20241223101101.677449-5-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223101101.677449-1-gavinl@nvidia.com> References: <20241223101101.677449-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: SJ1PEPF0000231B:EE_|SA1PR12MB8887:EE_ X-MS-Office365-Filtering-Correlation-Id: 912f6480-195d-43b9-5d69-08dd233a32c8 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?5ZGEwuEPUlztluqKsUCkj3gJVJ1uCUv7lECxSzGlgiqX29NwfvjIq0VFF4/o?= =?us-ascii?Q?pzAMifhIDZ4GMayglvSHIo3WNi2E4Qeyh9jzvMoxIEFHjpSN+cT6B80Ub7tB?= =?us-ascii?Q?NTEJTL/i18/uJfaFAAOFQGRF2F8caKOGeWthYZqv6P4J6kOZ+GayIDaho1us?= =?us-ascii?Q?17r/W9SgBFAbhUNaaeNa7iXNfl/jK6L4rqN48rEhdC7MWyNHVk3OGArapbmo?= =?us-ascii?Q?rVRV73GdQC4DcXyLCcDxbAJ8BRAqjM3IHDjuUWQwootF6noYA42KAE26km+D?= =?us-ascii?Q?vS2ZClSqDW+P3aqm+5KmvOLnp1NS71uct+DFECzuKeBioiV2CvTmp5fL/kvV?= =?us-ascii?Q?FRJyZDJtr5cOBSlNpwj04hsmPIbTJ76XUvrDOOjCjDVqL8f83eZ/IDj99/dk?= =?us-ascii?Q?T0pEYFJW4g1sFMSnLhkt4fuLIr00WHerWNE1ykK4XQgxAIrpk3+Y0LB8rp4N?= =?us-ascii?Q?2ynG8iomeJ/OH6TdLmeBTPGKMIgPRvAPBseIojmiWRhEDv1v4MjyH3JyMmCo?= =?us-ascii?Q?r4/sixGhNQe5goIb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ascii?Q?EOm5Fnqp6vQo0Y0EIViEuZZAgaMl2zHjAGW5JPO3SJGQikzBcs8mAg=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 10:11:42.3233 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 912f6480-195d-43b9-5d69-08dd233a32c8 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF0000231B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8887 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 695936f634..4537ca0466 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -3071,10 +3071,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