Page MenuHomeFreeBSD

D46827.diff
No OneTemporary

D46827.diff

diff --git a/sys/dev/mlx4/mlx4_en/en.h b/sys/dev/mlx4/mlx4_en/en.h
--- a/sys/dev/mlx4/mlx4_en/en.h
+++ b/sys/dev/mlx4/mlx4_en/en.h
@@ -232,7 +232,7 @@
/*
* Useful macros
*/
-#define ROUNDUP_LOG2(x) ilog2(roundup_pow_of_two(x))
+#define ROUNDUP_LOG2(x) order_base_2(x)
#define XNOR(x, y) (!(x) == !(y))
#define ILLEGAL_MAC(addr) (addr == 0xffffffffffffULL || addr == 0x0)
diff --git a/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c b/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c
--- a/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c
+++ b/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c
@@ -488,7 +488,7 @@
MLX4_IB_QPT_PROXY_GSI | MLX4_IB_QPT_TUN_SMI_OWNER)))
qp->sq.wqe_shift = ilog2(64);
else
- qp->sq.wqe_shift = ilog2(roundup_pow_of_two(s));
+ qp->sq.wqe_shift = order_base_2(s);
for (;;) {
qp->sq_max_wqes_per_wr = DIV_ROUND_UP(s, 1U << qp->sq.wqe_shift);
@@ -544,7 +544,7 @@
/* Sanity check SQ size before proceeding */
if ((1 << ucmd->log_sq_bb_count) > dev->dev->caps.max_wqes ||
ucmd->log_sq_stride >
- ilog2(roundup_pow_of_two(dev->dev->caps.max_sq_desc_sz)) ||
+ order_base_2(dev->dev->caps.max_sq_desc_sz) ||
ucmd->log_sq_stride < MLX4_IB_MIN_SQ_STRIDE)
return -EINVAL;

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 3:39 PM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14515925
Default Alt Text
D46827.diff (1 KB)

Event Timeline