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 E5CED45C0B for ; Tue, 29 Oct 2024 14:44:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D86BB42E8B; Tue, 29 Oct 2024 14:44:03 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2049.outbound.protection.outlook.com [40.107.220.49]) by mails.dpdk.org (Postfix) with ESMTP id 4556742E7D; Tue, 29 Oct 2024 14:43:58 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rlIgxGc/pPuN105sIBwL1jwqON/iHT8lYz0wj3JpRyRlCodbtEyxe3FsvvxjF0Suw2oZpf9iayGGbo/RGW4HVdqGLIRmSySLJTx2WrY3OWmhw0+5s87tK6Lzwv1ta1Q9gM3k5YGdlzCdunxsZKH2W7gBH2YnBylsQSLLnxEaTle+SAmDYUByM0i43qpgYtdXiFgVlBkoYZDCQWIGUtD/zRYBgHEYFhlTNhOZO9rsJz+QSxOgV7EQ10cpeJjHrGWK4NoWWDhMHUBCOlDKvAhA0oUafFTPHF3lUhFRTdACUDXxZql0Ncat3LeOdBqnc2jLcz4im0teWT77SaqsR3r03w== 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=kIThrxe85yqq9mdvjfbrifl/vZyTRww/3dY8LAXqeIwdtzH3G9pbrSWZ1dO0ivqnT8LBFuhBc3b+Pl3R7D3mWkoqfRaeN0GfIhM3nMHilbdrW7haTZ63d7FlGkiERWc8h4AsqlxSikHswfvkchlCbaPtJMgNshrNlLg+Lr3PleCoNGyccyrI4yMO2HM4q2gPipoyFfoRHHRaeDDXGksycE/wLnm0tOWDxiEXt24b/DMzyCLdgD6QUYRy6s8GFzuU5VLXfdDeAKQY2COitEOaqwG+H3Ps9C+8Z0mD2HxWEEr36s4r3PFZV2SlY/pu6r9Qpt5B5Lcp72Ze6rYgdHMOtw== 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=htQ+aK34Jum5czOtPgDnOeUfGDaUEddCTsukZmu1+4U=; b=f/PbYC2SA+VHMACezmAGuz3TddRabop8ZaO+AyfpIQB7i+v1HNnSA7ydFvJMIcAQn2O6z1xUxRuswmFYZZOM+gzhmW6irG/YV+Xex7n3lhM/L/k0Ri6uSPo4wicAwRXcwQtV9A+yZz+MSEWoVlQ4JEMJ0LJkN8oCakJ2f11UnO7vM9Kagxulk8+yiM710UfBpZ8qPdyOqwkUf8cChu9Zsf/WDbFUHdoHiE0kwg7KBGOl77XfR3gLJEaMhoyhGEcSuXeQKyGhkj44lSrLPUR4hdMsdJfUB2Cz91LdMpDMEqxytBCiDNO7rDGU7ENadHaXMlrK1Tai/m0CVI6WZrLq5Q== Received: from SJ0PR03CA0155.namprd03.prod.outlook.com (2603:10b6:a03:338::10) by SJ0PR12MB6989.namprd12.prod.outlook.com (2603:10b6:a03:448::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25; Tue, 29 Oct 2024 13:43:53 +0000 Received: from SJ1PEPF00002318.namprd03.prod.outlook.com (2603:10b6:a03:338:cafe::dc) by SJ0PR03CA0155.outlook.office365.com (2603:10b6:a03:338::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.25 via Frontend Transport; Tue, 29 Oct 2024 13:43:53 +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 SJ1PEPF00002318.mail.protection.outlook.com (10.167.242.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 13:43:53 +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; Tue, 29 Oct 2024 06:43:27 -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; Tue, 29 Oct 2024 06:43:24 -0700 From: "Minggang Li(Gavin)" To: , , , , Dariusz Sosnowski , Bing Zhao , Suanming Mou , Spike Du CC: , , Subject: [PATCH V3 4/7] common/mlx5: fix Netlink socket leak Date: Tue, 29 Oct 2024 15:42:53 +0200 Message-ID: <20241029134256.874767-5-gavinl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029134256.874767-1-gavinl@nvidia.com> References: <20241028091822.860660-8-gavinl@nvidia.com> <20241029134256.874767-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002318:EE_|SJ0PR12MB6989:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a0162bc-ef1c-40ea-b7e5-08dcf81fba7e 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|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8T5eYauhScyDlqzmRypwvoFoqv/Iczk5Ptr054XcPOst8KwezRK3SJHrrsgA?= =?us-ascii?Q?bZ75BtsEEIBb/iUPA5FccC2Jt0Kh4IZwqDJv+3JmFXexhhMI6JiPbUY2n3bE?= =?us-ascii?Q?eDpgPg4UBKeOlBbZQvzckA9dAxMQ4dkkk8bSGcdue3vgEObExRbQz7FPQvBQ?= =?us-ascii?Q?5dm2k4LzewxqkIaQ970tCu21JrsuCCJsK5x08xhOlrlqGiUGTpFckwvMGmNv?= =?us-ascii?Q?bRf80yV7WC+e9MbbBVicdA16Hf2L+vSBa1Ifa+02QPL2/U3A3KqZswuUB6yw?= =?us-ascii?Q?6ABfsSmTSps0kUEk9JpzmNK4qM9A7DoRZFVMGakly9xWFFRH8kUVYB9/SjsV?= =?us-ascii?Q?KZYR7C5oTGBh29z7zSlAN2/4TWctGUCA9AlyBckI4dMsIwnboeBdd+Q4wLfN?= =?us-ascii?Q?OLCZ5Cz1FjT0lwEX7uZ6Z7K3hnUY0iST4x2uE0cexioJjD1sbq51qDXLjr5E?= =?us-ascii?Q?POvRAlOR2ALMq56l14pGntUxSqYdvQ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?Q?C5akufiOZy2YA/3F5yM5gjm0dtzZ3utBcnm66kZCmIVHD8ksjA=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)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 13:43:53.5059 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a0162bc-ef1c-40ea-b7e5-08dcf81fba7e 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: SJ1PEPF00002318.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6989 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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