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 C0CC943B7D for ; Tue, 5 Mar 2024 10:57:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB0FF42E32; Tue, 5 Mar 2024 10:57:00 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2054.outbound.protection.outlook.com [40.107.223.54]) by mails.dpdk.org (Postfix) with ESMTP id 34F614014F for ; Tue, 5 Mar 2024 10:56:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7c+s9SJJ+Lxm7vGblSPgIAEXClCqhx0d8eSGTwBnyYZth0j1p1XvW2kA5ElEmimwrJeCufiv82ojhfX81rdm//sHi4neCyhpSmE6HgHTbiiHLySNoljkcdbeRfWE1cZz8sCSYE2rge3LbC6Z5N9gLNjcuTsb5N/PqPsZc3APfFHn9OQNvnt/o05p8WEfXEb/hbi2+/RLf/uF18dyCcFvoW22yfpRByu0aWyWY/vHshTLnyS+1dXLXCkhLuTU0aFTtFGlvq9qS+zBeJ/Rey2Ljn/CyR8YnUT43RVcy0aBTevOBxzdT1LlFwTu/a7rVy6ME/iirKmLRNaFNKIQ18XLw== 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=Bl3q0NBcUpL0eyo+u7mHiNaLWe2es3hogNo+VffMpUQ=; b=A6OhzB0cSSBNkn/6rZOtrv6yIrPu0AfZubP+OkziCcunek0CyLCcibJFT8y4YAm7E3Ndvi99KefJ2/nJ6MythJMCLX8fgKz/p5XOBX8vHVewaayvBaBvniRL1msPftuh+Z8gcm6FnBIzlUmQ43u5Ady/JNwZbXV0jMi2c/3Ot9w0YOnMumaP+yqkNX8qGtp38e/TIuy8DVW7v9XQzzghZvf5p4GGBHE6eCQYP+UDMkE5Hpe6kxzjb81hNHBvEDcJXgSZaf6zoSAepnJwo19ytNUpok+9I9C9jY8cXazPnxIlyaKqNLBztfcYH99o8LrKXkRK2M2UKf2qW7G06SpxqQ== 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=Bl3q0NBcUpL0eyo+u7mHiNaLWe2es3hogNo+VffMpUQ=; b=FHOZfeUvPPVKSPcOht3HH/8koE5nlG/iw+zuYN8YOuXj7c77R/P09xeCZm1c/FzjLj942M4fx3016Iv2rdNRfa7u3Qmyg2s6nlU3BlaMzC7xEy5U2vK9mSDr78azybUiicVsc1ikG9bwnXn+/XmMj+GTVhugOTqC/hzbUPHN8oV+UvoDPvv5VpeRjpvGa54r14GIiMtFiqqBu0Uvz2ZKi3a3A/9gL7rqSBOC3JuAX9ppz809Qzrjylx0965rckeu5aoRpjzclr+rG82ear5ZS3E5RBe8d9GUByLCHS/OK/p86xOAnzZzpdAM0n48pIk3s5wq7LF/X4/RfQ6xpagdAQ== Received: from BYAPR01CA0028.prod.exchangelabs.com (2603:10b6:a02:80::41) by IA1PR12MB8358.namprd12.prod.outlook.com (2603:10b6:208:3fa::17) 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:56:55 +0000 Received: from SJ5PEPF000001D3.namprd05.prod.outlook.com (2603:10b6:a02:80:cafe::94) by BYAPR01CA0028.outlook.office365.com (2603:10b6:a02:80::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38 via Frontend Transport; Tue, 5 Mar 2024 09:56:54 +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 SJ5PEPF000001D3.mail.protection.outlook.com (10.167.242.55) 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:56:54 +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:56:42 -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:56:41 -0800 From: Xueming Li To: Long Wu CC: Chaoyong He , Peng Zhang , dpdk stable Subject: patch 'net/nfp: fix device resource freeing' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:17 +0800 Message-ID: <20240305094757.439387-97-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: SJ5PEPF000001D3:EE_|IA1PR12MB8358:EE_ X-MS-Office365-Filtering-Correlation-Id: 73ff89a7-e850-45a6-1471-08dc3cfa96d6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5TEIZjJLaqalBITTC4vrRWCezIRZsmqS6MR/qPRTVfSqBqgl7H1kEUmFnFZXADLsNpCTdULp7FPoHjWOFkE+1wKnwddp+hSZ65tqd3JOXXsF3SR1XoR2+aQIdUPJEAoZY7yWIhd4qf03/wJP3CNazimWilGy98n7aG+MbFJoYclUHLdyPn3K9kOjlFUQAD2e0Vm01tqxWNmquAT40obL7cvKIchNq5pGWlSOidVmkD5NECCVl+for0TgrHZG23C6D4zn5HaIMvZnwZbT5hk6Hs3xQhcdnolbcUlLNGkVrDfQmEwKSsuFCKmgEl4Z7EYzfteksPrgkLcsKPOrEJ0jIChDafO5A/Dhsf2wy0K2njlGuc53rNzB32VHYcrcEOnvQn1JssQlZe5zNS2iQ6gApRv46c7hQDIyBKh8b7nBpQBcqtkWPizr+9BZrp6R5oZ/Hie38uB2OxydcqUUa8UMIgINFXJnFb8PjuFvVGVSXQl7k4PHC8u03LvXyONF4HeAXBZP2JSbSzxZoB5n1/sgMMg2df6F/NguOA5zsLkBGaGLC/QdLShs2/gwa7R22H/vS1MdR3lf/+XaOjaI671GQb1gCCrOzvdbPkYXxowD9R6dm0YJ8Xbb5wa77Xt3dTRRdaRODK8ejg4uWI5vuEoWKNrh0/tLa6JV3FUGunJD8tVX0oH2fxKV+IyvL/C5SkhmiKgnCJPWFXYOTWz5taL0vbiCiIEupa1Grs8y0aZo+eTaBU53vT/Ls42rQQbmKLSY 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:56:54.9558 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73ff89a7-e850-45a6-1471-08dc3cfa96d6 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: SJ5PEPF000001D3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8358 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=a581442d9ba98f8a21bf4e1d71e0cfa85d1e1eb1 Thanks. Xueming Li --- >From a581442d9ba98f8a21bf4e1d71e0cfa85d1e1eb1 Mon Sep 17 00:00:00 2001 From: Long Wu Date: Thu, 14 Dec 2023 18:24:30 +0800 Subject: [PATCH] net/nfp: fix device resource freeing Cc: Xueming Li [ upstream commit 09309f87358b3a538af47e31340898a15bb34d85 ] Set the representor array to NULL to avoid that close interface does not free some resource. Representor array points to dev_private which is already freed by 'rte_eth_dev_release_port()', and 'nfp_flower_repr_dev_close()' requires pointers to be NULL to proceed freeing other resources. Fixes: 7c596721ae5f ("net/nfp: fix resource leak for flower firmware") Signed-off-by: Long Wu Reviewed-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_representor.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index a18b3951da..4937c0780a 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -294,17 +294,30 @@ nfp_flower_repr_tx_burst(void *tx_queue, static int nfp_flower_repr_uninit(struct rte_eth_dev *eth_dev) { + uint16_t index; struct nfp_flower_representor *repr; repr = eth_dev->data->dev_private; rte_ring_free(repr->ring); + if (repr->repr_type == NFP_REPR_TYPE_PHYS_PORT) { + index = NFP_FLOWER_CMSG_PORT_PHYS_PORT_NUM(repr->port_id); + repr->app_fw_flower->phy_reprs[index] = NULL; + } else { + index = repr->vf_id; + repr->app_fw_flower->vf_reprs[index] = NULL; + } + return 0; } static int -nfp_flower_pf_repr_uninit(__rte_unused struct rte_eth_dev *eth_dev) +nfp_flower_pf_repr_uninit(struct rte_eth_dev *eth_dev) { + struct nfp_flower_representor *repr = eth_dev->data->dev_private; + + repr->app_fw_flower->pf_repr = NULL; + return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:33.892517897 +0800 +++ 0096-net-nfp-fix-device-resource-freeing.patch 2024-03-05 17:39:30.863566496 +0800 @@ -1 +1 @@ -From 09309f87358b3a538af47e31340898a15bb34d85 Mon Sep 17 00:00:00 2001 +From a581442d9ba98f8a21bf4e1d71e0cfa85d1e1eb1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 09309f87358b3a538af47e31340898a15bb34d85 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 27ea3891bd..5f7c1fa737 100644 +index a18b3951da..4937c0780a 100644