Patch "RDMA/hns: Force srq_limit to 0 when creating SRQ" has been added to the 5.11-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/hns: Force srq_limit to 0 when creating SRQ

to the 5.11-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-hns-force-srq_limit-to-0-when-creating-srq.patch
and it can be found in the queue-5.11 subdirectory.

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



commit 1487e318615c5249d3bae88161f553a29f27bc50
Author: Wenpeng Liang <liangwenpeng@xxxxxxxxxx>
Date:   Sat Jan 30 16:58:01 2021 +0800

    RDMA/hns: Force srq_limit to 0 when creating SRQ
    
    [ Upstream commit b5df9b7a2f965b7903850d8f89846ffe0080b84b ]
    
    According to the IB Specification, srq_limit shouldn't be configured
    during SRQ creation. If a user set srq_limit at this time, the driver
    should forced it to zero, or the result of creating SRQ will conflict with
    the result of querying SRQ.
    
    Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode")
    Link: https://lore.kernel.org/r/1611997090-48820-4-git-send-email-liweihang@xxxxxxxxxx
    Signed-off-by: Wenpeng Liang <liangwenpeng@xxxxxxxxxx>
    Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c
index 9f60a0a745e11..ecc42c59e3cfc 100644
--- a/drivers/infiniband/hw/hns/hns_roce_srq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_srq.c
@@ -338,6 +338,7 @@ int hns_roce_create_srq(struct ib_srq *ib_srq,
 		roundup_pow_of_two(init_attr->attr.max_sge + srq->rsv_sge);
 	init_attr->attr.max_wr = srq->wqe_cnt;
 	init_attr->attr.max_sge = srq->max_gs;
+	init_attr->attr.srq_limit = 0;
 
 	if (udata) {
 		ret = ib_copy_from_udata(&ucmd, udata,



[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