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

Function log2above

dpdk/drivers/net/mlx5/mlx5_utils.h:297–306  ·  view source on GitHub ↗

* Return logarithm of the nearest power of two above input value. * * @param v * Input value. * * @return * Logarithm of the nearest power of two above input value. */

Source from the content-addressed store, hash-verified

295 * Logarithm of the nearest power of two above input value.
296 */
297static inline unsigned int
298log2above(unsigned int v)
299{
300 unsigned int l;
301 unsigned int r;
302
303 for (l = 0, r = 0; (v >> 1); ++l, v >>= 1)
304 r |= (v & 1);
305 return l + r;
306}
307
308/********************************* indexed pool *************************/
309

Callers 15

mlx5_txq_devx_obj_newFunction · 0.85
mlx5_tx_queue_pre_setupFunction · 0.85
mlx5_txq_newFunction · 0.85
mlx5_txq_hairpin_newFunction · 0.85
mlx5_rx_queue_pre_setupFunction · 0.85
mlx5_shared_rxq_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected