Skip to content

Commit bb839f3

Browse files
damodhar-airleon
authored andcommitted
RDMA/bnxt_re: Fix MSN table size for variable wqe mode
For variable size wqe mode, the MSN table size should be half the size of the SQ depth. Fixing this to avoid wrap around problems in the retransmission path. Fixes: de1d364 ("RDMA/bnxt_re: Add support for Variable WQE in Genp7 adapters") Reviewed-by: Kashyap Desai <kashyap.desai@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/20241217102649.1377704-5-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent d13be54 commit bb839f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/infiniband/hw/bnxt_re/qplib_fp.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,12 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
10331033
: 0;
10341034
/* Update msn tbl size */
10351035
if (qp->is_host_msn_tbl && psn_sz) {
1036-
hwq_attr.aux_depth = roundup_pow_of_two(bnxt_qplib_set_sq_size(sq, qp->wqe_mode));
1036+
if (qp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC)
1037+
hwq_attr.aux_depth =
1038+
roundup_pow_of_two(bnxt_qplib_set_sq_size(sq, qp->wqe_mode));
1039+
else
1040+
hwq_attr.aux_depth =
1041+
roundup_pow_of_two(bnxt_qplib_set_sq_size(sq, qp->wqe_mode)) / 2;
10371042
qp->msn_tbl_sz = hwq_attr.aux_depth;
10381043
qp->msn = 0;
10391044
}

0 commit comments

Comments
 (0)