patch 'common/cnxk: fix atomic load in batch ops' has been queued to stable release 23.11.4

Xueming Li xuemingl at nvidia.com
Tue Feb 18 13:34:13 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
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=3d543686ef3e94e2da99b52b42d02293e7b511bc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3d543686ef3e94e2da99b52b42d02293e7b511bc Mon Sep 17 00:00:00 2001
From: Nawal Kishor <nkishor at marvell.com>
Date: Mon, 2 Dec 2024 22:27:39 +0530
Subject: [PATCH] common/cnxk: fix atomic load in batch ops
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 73d38682fddd614d95942442c20b3a1de211bb4c ]

In roc batch alloc wait code, __ATOMIC_RELAXED is changed to
__ATOMIC_ACQUIRE in order to avoid potential out of order loads.

Fixes: 50d08d3934ec ("common/cnxk: fix batch alloc completion poll logic")

Signed-off-by: Nawal Kishor <nkishor at marvell.com>
---
 .mailmap                      | 1 +
 drivers/common/cnxk/roc_npa.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 820c201bfe..75440baa40 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1025,6 +1025,7 @@ Natanael Copa <ncopa at alpinelinux.org>
 Nathan Brown <nathan.brown at arm.com>
 Nathan Law <nlaw at brocade.com>
 Nathan Skrzypczak <nathan.skrzypczak at gmail.com>
+Nawal Kishor <nkishor at marvell.com>
 Neel Patel <neel.patel at amd.com> <neel at pensando.io>
 Neil Horman <nhorman at tuxdriver.com>
 Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index 4ad5f044b5..ebc2a62536 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -247,7 +247,7 @@ roc_npa_batch_alloc_wait(uint64_t *cache_line, unsigned int wait_us)
 	/* Batch alloc status code is updated in bits [5:6] of the first word
 	 * of the 128 byte cache line.
 	 */
-	while (((__atomic_load_n(cache_line, __ATOMIC_RELAXED) >> 5) & 0x3) ==
+	while (((__atomic_load_n(cache_line, __ATOMIC_ACQUIRE) >> 5) & 0x3) ==
 	       ALLOC_CCODE_INVAL)
 		if (wait_us && (plt_tsc_cycles() - start) >= ticks)
 			break;
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-18 19:39:01.393198316 +0800
+++ 0018-common-cnxk-fix-atomic-load-in-batch-ops.patch	2025-02-18 19:39:00.458244077 +0800
@@ -1 +1 @@
-From 73d38682fddd614d95942442c20b3a1de211bb4c Mon Sep 17 00:00:00 2001
+From 3d543686ef3e94e2da99b52b42d02293e7b511bc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 73d38682fddd614d95942442c20b3a1de211bb4c ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 1ed47e1cad..8524952d24 100644
+index 820c201bfe..75440baa40 100644
@@ -22 +24 @@
-@@ -1079,6 +1079,7 @@ Natanael Copa <ncopa at alpinelinux.org>
+@@ -1025,6 +1025,7 @@ Natanael Copa <ncopa at alpinelinux.org>
@@ -31 +33 @@
-index f7cb4460e7..8525038810 100644
+index 4ad5f044b5..ebc2a62536 100644
@@ -34 +36 @@
-@@ -255,7 +255,7 @@ roc_npa_batch_alloc_wait(uint64_t *cache_line, unsigned int wait_us)
+@@ -247,7 +247,7 @@ roc_npa_batch_alloc_wait(uint64_t *cache_line, unsigned int wait_us)


More information about the stable mailing list