patch 'rcu: use atomic operation on acked token' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:46:33 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/24. 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://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=94b20c14a64b64c09acd7887165f75b7674e46fb

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 94b20c14a64b64c09acd7887165f75b7674e46fb Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Date: Mon, 5 Feb 2024 04:59:48 +0000
Subject: [PATCH] rcu: use atomic operation on acked token
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 063cddfc7426989f0c7feb514aa82bd8c4274756 ]

acked_token should be read using atomic operation as the
the API rte_rcu_qsbr_check is advertised as multi-thread safe.

Fixes: 1f90d32ce175 ("rcu: add least acknowledged token optimization")

Reported-by: Ola Liljedahl <ola.liljedahl at arm.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl at arm.com>
---
 lib/rcu/rte_rcu_qsbr.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h
index 6b908e7ee0..66780b324b 100644
--- a/lib/rcu/rte_rcu_qsbr.h
+++ b/lib/rcu/rte_rcu_qsbr.h
@@ -667,7 +667,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 	RTE_ASSERT(v != NULL);

 	/* Check if all the readers have already acknowledged this token */
-	if (likely(t <= v->acked_token)) {
+	if (likely(t <= rte_atomic_load_explicit(&v->acked_token,
+						rte_memory_order_relaxed))) {
 		__RTE_RCU_DP_LOG(DEBUG,
 			"%s: check: token = %" PRIu64 ", wait = %d",
 			__func__, t, wait);
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.551375152 +0800
+++ 0052-rcu-use-atomic-operation-on-acked-token.patch	2024-03-05 17:39:30.753566492 +0800
@@ -1 +1 @@
-From 063cddfc7426989f0c7feb514aa82bd8c4274756 Mon Sep 17 00:00:00 2001
+From 94b20c14a64b64c09acd7887165f75b7674e46fb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 063cddfc7426989f0c7feb514aa82bd8c4274756 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 23c9f89805..ef1621d597 100644
+index 6b908e7ee0..66780b324b 100644
@@ -23 +25 @@
-@@ -666,7 +666,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
+@@ -667,7 +667,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)


More information about the stable mailing list