]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/bnxt_re: Fix max_qp_wrs reported
authorSelvin Xavier <selvin.xavier@broadcom.com>
Tue, 17 Dec 2024 10:26:45 +0000 (15:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:29:58 +0000 (13:29 +0100)
commit1dcaac7a61b85c9cf355b42f233d8b2e9c166b15
tree2a56f6d7d501cdea1043965844d22d4def38693a
parentc68c136652ed6960dd5ba5e0ab9fc191e7a3725f
RDMA/bnxt_re: Fix max_qp_wrs reported

[ Upstream commit 40be32303ec829ea12f9883e499bfd3fe9e52baf ]

While creating qps, driver adds one extra entry to the sq size
passed by the ULPs in order to avoid queue full condition.
When ULPs creates QPs with max_qp_wr reported, driver creates
QP with 1 more than the max_wqes supported by HW. Create QP fails
in this case. To avoid this error, reduce 1 entry in max_qp_wqes
and report it to the stack.

Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/20241217102649.1377704-2-kalesh-anakkur.purayil@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_sp.c