Commit b5df9b7a authored by Wenpeng Liang's avatar Wenpeng Liang Committed by Jason Gunthorpe

RDMA/hns: Force srq_limit to 0 when creating SRQ

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: c7bcb134 ("RDMA/hns: Add SRQ support for hip08 kernel mode")
Link: https://lore.kernel.org/r/1611997090-48820-4-git-send-email-liweihang@huawei.comSigned-off-by: default avatarWenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: default avatarWeihang Li <liweihang@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 1620f09b
......@@ -336,6 +336,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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment