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 A5501470AE for ; Sun, 21 Dec 2025 16:00:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EBAD402AF; Sun, 21 Dec 2025 16:00:47 +0100 (CET) Received: from MW6PR02CU001.outbound.protection.outlook.com (mail-westus2azon11012021.outbound.protection.outlook.com [52.101.48.21]) by mails.dpdk.org (Postfix) with ESMTP id B867B402AF for ; Sun, 21 Dec 2025 16:00:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uT89pD7OkiBpOQZbq5shC7RxvA0d6LIaGONp8KTtSRMw/q+8ZK6cKfi4Ovi8ecK3FK0D2cKYVpvOOyorbWabxlzfrtyeFGG4C4O1EBD23syxuRkETt6L/7dilHKTh/N2gHTsxD03TgigGsEaRGW++ew7xZK/uRpQVP4hDCzVPp35TRWU98pPz940JH7D7Ra8wRanINcCdwDg1qfHYqFDk8P+q+C/yUkk30yL2Af0IIYZUNod26f6V+R4TcalV03uh4RAiq5KC72XbN7/+jMBeoMpLPslujYqfJFfclttDEuHUW3TpY9lFrzC1JnbjEGiQQoUaYRxXHi9yOzWx/+7dA== 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=ezWj5RMofB05htVuYmo4wxC9xeecTpkZRuGlzE5SsJU=; b=Fh9mexmHtsyQUaV4A0JGja4S7hyBEJ1yfSVIOM1oV7UabGzXWMhGvkWItJlKgp764Fl5/AUG9Wv0axAiq3qRqmaLIpTLMtB74+Da9j720uq1kulC5szVPKaOIMCPBufwdzU1arWsKAGuwerigK5N7qrHdYor4RyYzK4/3woow63yN6Mu3agYxEd/dKF2a7XV/ipPkDbUTVbITD7957G0Hj7Im57TeTKy8Hg6ILEZg3CUCsI1rbfEf/rIrAC3BKiZaOYJIWOjFBxpNyvBOIPKT1WCpwkWEg8+OtyyX+bqj8CJ3QbZNCBGSPMMfor+yqDUwm1rvRfN9YnU0qzYt3v2bg== 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=ezWj5RMofB05htVuYmo4wxC9xeecTpkZRuGlzE5SsJU=; b=rqiT35WcbDJiCmiIn+I4hkbarWfLIGHywjkKd2Oiw22UuEp/lMxL65crI34BrShcTy3BzzlxW4+MkbUg8LsEepCIpffJJN/w/+zEnf0/BSC8Zp7Bja3QnXbAUigyUhii4gmJZmiyKMUjrAk+B9AfYTlTyjdB4ZmRqWgyPlIc1phGd2jxs7mqD8C2eB7AIjV328l+7MCICXjNJg2mSqtHCBqlGLtnlzY7tts/W4NIXlBvXSZxGcVL0dkuhRzCCwaXSQPBB27fKK2GczX00odL9fwL1yE6svVHO4W78ED7lHfY0QRF/EF0RUib1eEIlZxUyvQM5iV5nuoldKPYUMai7g== Received: from MN2PR06CA0022.namprd06.prod.outlook.com (2603:10b6:208:23d::27) by SA1PR12MB9245.namprd12.prod.outlook.com (2603:10b6:806:3a7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9434.10; Sun, 21 Dec 2025 15:00:42 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:208:23d:cafe::71) by MN2PR06CA0022.outlook.office365.com (2603:10b6:208:23d::27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9434.11 via Frontend Transport; Sun, 21 Dec 2025 15:00:41 +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 BN3PEPF0000B370.mail.protection.outlook.com (10.167.243.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9478.0 via Frontend Transport; Sun, 21 Dec 2025 15:00:41 +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; Sun, 21 Dec 2025 07:00:21 -0800 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Sun, 21 Dec 2025 07:00:21 -0800 Received: from nvidia.com (10.127.8.12) by mail.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.2562.20 via Frontend Transport; Sun, 21 Dec 2025 07:00:19 -0800 From: Shani Peretz To: Maayan Kashani CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix non-template age rules flush' has been queued to stable release 23.11.6 Date: Sun, 21 Dec 2025 16:56:13 +0200 Message-ID: <20251221145746.763179-25-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251221145746.763179-1-shperetz@nvidia.com> References: <20251221145746.763179-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: BN3PEPF0000B370:EE_|SA1PR12MB9245:EE_ X-MS-Office365-Filtering-Correlation-Id: 7605412c-fab4-4f1c-8008-08de40a1b5c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?h9+VLY5WczNbl06u7DX4noGllImmTZjRDPvXI6prbmMbdqtC4Gis4ZMhV5IU?= =?us-ascii?Q?epVXWYXAs6xXYzFxTai7EtmlYXeSC4eXWnrAfMkOgDdh99f7ZhxcCVgbsUMx?= =?us-ascii?Q?0qheNiLCCfZ7al49e7uPigidLYfHV/Gj6WK14w1xD5CoUdEPZv5FN4+si9XM?= =?us-ascii?Q?/aGwes+3Kq4Npv/iMBSFGf+M1HDjgdkeIRvV0ldi9eQzznSnWSzK5aNNo42B?= =?us-ascii?Q?z9aQjcmiKvGubRoVX+CDNn+6HghRU/joIxALXO4XO+U2BIqO/Sz1geyLVmwp?= =?us-ascii?Q?935L7cXLdNOy8pm6wzKec4vrIs5iGYNvByQGNEXmJervD94O634HV8CEz8WE?= =?us-ascii?Q?SFZMT3+LiRLSl1bWzAhJpFY2YjCyBHbjvOZBLY+FDUIEOGeuqOuCnA6HCYtX?= =?us-ascii?Q?NSZq7W2u99yaNeTS4s9ccp3IlWIZHrHRPdQ9WALKEp8oHLMuLjrcuNbmV15X?= =?us-ascii?Q?3In1oPK5aL7n0gw8D3gTNn8KuxFUqZO/cKMCdg+fFr8+H/06CtndOwWSc3iV?= =?us-ascii?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QZCCaCvITjDnR8+S?= =?us-ascii?Q?mv29HQu8LKgucEeoG5DNSZgqk4tBkw04F4fLBCQwa1UzPHlxsn0BQBYhHny1?= =?us-ascii?Q?pW6BVPQZCFJ2FauQnW8/QQSkze0f5ph00y0wGaNdElUFIruEcHn4WFWqrjGp?= =?us-ascii?Q?0PYHWFlJ+UJOT7Y8VQo6Td6NU9qAmy48hIzRdcFL?= 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)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2025 15:00:41.5080 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7605412c-fab4-4f1c-8008-08de40a1b5c7 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: BN3PEPF0000B370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB9245 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/26/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/bb50186e8f10bc5f658b7dc36216770f343e28d8 Thanks. Shani --- >From bb50186e8f10bc5f658b7dc36216770f343e28d8 Mon Sep 17 00:00:00 2001 From: Maayan Kashani Date: Sun, 10 Aug 2025 09:47:31 +0300 Subject: [PATCH] net/mlx5: fix non-template age rules flush [ upstream commit 7fb2007bb1fc0b949661e316cfa60bbdf60e54ac ] When a user creates a non-template rule with both age and counter actions, both actions share the same counter. If a flow flush occurs, the rule is destroyed and the counter is released. However, the age sampling callback may still access the age/counter during the free, leading to a panic on assertion in debug mode. This creates a race condition: one thread samples the age while another releases the age/counter info used by the age action. The fix is to ignore this case where the age is free and counter not freed yet, or the counter was freed during the age check. Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS") Signed-off-by: Maayan Kashani Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_hws_cnt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c index a47ac098cb..abdf32dd86 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.c +++ b/drivers/net/mlx5/mlx5_hws_cnt.c @@ -163,10 +163,13 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool) break; case HWS_AGE_FREE: /* - * AGE parameter with state "FREE" couldn't be pointed - * by any counter since counter is destroyed first. - * Fall-through. + * Since this check is async, we may reach a race condition + * where the age and counter are used in the same rule, + * using the same counter index, + * age was freed first, and counter was not freed yet. + * Aging check can be safely ignored in that case. */ + continue; default: MLX5_ASSERT(0); continue; -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-21 16:54:18.616810225 +0200 +++ 0025-net-mlx5-fix-non-template-age-rules-flush.patch 2025-12-21 16:54:16.831117000 +0200 @@ -1 +1 @@ -From 7fb2007bb1fc0b949661e316cfa60bbdf60e54ac Mon Sep 17 00:00:00 2001 +From bb50186e8f10bc5f658b7dc36216770f343e28d8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7fb2007bb1fc0b949661e316cfa60bbdf60e54ac ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index fce7a7e815..5c738f38ca 100644 +index a47ac098cb..abdf32dd86 100644 @@ -31 +32 @@ -@@ -170,10 +170,13 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool) +@@ -163,10 +163,13 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool)