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 261CB43BBA for ; Thu, 7 Mar 2024 12:20:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EEDA42EC2; Thu, 7 Mar 2024 12:20:52 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2115.outbound.protection.outlook.com [40.107.244.115]) by mails.dpdk.org (Postfix) with ESMTP id A160F4067E for ; Thu, 7 Mar 2024 12:20:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FRi1llldK/cISY9jWzRphjodWJmF9mhcZiNVPh5kpiVfRNp878PF+snlnxuRAzUO8nhXYMZ8//t23O60lcfI7hYghnEOpRKOE8rw9OWEB8OZKlXfjBXIyWcQYNUkhBVcE+f1RBHFnDJTmnbDeiMi4/buGOn8eE8y4PXx9l4yW9iZ13jmIAyOoHOxRn4fzlvDUVS/HzIbU+bhfDBjya3v8KponjP6eKdSZasTK7VrK515Cz6iZW73/VRxLEAmQRl6yiJZl/0W0kj2D++To+UiHIeQAm3VOM0sB1P+pbhvu3Rh0lKuwagq2X7U0SByZzeLQAXmVJ1xtMDEjU4EuGDEkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=gUSCpqQbII4kpsgsxEofnXQMGjHf07noOqanM+Bkh2k=; b=g7Ybc81/mTE98qbTxBX5yA/zRByoOU5kCiCLo1pcMuswEBS+OnU4MrNecEL0G4azL5vdrIHxz1stwP15rIjw/5wTCwgQoXXdIxocFaB+2c1Xt2OKhoVLFUXLEeXorfYElem3JR6QXIDRnC9oTDIS2ORZyUseJIQD6wUWTnt9I71ct50+g6jHIbQJ4UCiy91NuvxeYF49Q9Rs9OZLhiGNvBOkYxqi/EC24RGC5We2Bgz+fibkizd0jez745l6oXlhDUk0LUnHQ/fU2r6gVhnTq5J/YdZiGG0nsHWVy4aKZf24i3U1TpghM+BndwdjTu190veXEk6lTI3xf5fCgpbPYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gUSCpqQbII4kpsgsxEofnXQMGjHf07noOqanM+Bkh2k=; b=k6CoRIxnvqrNSwsSJyGu+NCD8/zxj+YMvd9EYZ8WuzO/Qhq0Mh9M2Si1uPtTpvjSsbc3lDXzRqtGnG3u3rTG+uWTwLhXh7FL4GXSFlvVR6Kn3gXkypwGIGY234+p6WAmT3eaDfjyK4F9DxYyl+Idy3hW72Wj8bEdrHvMEIu+tTw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH7PR13MB5959.namprd13.prod.outlook.com (2603:10b6:510:15d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.26; Thu, 7 Mar 2024 11:20:49 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7339.035; Thu, 7 Mar 2024 11:20:49 +0000 From: Chaoyong He To: stable@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH 22.11 v2 5/7] net/nfp: fix device close Date: Thu, 7 Mar 2024 19:20:21 +0800 Message-Id: <20240307112023.1867765-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240307112023.1867765-1-chaoyong.he@corigine.com> References: <20240307112023.1867765-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR01CA0045.prod.exchangelabs.com (2603:10b6:a03:94::22) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH7PR13MB5959:EE_ X-MS-Office365-Filtering-Correlation-Id: b9fd07c2-de01-42ef-ee7b-08dc3e98a402 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZChoWk5luiABZSM3fW7k+VMZKYGB++WxJ3/MAB6MvGRJ/uTI05Ozl/cTBgHNcZwprwmvJkMa2uhOpEKWZQDtzcaEFG+Z5KI/QEF/8WuytyqHloj4tV9dJekJPgUKAMEL6xfFKW/TavMQZE6EZPnJMOpy2gogVgVYe5VQlPQme/I7+/9ikWjU5uBV+0Htuy4ZMkYP+mX4w/ntdTLjVPDt+3IJ1n3AH1wWq1kcLKVgF/cXDf/3bQH7WWxStzYLv8YIv+v6kfAzRHegjQjkr5Db6AqU66tGzYwfYcH2m7Xm9QN5b0yJUVVkANCZlNyzYmvqMx+4up//Le8pRiyqbHl2edO1Ae7XG5o+gQqWv2AhlyFqcN6/VdKLD/vfmWqn+8V0ZxJMeGrGeqKIeKpJlAzgDnn6Li6CNOmC00pTcHz6dIGNeqpZqqfuJ+EqnK14wzRLaybk4/76a1Jn9mR+gKGrdwPc1qFnhVKkCIKzaxYBiQHZ23C65ePB8T/bmSYsUCjN/Tm1Gfwd7YOhXwwRPjY5yvltzqovifJOyRGINwd+q2PpyqXdztwnSfMQiw71mjSzkSPZKtuPSG+/+DFewFfUxScBdgdWGIEo1cpU08e6/YtL/MFUmIk/ZAsQyFpFCXElz1XTXng3gBFio0Vc+A+2hgNhgIyt9n1ThPzgJ01QL5lBWp6S3uFfrDSGuFJS36FttK6NqtyLXg06EeSRU6E33w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?18wvxTtlhKyTGFzqNCzUYwA3XD/eEzQCgf5OS5hxXgNso/KR7bX4RKccCLAV?= =?us-ascii?Q?ys79MBLvCnA3tjD6pNMboCC4x/C5RJiE0TGZ8Q8pzIdE3/KQw2wpOXnn54qX?= =?us-ascii?Q?Q8IcXsZpqEVjROY6Tuz16j08yj63vMJYf72F18oRSd6aYJraU0gjzI/+3U6D?= =?us-ascii?Q?UWbKzQdcDzUq8ARyL4RZZOblv/6J+LXCIcsFbPcQfJHbBydWrS315jVwjttO?= =?us-ascii?Q?UGJcmL6ovS3DsiSEnVbEWNtNZxe1rIyTt5DNJmmUdFRqhN3jQYfyaAX6ZWjF?= =?us-ascii?Q?Rc0LChbMeGuKdpWhO//s89p5lUehL+a5Fej/xlDRCRMgh1EsrbqXOdYTzPbZ?= =?us-ascii?Q?aqEjerVv/KbT6/0xb/v2urmljf6jm7YXKXXt1j3eB54wIdjxqmhyPOCTNXXY?= =?us-ascii?Q?17zxYs1ucSTYAB8jZ24xKnqJ5NwFMMo8b01yQ42anNQqCsxLMEb92lz+JQFV?= =?us-ascii?Q?8CDLF8kr7aK79ueo8eqhyHDAXNuqBZJNvlnLjvAVI/BKF3CLxhG3G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Q8i4saXzsZ6NnxZc580BkYhcNU2iLY?= =?us-ascii?Q?/sI5C3oCZDM5YgcXv2xcv3wxE7BoHEROPP4Qc/Tpigs+Bm6sOEeiySuDTueb?= =?us-ascii?Q?Yat+vE23UUJ4SBtGsSJNWMbctpp9Iz2kxlPBDh3yoHu6U+uKR9cozVl/lD6d?= =?us-ascii?Q?MRol0gcfamDKCRajFOm73TB2VPIQmVKyfo/Ix1ZLEQqkLPU0XL0PjN4ZDLJm?= =?us-ascii?Q?pg=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9fd07c2-de01-42ef-ee7b-08dc3e98a402 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 11:20:49.0070 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Htda/WxLOLgsvMMdiGqtbIhWJFgYgG4UB+gp3V7LlUPy2ULKnH6tAscPieI5h4hcc3eWVg9pPcfZOzWdYziml27YCDkn+sti38Vhh05hOD0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB5959 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 [ upstream commit 243bbfa0f92f57851ae9369133256a622c79a2a0 ] Close interface use "rte_eth_dev_destroy()" to destroy representor. The "rte_eth_dev_destroy()" will call "rte_eth_dev_release_port()" but the "rte_eth_dev_close()" also calls "rte_eth_dev_release_port()". This will cause Segmentation fault. Remove the "rte_eth_dev_destroy()" in nfp representor close interface. Fixes: 7c596721ae5f ("net/nfp: fix resource leak for flower firmware") Signed-off-by: Chaoyong He --- drivers/net/nfp/flower/nfp_flower_representor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index b3359d3..ac092c2 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -547,13 +547,13 @@ nfp_flower_repr_free(struct nfp_flower_representor *repr, { switch (repr_type) { case NFP_REPR_TYPE_PHYS_PORT: - rte_eth_dev_destroy(repr->eth_dev, nfp_flower_repr_uninit); + nfp_flower_repr_uninit(repr->eth_dev); break; case NFP_REPR_TYPE_PF: - rte_eth_dev_destroy(repr->eth_dev, nfp_flower_pf_repr_uninit); + nfp_flower_pf_repr_uninit(repr->eth_dev); break; case NFP_REPR_TYPE_VF: - rte_eth_dev_destroy(repr->eth_dev, nfp_flower_repr_uninit); + nfp_flower_repr_uninit(repr->eth_dev); break; default: PMD_DRV_LOG(ERR, "Unsupported repr port type."); -- 2.39.1