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 4848C43B86 for ; Tue, 5 Mar 2024 10:54:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 426F742E29; Tue, 5 Mar 2024 10:54:52 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2057.outbound.protection.outlook.com [40.107.95.57]) by mails.dpdk.org (Postfix) with ESMTP id 872A94014F for ; Tue, 5 Mar 2024 10:54:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HCYreQRJq5+tzyO2ODIxCeGq9AKiWUJFWjvZxAzIoWd48q82kVUMagu3IEVP8NrWNCzyqgK+h+jq+lt50RpY7SQA836HUVQtPNmm7Yrb6N3RPc3BxJloAs7Gb323wRlbWTZdD5q0JlkWM1irIEFUYhAWlz/v9/m/Hrggzd7tu10qq6YZwHg5BleZISea7EG6SiERkXlwPZ3IbT+FVHw9XgqIjFIFZpX4BoN/8pynZHgCsErkAgdMMu/bVMMLKU1tjd0uE4oW99ASrVSkLzM4edFjiT94M1P1U8+SFlrrTT1Mckp4GoPCM/ojKPrkn0VvvQ+omV75hBQMJAFZaJSz0g== 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=zVxdCqjEeqvtrn2ngsRUYNiQB9Zoq8iWcmPzca4cAwE=; b=EWkEywdd1wgY+tldj8PeK1ANS2tNLW+IkvqtBLP+5AqtXfVW44Txm3esV/a9tlHricZADibX0dRKrQUnCqTKOe5v5mbw4PPNW/RlKc67ZiN42APQEkw1xLf/sP7mVrx+2RwRcrwIP9YBB9/moioO8MqBP2KFogEAgzkPtmghUzOn8kDaGAbaS1VWz+IQJJCD/fUdg/372cZ+brDnpYxhbV8z+w+O3m0bIfYe4CKoGLdzv7JY6HV5sbf2WrCJS8oXKDEqokkTa75OQWHwtZezUtaKv0aqF+LDx/fXgUOln1C52qNgS9sD3nRyDjwNr3nGAUUv+i1oi3Q6J7J8Mzh5cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=corigine.com 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=zVxdCqjEeqvtrn2ngsRUYNiQB9Zoq8iWcmPzca4cAwE=; b=G6bfrLdxj+9dvlZlvvqIISSQe0rOTKi7kgklWGHURZtTGhUqdWLMIDJgiXgvZCS4eTgqqvDyX/8rACr0yhEFJZKYD78cvgAQbx8q3Bs7+pYGZi524lNLQ+1neFOttpDPlFZ5lF1sA4hfoaIz0wJEtnlJzIts17/7txhoSPm2KY+vlIw0urwtnRpdyi8wg+Bk5Nd54WmIdVXVGNGRdEnF46K0c3k39LgfNHhDWRoK8NWq63I9a1ftlThfZ0LmdirU1eclSM4jMXbfwBeVPRDByxi8khus00nKssqs1MzWCUnDSK84EN2svQWBP9OsxcdypSvvW2uYvsSZQyfpVu2SwA== Received: from SJ0PR13CA0191.namprd13.prod.outlook.com (2603:10b6:a03:2c3::16) by DM6PR12MB4236.namprd12.prod.outlook.com (2603:10b6:5:212::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:54:47 +0000 Received: from SJ5PEPF000001D0.namprd05.prod.outlook.com (2603:10b6:a03:2c3:cafe::c9) by SJ0PR13CA0191.outlook.office365.com (2603:10b6:a03:2c3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.22 via Frontend Transport; Tue, 5 Mar 2024 09:54:47 +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 SJ5PEPF000001D0.mail.protection.outlook.com (10.167.242.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:54:46 +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.986.41; Tue, 5 Mar 2024 01:54:33 -0800 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.1258.12; Tue, 5 Mar 2024 01:54:31 -0800 From: Xueming Li To: Chaoyong He CC: Long Wu , Peng Zhang , "dpdk stable" Subject: patch 'net/nfp: fix resource leak for CoreNIC firmware' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:55 +0800 Message-ID: <20240305094757.439387-75-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@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: SJ5PEPF000001D0:EE_|DM6PR12MB4236:EE_ X-MS-Office365-Filtering-Correlation-Id: a44caed9-3f49-4e48-62c5-08dc3cfa4a7a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HsDmif/RNRuwU4ooO+JdV56mcwnfShJtYWT1AZmFFItjQc2Q+Nb/RnXFtXdFgaEeZf1/bgcIOzIOZrFhv2nQU2S2ClaAurZvmf95pxSdymQksT2ptDm+ce65nzfRd8iy1E8ipdIsgRX0bLe/EWpL+QhVPD/Y1O3jxJRUXNitGlv/BlkIDCa4iV5QXRmEEOqlJ3bjShnIx0a3oxkVWeS3Jz73NXXeMY+S/Nt2Q6Ef/wXL3kGlVBZD50HImsTg+VRpeMjnN8mjCVz08BMu9NetJCZiO4keAdWH6Rr3vEH6/0uT8jggJw63kfn8BL6a/74W0vKruojEy5/oo1AA6VhKzVAJ1UmG59uugpaI8eQCMVODPLxcfRqZEi9VYku7aLSbvYUfwyWpZjhZNtSWTZu1z47pixtzD8naTump/YYJV6biLgB7RpgqYUeTX59HkaJNJVTf0pEy1bqmg3XMnY0zfwCv2YgzZBe9YEIAY/2SQpEX/NiJuBYtb+54uQjh+HjfnvsMgcSSNMW+pBiHEA3yvn9wpLJcAND53Z4Nqe6qtuc4+g0DBD5ZDii+R3oV0vXL+7Kn6GrHZaeYcT5xYLLBLW/JCz0wm1NN57zd8G+oqhkA/C71YXaPxmXAwquHjtUhc4TBN1Nbr+GqGRPkNABJ5FZyWs1bQInRqUKjBt194cmykVLYe8GjAiQcyeDg5Tmr68gbPpgJsPqtmMkDv33Em7E+iLwFAGascl93rYrKoEBFgWBFv6ruVUbl0NpVtTFz 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:(13230031)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:54:46.8636 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a44caed9-3f49-4e48-62c5-08dc3cfa4a7a 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: SJ5PEPF000001D0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4236 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 Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=1d53d5495ba4c5f4a23bc2dbe9f26c33c15e74a3 Thanks. Xueming Li --- >From 1d53d5495ba4c5f4a23bc2dbe9f26c33c15e74a3 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Mon, 4 Dec 2023 09:57:13 +0800 Subject: [PATCH] net/nfp: fix resource leak for CoreNIC firmware Cc: Xueming Li [ upstream commit 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 ] Fix the resource leak problem in the logic of CoreNIC firmware application. Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file") Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 25feb8e394..38ee1c399a 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -310,6 +310,18 @@ nfp_net_keepalive_stop(struct nfp_multi_pf *multi_pf) rte_eal_alarm_cancel(nfp_net_beat_timer, (void *)multi_pf); } +static void +nfp_net_uninit(struct rte_eth_dev *eth_dev) +{ + struct nfp_net_hw *net_hw; + + net_hw = eth_dev->data->dev_private; + rte_free(net_hw->eth_xstats_base); + nfp_ipsec_uninit(eth_dev); + if (net_hw->mac_stats_area != NULL) + nfp_cpp_area_release_free(net_hw->mac_stats_area); +} + /* Reset and stop device. The device can not be restarted. */ static int nfp_net_close(struct rte_eth_dev *dev) @@ -1130,12 +1142,11 @@ port_cleanup: app_fw_nic->ports[id]->eth_dev != NULL) { struct rte_eth_dev *tmp_dev; tmp_dev = app_fw_nic->ports[id]->eth_dev; - nfp_ipsec_uninit(tmp_dev); + nfp_net_uninit(tmp_dev); rte_eth_dev_release_port(tmp_dev); - app_fw_nic->ports[id] = NULL; } } - nfp_cpp_area_free(pf_dev->ctrl_area); + nfp_cpp_area_release_free(pf_dev->ctrl_area); app_cleanup: rte_free(app_fw_nic); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:33.240549175 +0800 +++ 0074-net-nfp-fix-resource-leak-for-CoreNIC-firmware.patch 2024-03-05 17:39:30.803566494 +0800 @@ -1 +1 @@ -From 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 Mon Sep 17 00:00:00 2001 +From 1d53d5495ba4c5f4a23bc2dbe9f26c33c15e74a3 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8b8f116b199e31795ecd5cedb12302f10c0ae5a4 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 2a80a592f2..c132e97d1a 100644 +index 25feb8e394..38ee1c399a 100644 @@ -23 +25 @@ -@@ -317,6 +317,18 @@ nfp_net_keepalive_stop(struct nfp_multi_pf *multi_pf) +@@ -310,6 +310,18 @@ nfp_net_keepalive_stop(struct nfp_multi_pf *multi_pf) @@ -42 +44 @@ -@@ -1137,12 +1149,11 @@ port_cleanup: +@@ -1130,12 +1142,11 @@ port_cleanup: