patch 'eal: use same atomic intrinsics for GCC and clang' has been queued to stable release 20.11.8

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:37:13 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/23. 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/60ac57c2f188bb85ba6bf6437aa9ec978b900369

Thanks.

Luca Boccassi

---
>From 60ac57c2f188bb85ba6bf6437aa9ec978b900369 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Date: Fri, 17 Feb 2023 19:58:03 -0600
Subject: [PATCH] eal: use same atomic intrinsics for GCC and clang
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0c0eb1156e3d52ede4b19d687aa5387d1dca7666 ]

The size generic atomic intrinsics generate the same
code as the size specific intrinsics for gcc. Use size
generic intrinsics for both gcc and clang.

Fixes: 7bdccb93078e ("eal: fix ARM build with clang")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
 lib/librte_eal/include/generic/rte_atomic.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/lib/librte_eal/include/generic/rte_atomic.h b/lib/librte_eal/include/generic/rte_atomic.h
index 276272f40b..f73825a3d3 100644
--- a/lib/librte_eal/include/generic/rte_atomic.h
+++ b/lib/librte_eal/include/generic/rte_atomic.h
@@ -175,11 +175,7 @@ rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val);
 static inline uint16_t
 rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val)
 {
-#if defined(__clang__)
 	return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
-#else
-	return __atomic_exchange_2(dst, val, __ATOMIC_SEQ_CST);
-#endif
 }
 #endif
 
@@ -458,11 +454,7 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val);
 static inline uint32_t
 rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val)
 {
-#if defined(__clang__)
 	return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
-#else
-	return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST);
-#endif
 }
 #endif
 
@@ -740,11 +732,7 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val);
 static inline uint64_t
 rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
 {
-#if defined(__clang__)
 	return __atomic_exchange_n(dst, val, __ATOMIC_SEQ_CST);
-#else
-	return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST);
-#endif
 }
 #endif
 
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:31.066224032 +0000
+++ 0069-eal-use-same-atomic-intrinsics-for-GCC-and-clang.patch	2023-02-23 09:36:28.354172297 +0000
@@ -1 +1 @@
-From 0c0eb1156e3d52ede4b19d687aa5387d1dca7666 Mon Sep 17 00:00:00 2001
+From 60ac57c2f188bb85ba6bf6437aa9ec978b900369 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0c0eb1156e3d52ede4b19d687aa5387d1dca7666 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
- lib/eal/include/generic/rte_atomic.h | 12 ------------
+ lib/librte_eal/include/generic/rte_atomic.h | 12 ------------
@@ -25,5 +26,5 @@
-diff --git a/lib/eal/include/generic/rte_atomic.h b/lib/eal/include/generic/rte_atomic.h
-index f5c49a9870..234b268b91 100644
---- a/lib/eal/include/generic/rte_atomic.h
-+++ b/lib/eal/include/generic/rte_atomic.h
-@@ -176,11 +176,7 @@ rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val);
+diff --git a/lib/librte_eal/include/generic/rte_atomic.h b/lib/librte_eal/include/generic/rte_atomic.h
+index 276272f40b..f73825a3d3 100644
+--- a/lib/librte_eal/include/generic/rte_atomic.h
++++ b/lib/librte_eal/include/generic/rte_atomic.h
+@@ -175,11 +175,7 @@ rte_atomic16_exchange(volatile uint16_t *dst, uint16_t val);
@@ -41 +42 @@
-@@ -459,11 +455,7 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val);
+@@ -458,11 +454,7 @@ rte_atomic32_exchange(volatile uint32_t *dst, uint32_t val);
@@ -53 +54 @@
-@@ -741,11 +733,7 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val);
+@@ -740,11 +732,7 @@ rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val);


More information about the stable mailing list