patch 'bitops: improve power of 2 alignment documentation' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Oct 31 15:34:08 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.4

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

Thanks.

Kevin

---
>From a44f69f6a7af98679f26c6432e1b36c1e852ae92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom at ericsson.com>
Date: Tue, 22 Jul 2025 09:53:21 +0200
Subject: [PATCH] bitops: improve power of 2 alignment documentation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit f9f773fe2d6f49f1223283dc3e75198f2e6c0664 ]

In the documentation, make clear
rte_align(32|64)prevpow2(<n>) -> <n>, provided <n> is a power of 2.

The original documentation stated the "previous" power of 2 would be
returned, potentially leaving the user to erroneously conclude that,
for example, rte_align32prevpow2(32) -> 16.

The rte_align(32|64)pow2(<n>) documentation, suffering from a similar
issue, is reworded in the same manner.

Fixes: 08f683174e94 ("eal: add functions for previous power of 2 alignment")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 lib/eal/include/rte_bitops.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h
index deb1fd43f2..fbabd9bdd5 100644
--- a/lib/eal/include/rte_bitops.h
+++ b/lib/eal/include/rte_bitops.h
@@ -1235,5 +1235,5 @@ rte_is_power_of_2(uint32_t n)
  *
  * @return
- *   Input parameter aligned to the next power of 2
+ *   The smallest power of 2 which is greater than or equal to @c x.
  */
 static inline uint32_t
@@ -1253,5 +1253,5 @@ rte_align32pow2(uint32_t x)
  *
  * @return
- *   Input parameter aligned to the previous power of 2
+ *   The greatest power of 2 which is smaller than or equal to @c x.
  */
 static inline uint32_t
@@ -1270,5 +1270,5 @@ rte_align32prevpow2(uint32_t x)
  *
  * @return
- *   Input parameter aligned to the next power of 2
+ *   The smallest power of 2 which is greater than or equal to @c v.
  */
 static inline uint64_t
@@ -1288,5 +1288,5 @@ rte_align64pow2(uint64_t v)
  *
  * @return
- *   Input parameter aligned to the previous power of 2
+ *   The greatest power of 2 which is smaller than or equal to @c v.
  */
 static inline uint64_t
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-31 13:53:56.015143069 +0000
+++ 0126-bitops-improve-power-of-2-alignment-documentation.patch	2025-10-31 13:53:52.323524264 +0000
@@ -1 +1 @@
-From f9f773fe2d6f49f1223283dc3e75198f2e6c0664 Mon Sep 17 00:00:00 2001
+From a44f69f6a7af98679f26c6432e1b36c1e852ae92 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f9f773fe2d6f49f1223283dc3e75198f2e6c0664 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -30 +31 @@
-index b9a6af381b..2d1b9d281c 100644
+index deb1fd43f2..fbabd9bdd5 100644
@@ -33 +34 @@
-@@ -1321,5 +1321,5 @@ rte_is_power_of_2(uint32_t n)
+@@ -1235,5 +1235,5 @@ rte_is_power_of_2(uint32_t n)
@@ -40 +41 @@
-@@ -1339,5 +1339,5 @@ rte_align32pow2(uint32_t x)
+@@ -1253,5 +1253,5 @@ rte_align32pow2(uint32_t x)
@@ -47 +48 @@
-@@ -1356,5 +1356,5 @@ rte_align32prevpow2(uint32_t x)
+@@ -1270,5 +1270,5 @@ rte_align32prevpow2(uint32_t x)
@@ -54 +55 @@
-@@ -1374,5 +1374,5 @@ rte_align64pow2(uint64_t v)
+@@ -1288,5 +1288,5 @@ rte_align64pow2(uint64_t v)



More information about the stable mailing list