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

Shani Peretz shperetz at nvidia.com
Thu Dec 25 10:17:30 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.6

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

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

Thanks.

Shani

---
>From 7b108fc1c4d9d0b934b154cd7ea96c8d2ca193c5 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 6bd8bae21a..1337a67b4a 100644
--- a/lib/eal/include/rte_bitops.h
+++ b/lib/eal/include/rte_bitops.h
@@ -615,7 +615,7 @@ rte_is_power_of_2(uint32_t n)
  *   The integer value to align
  *
  * @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
 rte_align32pow2(uint32_t x)
@@ -633,7 +633,7 @@ rte_align32pow2(uint32_t x)
  *   The integer value to align
  *
  * @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
 rte_align32prevpow2(uint32_t x)
@@ -650,7 +650,7 @@ rte_align32prevpow2(uint32_t x)
  *   The 64b value to align
  *
  * @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
 rte_align64pow2(uint64_t v)
@@ -668,7 +668,7 @@ rte_align64pow2(uint64_t v)
  *   The 64b value to align
  *
  * @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
 rte_align64prevpow2(uint64_t v)
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-12-25 11:16:36.835967655 +0200
+++ 0009-bitops-improve-power-of-2-alignment-documentation.patch	2025-12-25 11:16:35.330839000 +0200
@@ -1 +1 @@
-From f9f773fe2d6f49f1223283dc3e75198f2e6c0664 Mon Sep 17 00:00:00 2001
+From 7b108fc1c4d9d0b934b154cd7ea96c8d2ca193c5 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 6bd8bae21a..1337a67b4a 100644
@@ -33 +34 @@
-@@ -1320,7 +1320,7 @@ rte_is_power_of_2(uint32_t n)
+@@ -615,7 +615,7 @@ rte_is_power_of_2(uint32_t n)
@@ -42 +43 @@
-@@ -1338,7 +1338,7 @@ rte_align32pow2(uint32_t x)
+@@ -633,7 +633,7 @@ rte_align32pow2(uint32_t x)
@@ -51 +52 @@
-@@ -1355,7 +1355,7 @@ rte_align32prevpow2(uint32_t x)
+@@ -650,7 +650,7 @@ rte_align32prevpow2(uint32_t x)
@@ -60 +61 @@
-@@ -1373,7 +1373,7 @@ rte_align64pow2(uint64_t v)
+@@ -668,7 +668,7 @@ rte_align64pow2(uint64_t v)


More information about the stable mailing list