HomeFreeBSD

mlx5: optimize ilog2 calculation

Description

mlx5: optimize ilog2 calculation

Rather than compute ilog2(roundup_pow_of_two(x)), which invokes ilog2
twice, just use order_base_2 once. And employ that optimization
twice.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46838

Details

Provenance
dougmAuthored on Sep 28 2024, 9:24 PM
Reviewer
kib
Differential Revision
D46838: roundup_pow_of_two: use ispower instead
Parents
rG3873b9a8b3a5: mlx4: use is_power_of_2
Branches
Unknown
Tags
Unknown