* Aligns input parameter to the previous power of 2 * * @param x * The integer value to align * * @return * Input parameter aligned to the previous power of 2 */
| 636 | * Input parameter aligned to the previous power of 2 |
| 637 | */ |
| 638 | static inline uint32_t |
| 639 | rte_align32prevpow2(uint32_t x) |
| 640 | { |
| 641 | x = rte_combine32ms1b(x); |
| 642 | |
| 643 | return x - (x >> 1); |
| 644 | } |
| 645 | |
| 646 | /** |
| 647 | * Aligns 64b input parameter to the next power of 2 |