MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_align32prevpow2

Function rte_align32prevpow2

dpdk/lib/eal/include/rte_bitops.h:638–644  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

636 * Input parameter aligned to the previous power of 2
637 */
638static inline uint32_t
639rte_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

Callers 5

ena_calc_io_queue_sizeFunction · 0.50
test_alignFunction · 0.50

Calls 1

rte_combine32ms1bFunction · 0.70

Tested by 1

test_alignFunction · 0.40