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

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:05 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/66cf3a8c3cf6ebe82c56a10c2479d0ff6dc41302

Thanks.

Shani

---
>From 66cf3a8c3cf6ebe82c56a10c2479d0ff6dc41302 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 40af7164af..d119d3c741 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -537,8 +537,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.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:34.862946043 +0300
+++ 0064-eal-fix-cache-guard-for-pedantic-compilation.patch	2026-04-14 14:44:28.714441000 +0300
@@ -1 +1 @@
-From ebceabddf19b7bccebd9c477a22cf345a50cee7a Mon Sep 17 00:00:00 2001
+From 66cf3a8c3cf6ebe82c56a10c2479d0ff6dc41302 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 40af7164af..d119d3c741 100644
@@ -27 +28 @@
-@@ -751,8 +751,12 @@ rte_is_aligned(const void * const __rte_restrict ptr, const unsigned int align)
+@@ -537,8 +537,12 @@ rte_is_aligned(const void * const __rte_restrict ptr, const unsigned int align)


More information about the stable mailing list