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 913B143E57 for ; Sat, 13 Apr 2024 14:59:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79A6B40A72; Sat, 13 Apr 2024 14:59:36 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2089.outbound.protection.outlook.com [40.107.236.89]) by mails.dpdk.org (Postfix) with ESMTP id 0C7FB40294 for ; Sat, 13 Apr 2024 14:59:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CFN8ZvnxEFXHIoj1Eurc6+2BPmAbxfH5fOADdYZMucuE1qh9QPrpYidr5Agz3qGCX8wQ4JCZvKtTD+myENvFeQYEpXLMfxsPf07/mVmz97tLG82Oh/H9qdj0oYxVrOxU80nuyTl9pjjPOje3nWPQeNLB/KxaBb+Q00IVerOYecIYmEVi6Izp0Af64/UAFhcqyY4PRDPHqtCwjL6PpXR1vqyAMbyoHmVpEsErbB6xAXvXnFv9HHxFGMb399dRAfzAtX5ghnDcakEMzSRpZFQG8D7PzGQV9TDNmqE4kyy2pgNMVNoPoqCLufIPOUnp4f3LuJsS6gomC+z6t5Qelu3xUw== 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=5yzY3sjSaedHOfz/zaPGxRxpG1s9zNIPNAoIkJjrTkY=; b=gKLnf0g6oaiP6SRSF52eEf/yssbPHRr3n8U+GDRYHTikr68VtV4yiekjvVX6dy2PSCzroiHwL8pVqN0aomNC9OHboB9sZgG3RH2EN5JJZaYAVwrFIoNrhK6OQFzwxUN8cNUCu2iLW3rErsFzeJlNYT0YsAZi6lRCR/b1uFvjRwG8xiW1KqnaMXl64vwCnmVOdfcvZmr/KpMFLr6TUUpCpb7KjNpI7TcUm0NlZf9GSasM6vhVMxOrxXBhSUe7nNkLqIOKAhsR6iyrut2puVvMCcepkAAC6NCW7xOQRY9D8A6ZQiH7Ox3042FxeSrWQX6/Egcm8ThKxAEMIGlqiV4vKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=5yzY3sjSaedHOfz/zaPGxRxpG1s9zNIPNAoIkJjrTkY=; b=QcijoJdUh/HTBONu6T3s5OpBOa6RmvL3ThENypslye6kadIpCLkqHA86Bl6xiru5yZQlL6bs3MbzvairokZT06BEJgdE2NCQ93mfJOdtX15K7IkeK3W+bhSObina64lbfBBqNLtuqzCs82IpEdKk4iDQDARofdyLWFOp0utCRHgWmiA1Vsaq+1fMb3bJsLOGvjaw8Qpyu4MN1dsdjZOAAiLh9aLnZB+c/576g+M1f5IYs5F9cnhY8/++3QcXPwSxSukTFKr7ZqU9alpzKsFDrfWZvXiKDJ0aUFosT+JMj48GmkSStaoim3nHDD8uY82diXw3JgD7fW5y+1ZfvcED/A== Received: from MW4PR03CA0258.namprd03.prod.outlook.com (2603:10b6:303:b4::23) by SA0PR12MB4447.namprd12.prod.outlook.com (2603:10b6:806:9b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.43; Sat, 13 Apr 2024 12:59:31 +0000 Received: from MWH0EPF000A672F.namprd04.prod.outlook.com (2603:10b6:303:b4:cafe::40) by MW4PR03CA0258.outlook.office365.com (2603:10b6:303:b4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.19 via Frontend Transport; Sat, 13 Apr 2024 12:59:30 +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 MWH0EPF000A672F.mail.protection.outlook.com (10.167.249.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:59:30 +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.986.41; Sat, 13 Apr 2024 05:59:20 -0700 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.1258.12; Sat, 13 Apr 2024 05:59:19 -0700 From: Xueming Li To: Maayan Kashani CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix DR context release ordering' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:41 +0800 Message-ID: <20240413125005.725659-101-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@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: MWH0EPF000A672F:EE_|SA0PR12MB4447:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a1f864d-dfb1-49ec-2e50-08dc5bb98f25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5o79hqCSGmz1ER0hdW1FFqTE8LxLbQhpt3Ds9AzsFiicw1qAnaFkgS0Zxg9X+7MstR/6BwoFmA9jJgSEUIuQwJgFsz3I8Lv5luSqkyH+/j4PqeLXzuAbbNIDPSEE9oZb1HMDAPNwml4Kyjfgt5qiarJKlW44Cv9CI0u2SXmauLpX6zZo6RJWMQOXTT9XtJaf+UDTbebn7iAvPV1ARiuPXbJG9/eE44K2aaDcLN5xw88NmtUws9IVFInLVJN7e4PqRM3FIIBhg5qhYPcl6MUK3vuBf6uvjWbn9xh6gzU6bPpykJXMeyy6QJuO4Nq+oHqlCzC3+uWLHMefYXhVtLrS49yBO9vG3KcFeIo89V6tBbxaFP8d4QzIAGnZ9mtiuBOV8mOlJPhbQAikBvxvFO3moOD8caT1zBRhFgPiwL+ozvu4n3dZ8GV/DG9G366FhwphHCl+Dcs9APKhcDYBtv7ZxX8UrZaa11zchszUDZMjC+gu6ksLZ2OkfVmEqvXcNExxcK7G/3b8y/d8POg+q7ftJxx4Y+IOvxjbHtvWFpxrhgwjnK5MTDBMrr+kVQ0ZPtZrvDqVYMS9Q1/AovDICqlfyPzY/JFliQxrVJamW/Dxh4jyZ2UOhIqDNH0dvBZpwsU0GM/tKm1xOccvP9yhCsJLm+YApyxLACFycIrwaqFOxMaQ7Bvy4SZoop1VfDzHEHUQJ3fDMWrfYcao9umr8iOcfo/YQf3CZ4XmWXVjq5IcgzZtfgEuMsbl1fxlfOQPIn2I 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:(13230031)(1800799015)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:59:30.7486 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1a1f864d-dfb1-49ec-2e50-08dc5bb98f25 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: MWH0EPF000A672F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4447 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 04/15/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=859bafedf3ae9983e143ee35bcbb8046b91430bc Thanks. Xueming Li --- >From 859bafedf3ae9983e143ee35bcbb8046b91430bc Mon Sep 17 00:00:00 2001 From: Maayan Kashani Date: Wed, 6 Mar 2024 08:02:07 +0200 Subject: [PATCH] net/mlx5: fix DR context release ordering Cc: Xueming Li [ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ] Creating rules on group >0, creates a jump action on the group table. Non template code releases the group data under shared mlx5dr free code, And the mlx5dr context was already closed in HWS code. Remove mlx5dr context release from hws resource release function. Fixes: b401400db24e ("net/mlx5: add port flow configuration") Signed-off-by: Maayan Kashani Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5.c | 7 +++++++ drivers/net/mlx5/mlx5_flow_hw.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index df0383078d..95f2ed073c 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -2268,6 +2268,7 @@ mlx5_dev_close(struct rte_eth_dev *dev) mlx5_indirect_list_handles_release(dev); #ifdef HAVE_MLX5_HWS_SUPPORT flow_hw_destroy_vport_action(dev); + /* dr context will be closed after mlx5_os_free_shared_dr. */ flow_hw_resource_release(dev); flow_hw_clear_port_info(dev); #endif @@ -2299,6 +2300,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) mlx5_hlist_destroy(priv->mreg_cp_tbl); mlx5_mprq_free_mp(dev); mlx5_os_free_shared_dr(priv); +#ifdef HAVE_MLX5_HWS_SUPPORT + if (priv->dr_ctx) { + claim_zero(mlx5dr_context_close(priv->dr_ctx)); + priv->dr_ctx = NULL; + } +#endif if (priv->rss_conf.rss_key != NULL) mlx5_free(priv->rss_conf.rss_key); if (priv->reta_idx != NULL) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index aff1ab74e3..9de5552bc8 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -9756,13 +9756,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev) } mlx5_free(priv->hw_q); priv->hw_q = NULL; - claim_zero(mlx5dr_context_close(priv->dr_ctx)); if (priv->shared_host) { struct mlx5_priv *host_priv = priv->shared_host->data->dev_private; __atomic_fetch_sub(&host_priv->shared_refcnt, 1, __ATOMIC_RELAXED); priv->shared_host = NULL; } - priv->dr_ctx = NULL; mlx5_free(priv->hw_attr); priv->hw_attr = NULL; priv->nb_queue = 0; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:08.112838763 +0800 +++ 0101-net-mlx5-fix-DR-context-release-ordering.patch 2024-04-13 20:43:05.097753801 +0800 @@ -1 +1 @@ -From d068681b637da6b7857c13711eb1a675b2a341e3 Mon Sep 17 00:00:00 2001 +From 859bafedf3ae9983e143ee35bcbb8046b91430bc Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 39dc1830d1..8b54843a43 100644 +index df0383078d..95f2ed073c 100644 @@ -26 +28 @@ -@@ -2355,6 +2355,7 @@ mlx5_dev_close(struct rte_eth_dev *dev) +@@ -2268,6 +2268,7 @@ mlx5_dev_close(struct rte_eth_dev *dev) @@ -33,2 +35,2 @@ - if (priv->tlv_options != NULL) { -@@ -2391,6 +2392,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) + #endif +@@ -2299,6 +2300,12 @@ mlx5_dev_close(struct rte_eth_dev *dev) @@ -48 +50 @@ -index 817461017f..c89bd00fb0 100644 +index aff1ab74e3..9de5552bc8 100644 @@ -51 +53 @@ -@@ -10734,13 +10734,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev) +@@ -9756,13 +9756,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev)