Patch "RDMA/bnxt_re: Fix max_qp_wrs reported" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RDMA/bnxt_re: Fix max_qp_wrs reported

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-bnxt_re-fix-max_qp_wrs-reported.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6ca4fcee741c9e0b022241329fcce4cefaa809db
Author: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
Date:   Mon Nov 30 05:13:06 2020 -0800

    RDMA/bnxt_re: Fix max_qp_wrs reported
    
    [ Upstream commit c63e1c4dfc33d1bdae395ee8fbcbfad4830b12c0 ]
    
    While creating qps, the 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.
    
    Link: https://lore.kernel.org/r/1606741986-16477-1-git-send-email-selvin.xavier@xxxxxxxxxxxx
    Signed-off-by: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>
    Signed-off-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
index 079aaaaffec7..f623f881a95b 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
@@ -118,7 +118,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
 	 * 128 WQEs needs to be reserved for the HW (8916). Prevent
 	 * reporting the max number
 	 */
-	attr->max_qp_wqes -= BNXT_QPLIB_RESERVED_QP_WRS;
+	attr->max_qp_wqes -= BNXT_QPLIB_RESERVED_QP_WRS + 1;
 	attr->max_qp_sges = bnxt_qplib_is_chip_gen_p5(rcfw->res->cctx) ?
 			    6 : sb->max_sge;
 	attr->max_cq = le32_to_cpu(sb->max_cq);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux