Skip to content

Commit 48fea83

Browse files
haggaierolandd
authored andcommitted
IB/mlx5: Set QP offsets and parameters for user QPs and not just for kernel QPs
For user QPs, the creation process does not currently initialize the fields: * qp->rq.offset * qp->sq.offset * qp->sq.wqe_shift Signed-off-by: Haggai Eran <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent b475598 commit 48fea83

File tree

1 file changed

+4
-0
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+4
-0
lines changed

drivers/infiniband/hw/mlx5/qp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,10 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
574574
uar_index = uuarn_to_uar_index(&context->uuari, uuarn);
575575
mlx5_ib_dbg(dev, "uuarn 0x%x, uar_index 0x%x\n", uuarn, uar_index);
576576

577+
qp->rq.offset = 0;
578+
qp->sq.wqe_shift = ilog2(MLX5_SEND_WQE_BB);
579+
qp->sq.offset = qp->rq.wqe_cnt << qp->rq.wqe_shift;
580+
577581
err = set_user_buf_size(dev, qp, &ucmd);
578582
if (err)
579583
goto err_uuar;

0 commit comments

Comments
 (0)