patch 'eal: fix cache guard for pedantic compilation' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 26 13:57:38 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.5

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/28/26. 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/d47bce4678e9decb1558a1589bb3576ccdb72e8b

Thanks.

Luca Boccassi

---
>From d47bce4678e9decb1558a1589bb3576ccdb72e8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb at smartsharesystems.com>
Date: Mon, 23 Mar 2026 08:12:04 +0000
Subject: [PATCH] eal: fix cache guard for pedantic compilation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ebceabddf19b7bccebd9c477a22cf345a50cee7a ]

The cache guard macro uses __COUNTER__ to generate unique names.
However, although most C compilers support __COUNTER__, it is not yet
part of the C standard, so compilation fails when building in pedantic
mode.
The macro was changed to use __LINE__ instead.

Fixes: 65f600c0f000 ("eal: add empty cache line macro")

Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
---
 lib/eal/include/rte_common.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 4d299f2b36..bf51060bfe 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -639,8 +639,12 @@ rte_is_aligned(const void * const __rte_restrict ptr, const unsigned int align)
  *
  * Use as spacing between data accessed by different lcores,
  * to prevent cache thrashing on hardware with speculative prefetching.
+ *
+ * Note: Although __COUNTER__ would be better for uniqueness,
+ * it is not yet (March 2026) part of the C standard,
+ * so compilation would fail when building in pedantic mode.
  */
-#define RTE_CACHE_GUARD _RTE_CACHE_GUARD_HELPER1(__COUNTER__)
+#define RTE_CACHE_GUARD _RTE_CACHE_GUARD_HELPER1(__LINE__)
 
 /*********** PA/IOVA type definitions ********/
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-26 12:56:33.611570519 +0000
+++ 0004-eal-fix-cache-guard-for-pedantic-compilation.patch	2026-03-26 12:56:33.397542839 +0000
@@ -1 +1 @@
-From ebceabddf19b7bccebd9c477a22cf345a50cee7a Mon Sep 17 00:00:00 2001
+From d47bce4678e9decb1558a1589bb3576ccdb72e8b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit ebceabddf19b7bccebd9c477a22cf345a50cee7a ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 573bf4f2ce..0a356abae2 100644
+index 4d299f2b36..bf51060bfe 100644
@@ -27 +28 @@
-@@ -751,8 +751,12 @@ rte_is_aligned(const void * const __rte_restrict ptr, const unsigned int align)
+@@ -639,8 +639,12 @@ rte_is_aligned(const void * const __rte_restrict ptr, const unsigned int align)


More information about the stable mailing list