patch 'bitops: fix build with GCC 17' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 23 19:14:57 CEST 2026


Hi,

FYI, your patch has been queued to stable release 25.11.3

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7ce5fce98e23a62e93c3182326f5999be59e7ba5

Thanks.

Kevin

---
>From 7ce5fce98e23a62e93c3182326f5999be59e7ba5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 19 May 2026 06:49:01 -0700
Subject: [PATCH] bitops: fix build with GCC 17

[ upstream commit 254ee546271c8cfc8a764ee3209c44e58875234c ]

Newer GCC warns when a non-boolean constant is an operand of &&
(-Wconstant-logical-operand), which trips whenever RTE_IS_POWER_OF_2
is used in a static_assert with a power-of-two literal.
Make the zero check explicit.

Fixes: 7c872b96983a ("hash: validate hash bucket entries while compiling")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Jack Bond-Preston <jack.bond-preston at foss.arm.com>
---
 lib/eal/include/rte_bitops.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h
index aa6ac73abb..b170447714 100644
--- a/lib/eal/include/rte_bitops.h
+++ b/lib/eal/include/rte_bitops.h
@@ -1300,5 +1300,5 @@ rte_fls_u64(uint64_t x)
  * Macro to return 1 if n is a power of 2, 0 otherwise
  */
-#define RTE_IS_POWER_OF_2(n) ((n) && !(((n) - 1) & (n)))
+#define RTE_IS_POWER_OF_2(n) ((n) != 0 && (((n) - 1) & (n)) == 0)
 
 /**
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-23 17:57:59.651426107 +0100
+++ 0034-bitops-fix-build-with-GCC-17.patch	2026-07-23 17:57:58.645071500 +0100
@@ -1 +1 @@
-From 254ee546271c8cfc8a764ee3209c44e58875234c Mon Sep 17 00:00:00 2001
+From 7ce5fce98e23a62e93c3182326f5999be59e7ba5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 254ee546271c8cfc8a764ee3209c44e58875234c ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list