mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 10:40:19 -04:00
mlx5: use roundup_pow_of_two
Use roundup_pow_of_two in place of an expression. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536
This commit is contained in:
parent
87177ce3aa
commit
dc048255b3
1 changed files with 1 additions and 1 deletions
|
|
@ -2331,7 +2331,7 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs)
|
|||
* Stride size is 16 * (n + 1), as the first segment is
|
||||
* control.
|
||||
*/
|
||||
n = (1 << fls(howmany(r, MLX5E_MAX_RX_BYTES))) - 1;
|
||||
n = roundup_pow_of_two(1 + howmany(r, MLX5E_MAX_RX_BYTES)) - 1;
|
||||
if (n > MLX5E_MAX_BUSDMA_RX_SEGS)
|
||||
return (-ENOMEM);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue