Skip to content

Commit d13be54

Browse files
damodhar-airleon
authored andcommitted
RDMA/bnxt_re: Add send queue size check for variable wqe
For the fixed WQE case, HW supports 0xFFFF WQEs. For variable Size WQEs, HW treats this number as the 16 bytes slots. The maximum supported WQEs needs to be adjusted based on the number of slots. Set a maximum WQE limit for variable WQE scenario. Fixes: de1d364 ("RDMA/bnxt_re: Add support for Variable WQE in Genp7 adapters") 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-4-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent d5a38bf commit d13be54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/infiniband/hw/bnxt_re/qplib_sp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
138138
attr->max_qp_wqes -= BNXT_QPLIB_RESERVED_QP_WRS + 1;
139139
}
140140

141+
/* Adjust for max_qp_wqes for variable wqe */
142+
if (cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE)
143+
attr->max_qp_wqes = BNXT_VAR_MAX_WQE - 1;
144+
141145
attr->max_qp_sges = cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE ?
142146
min_t(u32, sb->max_sge_var_wqe, BNXT_VAR_MAX_SGE) : 6;
143147
attr->max_cq = le32_to_cpu(sb->max_cq);

0 commit comments

Comments
 (0)