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 E138448A44 for ; Fri, 31 Oct 2025 15:36:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D990D40666; Fri, 31 Oct 2025 15:36:52 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 37F5040666 for ; Fri, 31 Oct 2025 15:36:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761921410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pt5RlCKXntBPtSzS8Hhd7323Sc26OHoLDyrDvLGqJCU=; b=gjQFmMbgEJb2Z8QtyZ8NLrcDm8GaPEMPptH5LUw+Ls3pFBrgi3oE47bGFQ1FZvHdk7r1HT BLTVeYwu4GHWNjsE/CVtNKrdCmIZ6RzVuINlwgCmCBZMxU7Ii9LeJTE/gYsF4xWWIYGgpt T0xQ4Hxk7MUWBp5xjZX9dPWIUMjM2sw= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-d_2Q48WcNBeLppAhgSuMsA-1; Fri, 31 Oct 2025 10:36:46 -0400 X-MC-Unique: d_2Q48WcNBeLppAhgSuMsA-1 X-Mimecast-MFC-AGG-ID: d_2Q48WcNBeLppAhgSuMsA_1761921405 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 58EAE1955EA0; Fri, 31 Oct 2025 14:36:45 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.50]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B38F3180061E; Fri, 31 Oct 2025 14:36:43 +0000 (UTC) From: Kevin Traynor To: Maayan Kashani Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix non-template age rules flush' has been queued to stable release 24.11.4 Date: Fri, 31 Oct 2025 14:32:39 +0000 Message-ID: <20251031143421.324432-37-ktraynor@redhat.com> In-Reply-To: <20251031143421.324432-1-ktraynor@redhat.com> References: <20251031143421.324432-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 5ifnvrAkSuh0RWROnINN3UXEUFDosa8-o-i0_ivak7E_1761921405 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/9b87a15cdd1467c94060157ada6790878441bbcb Thanks. Kevin --- >From 9b87a15cdd1467c94060157ada6790878441bbcb 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 dda3b61376..7baeaedd17 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.c +++ b/drivers/net/mlx5/mlx5_hws_cnt.c @@ -164,8 +164,11 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool) 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); -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-31 13:53:53.411130215 +0000 +++ 0037-net-mlx5-fix-non-template-age-rules-flush.patch 2025-10-31 13:53:52.097647892 +0000 @@ -1 +1 @@ -From 7fb2007bb1fc0b949661e316cfa60bbdf60e54ac Mon Sep 17 00:00:00 2001 +From 9b87a15cdd1467c94060157ada6790878441bbcb 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 dda3b61376..7baeaedd17 100644 @@ -31 +32 @@ -@@ -171,8 +171,11 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool) +@@ -164,8 +164,11 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool)