Commit d8030b0d authored by Eli Cohen's avatar Eli Cohen Committed by Doug Ledford

IB/mlx5: Fix blue flame buffer size calculation

A blue flame register is comprised of two buffers of equal size.

Fixes: 5fe9dec0 ("IB/mlx5: Use blue flame register allocator in mlx5_ib")
Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
Reviewed-by: default avatarNoa Osherovich <noaos@mellanox.com>
Reviewed-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 850b7415
...@@ -905,7 +905,10 @@ static int create_kernel_qp(struct mlx5_ib_dev *dev, ...@@ -905,7 +905,10 @@ static int create_kernel_qp(struct mlx5_ib_dev *dev,
else else
qp->bf.bfreg = &dev->bfreg; 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; uar_index = qp->bf.bfreg->index;
err = calc_sq_size(dev, init_attr, qp); err = calc_sq_size(dev, init_attr, qp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment