projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
850b741
)
IB/mlx5: Fix blue flame buffer size calculation
author
Eli Cohen
<
[email protected]
>
Thu, 9 Feb 2017 17:31:47 +0000
(19:31 +0200)
committer
Doug Ledford
<
[email protected]
>
Tue, 14 Feb 2017 16:44:42 +0000
(11:44 -0500)
A blue flame register is comprised of two buffers of equal size.
Fixes: 5fe9dec0d0454 ("IB/mlx5: Use blue flame register allocator in mlx5_ib")
Signed-off-by: Eli Cohen <
[email protected]
>
Reviewed-by: Noa Osherovich <
[email protected]
>
Reviewed-by: Matan Barak <
[email protected]
>
Signed-off-by: Leon Romanovsky <
[email protected]
>
Signed-off-by: Doug Ledford <
[email protected]
>
drivers/infiniband/hw/mlx5/qp.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx5/qp.c
b/drivers/infiniband/hw/mlx5/qp.c
index fbfff1269816ee79783daed22448b9507cfea473..69a1604a887c4a91f6c6ff3cf61f17790a668c72 100644
(file)
--- a/
drivers/infiniband/hw/mlx5/qp.c
+++ b/
drivers/infiniband/hw/mlx5/qp.c
@@
-905,7
+905,10
@@
static int create_kernel_qp(struct mlx5_ib_dev *dev,
else
qp->bf.bfreg = &dev->bfreg;
- qp->bf.buf_size = 1 << MLX5_CAP_GEN(dev->mdev, log_bf_reg_size);
+ /* We need to divide by two since each register is comprised of
+ * two buffers of identical size, namely odd and even
+ */
+ qp->bf.buf_size = (1 << MLX5_CAP_GEN(dev->mdev, log_bf_reg_size)) / 2;
uar_index = qp->bf.bfreg->index;
err = calc_sq_size(dev, init_attr, qp);