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 2D9E9470E5 for ; Thu, 25 Dec 2025 10:25:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2838D40649; Thu, 25 Dec 2025 10:25:56 +0100 (CET) Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012061.outbound.protection.outlook.com [40.93.195.61]) by mails.dpdk.org (Postfix) with ESMTP id 1A80840609 for ; Thu, 25 Dec 2025 10:25:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GbB+hm5tjQAjT7gb+419YuvishqAkMsJRxUfZdMtLh9h9QaVqEmYQCZrOeU+YlogWSuuvsBhzKuMyF6T2gvX0JEsST2giguovURZwuIH0GPq4kocYIpYRX1cgq8ttKk+4x0l1DLYrTWh3e7XOctZ42SPxxAWINEAhx9cppaIWA2vAZaQgDttPU6P7fOF0f+PBpiL5sTXQxkudf2K0JloVi7jazOUDNCtnOjXMlrTDSi653JL/NzI9p3dZzvjUIARnCY0iqvmez/AgJskjmF2FkLLk1b059wlRs2vfBlPA6RwtXse2L27n5MkYbOXaE72sA+xhw/wPulCYbduMAs4pA== 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=CprL4nG5cWvSlExRRJLgJB/NUEYpGUteF/F025WTUpQ=; b=uuMOC9YK1QxXTUo5gd9/t55KwNxe4xGDhWRAu5ohpZbxi4rjI7WazrskyDY8ki48Hx2ogsSaFumqnHOsR32y8n6jYIUYHILI9QoEH9ODAHPAoQuYGgJsaa8ZKxYPnypmZRJkwGbxuUYIPm2yCIr7UX1AELmsUVfzAgh8N7C1qauc6F18svyahH6IxLcVHz8lYonYWdcVUW65g54OmHeE3hJoloUi9mNPmq1YB4bgAGHfe7amtn95/QqDFMTdwaukmCd5QarV6MrmqPki0Uh0uvdZNWHy1YjdHVfhw75A7ArDVTZLeFaAfrQBJEDIkqQ2jYunH2Plb0yeTdk0dKGz7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=CprL4nG5cWvSlExRRJLgJB/NUEYpGUteF/F025WTUpQ=; b=EC9uFelfejdA6MRPDHidqSLYB8110SOoKr8SF79lViehscBPaGKWlAh0X3kkjT7Ygu54cRBpOcpF+Ev2Sh0HENNUwXyFOX6L4/WYDwkpLIXo3nki7T0hJgWbu3K/I1QTSIVX+jiSYaUOtRqWB4PKVX4ykkyz3FpH8gKLSLc+Iv4cHoZlXA178+7UBzDAAgma6Mqkpl2Z0y+1ULkU5XKaMoHmxSCS6GQv5vuIFVusDrHTQfkE6vN8U3eJj+fUcKE4vUBHe2rNZQVEDGA5ILiPXOW3l+dPMrPlsrnPMbm0+Dpe+XuhK2B2pVdCFa6WkmBm/H8C0nkb1BXoErSU8j2pcQ== Received: from SA9PR13CA0017.namprd13.prod.outlook.com (2603:10b6:806:21::22) by IA1PR12MB6460.namprd12.prod.outlook.com (2603:10b6:208:3a8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.11; Thu, 25 Dec 2025 09:25:50 +0000 Received: from SN1PEPF00026368.namprd02.prod.outlook.com (2603:10b6:806:21:cafe::e6) by SA9PR13CA0017.outlook.office365.com (2603:10b6:806:21::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9478.2 via Frontend Transport; Thu, 25 Dec 2025 09:25:49 +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 SN1PEPF00026368.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:25:49 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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.2562.20; Thu, 25 Dec 2025 01:25:42 -0800 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:25:41 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:25:40 -0800 From: Shani Peretz To: Gregory Etelson CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix send to kernel action resources release' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:18:49 +0200 Message-ID: <20251225091938.345892-88-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00026368:EE_|IA1PR12MB6460:EE_ X-MS-Office365-Filtering-Correlation-Id: 37d1e86f-691e-4587-1371-08de439797e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/DgplRIj0WoQHY9+fuWyBiwmc7FdcVxZpSMTDjjg1BrmPPUz/8BAKyF7XCJi?= =?us-ascii?Q?XdfW5sTDZA/n49sSjANptRE/+3OapS0NuMMk9fbA9H0oA6jAE4c9O69X4UDY?= =?us-ascii?Q?T/SxZg2Xedoh2vRtzXURxWsR0IEFZIrj/l7Vm0wPSJqUZ2od4XTiYtAkaY+j?= =?us-ascii?Q?3Hiy+LD0hjdSwgHl5xxn9TnQXPzxD2SbmTVbL2MEsY6FDRBZhlPrD714f7KJ?= =?us-ascii?Q?RKt+r9RQ61sr/aoCnsVsjD7G66z27uhDh1YRkTRHzvAZL85YGDdWIQ2QSr0p?= =?us-ascii?Q?gnw3TbDim/4wv03/FP72/WQ8tEhWjLF0HDlCk7lnoV73ml/CUUq6OfmOVQrb?= =?us-ascii?Q?O9i0FELpiVwNmDEgATTZLWiUh/06xTDNw4Dn+1bLCOtScRZ8iiiAL0UOWcCv?= =?us-ascii?Q?n9PbBKLO0duFhOKpIWZFS3rqdebFofLej1Uvlv/YgvcfNyo6WhFat052Kf1C?= =?us-ascii?Q?Dq/Ov7gnEYeNM7E93fBNF28t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/FAN74/mIxJYfXcvDJosAtVplLnJhinThtU2ON5q8AHcrQnSKBcv?= =?us-ascii?Q?3rBe3ImMfTCjjUViYO61onkxKYs3sAamTOPwJ1BMJnGazpYwxBR+Ro/FkAdb?= =?us-ascii?Q?ou4vP0HrDEbvwcVj7HNbf+h5cP6+jXoiYxoB6NKTmnz5u6YOtpb9CU5Hq5Rj?= =?us-ascii?Q?H3tCpACKU1n1ihmGTVI=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)(82310400026)(36860700013)(376014)(1800799024)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:25:49.8964 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37d1e86f-691e-4587-1371-08de439797e1 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: SN1PEPF00026368.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6460 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/30/25. 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://github.com/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/413cffe7f2a2192820221c062d7875d736841b0c Thanks. Shani --- >From 413cffe7f2a2192820221c062d7875d736841b0c Mon Sep 17 00:00:00 2001 From: Gregory Etelson Date: Wed, 12 Nov 2025 18:24:40 +0200 Subject: [PATCH] net/mlx5: fix send to kernel action resources release [ upstream commit 472b0994319198090e44a7c2de1e43f0a0e0a270 ] In the MLX5 PMD hierarchy a flow table is bound to a domain object. A domain object can be released if it does not reference any flow tables. When the PMD creates a send to kernel flow action, it also creates a dedicated flow table for that action. The PMD called for Rx, Tx and FDB domain destruction before it destroyed send to kernel resources - flow action and flow table. As a result, domain destruction could not be completed. The patch moves send to kernel actions and tables destruction before domain destruction. Fixes: f31a141e6478 ("net/mlx5: add send to kernel action resource holder") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/linux/mlx5_os.c | 40 ++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 4059a1f52c..bcb127b192 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -708,6 +708,30 @@ error: return err; } +#ifdef HAVE_MLX5DV_DR +static void +mlx5_destroy_send_to_kernel_action(struct mlx5_dev_ctx_shared *sh) +{ + int i; + + for (i = 0; i < MLX5DR_TABLE_TYPE_MAX; i++) { + if (sh->send_to_kernel_action[i].action) { + void *action = sh->send_to_kernel_action[i].action; + + mlx5_glue->destroy_flow_action(action); + sh->send_to_kernel_action[i].action = NULL; + } + if (sh->send_to_kernel_action[i].tbl) { + struct mlx5_flow_tbl_resource *tbl = + sh->send_to_kernel_action[i].tbl; + + flow_dv_tbl_resource_release(sh, tbl); + sh->send_to_kernel_action[i].tbl = NULL; + } + } +} +#endif /* HAVE_MLX5DV_DR */ + /** * Destroy DR related data within private structure. * @@ -734,6 +758,7 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) priv->dev_data->port_id, i); MLX5_ASSERT(LIST_EMPTY(&sh->shared_rxqs)); #ifdef HAVE_MLX5DV_DR + mlx5_destroy_send_to_kernel_action(sh); if (sh->rx_domain) { mlx5_glue->dr_destroy_domain(sh->rx_domain); sh->rx_domain = NULL; @@ -756,21 +781,6 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) mlx5_glue->destroy_flow_action(sh->pop_vlan_action); sh->pop_vlan_action = NULL; } - for (i = 0; i < MLX5DR_TABLE_TYPE_MAX; i++) { - if (sh->send_to_kernel_action[i].action) { - void *action = sh->send_to_kernel_action[i].action; - - mlx5_glue->destroy_flow_action(action); - sh->send_to_kernel_action[i].action = NULL; - } - if (sh->send_to_kernel_action[i].tbl) { - struct mlx5_flow_tbl_resource *tbl = - sh->send_to_kernel_action[i].tbl; - - flow_dv_tbl_resource_release(sh, tbl); - sh->send_to_kernel_action[i].tbl = NULL; - } - } #endif /* HAVE_MLX5DV_DR */ if (sh->default_miss_action) mlx5_glue->destroy_flow_action -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:40.692809026 +0200 +++ 0088-net-mlx5-fix-send-to-kernel-action-resources-release.patch 2025-12-25 11:16:36.225854000 +0200 @@ -1 +1 @@ -From 472b0994319198090e44a7c2de1e43f0a0e0a270 Mon Sep 17 00:00:00 2001 +From 413cffe7f2a2192820221c062d7875d736841b0c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 472b0994319198090e44a7c2de1e43f0a0e0a270 ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ -index dba3b61b68..8026a68702 100644 +index 4059a1f52c..bcb127b192 100644 @@ -33 +34 @@ -@@ -737,6 +737,30 @@ error: +@@ -708,6 +708,30 @@ error: @@ -64 +65 @@ -@@ -763,6 +787,7 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) +@@ -734,6 +758,7 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) @@ -72 +73 @@ -@@ -785,21 +810,6 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv) +@@ -756,21 +781,6 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)