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 53031489EF for ; Mon, 27 Oct 2025 17:21:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E4DA4065B; Mon, 27 Oct 2025 17:21:04 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id 5194840657 for ; Mon, 27 Oct 2025 17:21:03 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-475dae5d473so25924475e9.2 for ; Mon, 27 Oct 2025 09:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761582063; x=1762186863; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8RHPpykyd/DLszSPhyY58v+efyEnMhyTsZ5i4OsJHwc=; b=lzunOCx+QTca4zvTkuwscPBdylafnYql+vd1dPDV9+8FwzED8TrLN4OTUVZrNcCv4r /SJVOIsv95NL8rA9kmTAnZ7YxmqxD6kPZv2AakMTcQaIzXd5YaG0Fcef9u7flxzLn1vV JYzaTmKk+99Pzx2BjsT77a5j6EEK+oAI/2SnHO2TQAdi0JqySmlebotY5lEKLZMxCUyD j0QVCitAytT1mUK3ZyLAwdzCHwoiqSfy7BL0v6uapimDl7TF9rPTNXVqs+NY+/3fZnxc lKmOQitbIaRxfqj3ezM7uDTo0MJY+boIx2YlDOqS6Zmrkke4BWTI8CrtGuZN9/GR6idW OUww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761582063; x=1762186863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8RHPpykyd/DLszSPhyY58v+efyEnMhyTsZ5i4OsJHwc=; b=ZBjD/Lqq8gq26b2eY84gKVdApiqVn6whLbpSfGtVKZAIoB1pPKct8pIfUc4GidGQsn IB5q/9QQAuIHtjRZDBa6JyyJtg1r8H3/q9BMvybWeDw+uWocfotldPmlXNYk1fFk0Zrb zweGQevytCR2UtxpuuiKAanQUtDmaHfHQOWCT2kKy02DalTrbwQ+wb9V6KuaFSDbiWB6 it8Dt6b2rgb7c+rBl8xhn59IaPnHdEyee+0hDtOAVCQrs1G6RMU7U25ZIEob9gCCitEX TUelHzL7gWVfnzqJBPaS8BN4X32TOMBkri8DVBhROxGJeFpfMg9mr3YNqEUm0f5NmvKI az0w== X-Forwarded-Encrypted: i=1; AJvYcCVbM6045LFEgBnYJzQ8ZA7i4L9O9EwwvfUdp8f6KraijxJC1EcDcxFGXujRqMg541d6gvUMbSI=@dpdk.org X-Gm-Message-State: AOJu0YwmC59/Ap8NdNgHU2VfxphsGhAShpAYe+7V6HBDw3t250j93U9m S2qjbAYWoxLE2AvCWM0zJTWx5X7BCmvp5IFzR0uueogDUBE7O0bTlfBO X-Gm-Gg: ASbGncvPimlMAilwjjSUVTr43epnty3psQ08Wr5NN8FCLKZRN4+Gj3LRBXPoIn+NKnh LJHXQbc+XeXFBn3hgbCJU7t/sMKpsb8mDo6IwtpkC4roKMg+n5sgMz1TAZ22yyO/nkK3IyyJhoG JRMgveSDaq111qV9/kaOsXbhfG1L/QQtzA7k9J4u7fWIsSHrKsr6oYbt06BELEj+GLw5j7641Ol O8TYYke3lXazu44t4npld1GWoC1ys/7Tw++agRZjq3612YCuUknBUmftfF2YTLY2lcTGmfVMFch PudTpsZLy3RbptMbqPNViJPyoiqnMwGKRaNour73ULJCYBo8ddtTziPV/rJBH0X9k6ovifDu7pT te35rZ/XN+uOEoBo0uSMYN9LS+hsiyjRY0ayujqvoV5e9hdkL1Pb2jAL6OWCaIXQ/3WuNEFKMJw aDb0lrZdwfshQ+PMQM X-Google-Smtp-Source: AGHT+IEp48HxfZMbgTcZOiNes/vGNDEII+4KZ69zu2jcpqAnAdKSUcgvR0486NifBSV5Kb90GqMn1Q== X-Received: by 2002:a05:600c:314d:b0:46f:b42e:e3a0 with SMTP id 5b1f17b1804b1-47717e77674mr1599105e9.41.1761582062765; Mon, 27 Oct 2025 09:21:02 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:6fc5:c3bc:147e:832c]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-475dd47793fsm148169415e9.3.2025.10.27.09.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 09:21:02 -0700 (PDT) From: luca.boccassi@gmail.com To: Maayan Kashani Cc: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix non-template age rules flush' has been queued to stable release 22.11.11 Date: Mon, 27 Oct 2025 16:18:57 +0000 Message-ID: <20251027162001.3710450-19-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/efd6af31a6b84440c252bb12548651fc1fb12fc1 Thanks. Luca Boccassi --- >From efd6af31a6b84440c252bb12548651fc1fb12fc1 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 6e4b093bd8..6a0c371cd9 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.c +++ b/drivers/net/mlx5/mlx5_hws_cnt.c @@ -179,10 +179,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.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-27 15:54:35.544102379 +0000 +++ 0019-net-mlx5-fix-non-template-age-rules-flush.patch 2025-10-27 15:54:34.755948546 +0000 @@ -1 +1 @@ -From 7fb2007bb1fc0b949661e316cfa60bbdf60e54ac Mon Sep 17 00:00:00 2001 +From efd6af31a6b84440c252bb12548651fc1fb12fc1 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 6e4b093bd8..6a0c371cd9 100644 @@ -31 +32 @@ -@@ -170,10 +170,13 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool) +@@ -179,10 +179,13 @@ mlx5_hws_aging_check(struct mlx5_priv *priv, struct mlx5_hws_cnt_pool *cpool)