src/dpdk/lib/librte_eal/include/rte_common.h
static inline uint32_t
rte_combine32ms1b(uint32_t x)
{
	x |= x >> 1;
	x |= x >> 2;
	x |= x >> 4;
	x |= x >> 8;
	x |= x >> 16;

	return x;
}
/**
 * Combines 32b inputs most significant set bits into the least
 * significant bits to construct a value with the same MSBs as x
 * but all 1's under it.
 *
 * @param x
 *    The integer whose MSBs need to be combined with its LSBs
 * @return
 *    The combined value.
 */
Combines 32b inputs most significant set bits into the least
significant bits to construct a value with the same MSBs as x
but all 1's under it.

@param x
The integer whose MSBs need to be combined with its LSBs
@return
The combined value.
Combines 32b inputs most significant set bits into the least significant bits to construct a value with the same MSBs as x but all 1 ' s under it . @param x The integer whose MSBs need to be combined with its LSBs @return The combined value .
static inline uint32_t
rte_combine32ms1b(uint32_t x)
{
	x |= x >> 1;
	x |= x >> 2;
	x |= x >> 4;
	x |= x >> 8;
	x |= x >> 16;
	return x;
}
static inline uint32_t rte_combine32ms1b ( uint32_t x ) { x |= x >> 1 ; x |= x >> 2 ; x |= x >> 4 ; x |= x >> 8 ; x |= x >> 16 ; return x ; }
Combines 32b inputs most significant set bits into the least
 significant bits to construct a value with the same MSBs as x
 but all 1's under it.
Combines 32b inputs most significant set bits into the least significant bits to construct a value with the same MSBs as x but all 1 ' s under it .