Commit 8e65abac authored by Selvin Xavier's avatar Selvin Xavier Committed by Leon Romanovsky

RDMA/bnxt_re: Fix the max WQEs used in Static WQE mode

max_sw_wqe used for static wqe mode should be same as the max_wqe.
Calculate the max_sw_wqe only for the variable WQE mode.

Fixes: de1d364c ("RDMA/bnxt_re: Add support for Variable WQE in Genp7 adapters")
Link: https://patch.msgid.link/r/1726715161-18941-7-git-send-email-selvin.xavier@broadcom.comSigned-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent c5c1ae73
...@@ -1307,7 +1307,11 @@ static int bnxt_re_init_sq_attr(struct bnxt_re_qp *qp, ...@@ -1307,7 +1307,11 @@ static int bnxt_re_init_sq_attr(struct bnxt_re_qp *qp,
0 : BNXT_QPLIB_RESERVED_QP_WRS; 0 : BNXT_QPLIB_RESERVED_QP_WRS;
entries = bnxt_re_init_depth(entries + diff + 1, uctx); entries = bnxt_re_init_depth(entries + diff + 1, uctx);
sq->max_wqe = min_t(u32, entries, dev_attr->max_qp_wqes + diff + 1); sq->max_wqe = min_t(u32, entries, dev_attr->max_qp_wqes + diff + 1);
if (qplqp->wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE)
sq->max_sw_wqe = bnxt_qplib_get_depth(sq, qplqp->wqe_mode, true); sq->max_sw_wqe = bnxt_qplib_get_depth(sq, qplqp->wqe_mode, true);
else
sq->max_sw_wqe = sq->max_wqe;
} }
sq->q_full_delta = diff + 1; sq->q_full_delta = diff + 1;
/* /*
......
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