提交 84fdb438 编写于 作者: S Shunfeng Yang 提交者: Yang Yingliang

RDMA/hns: Force srq_limit to 0 when creating SRQ

mainline inclusion
from mainline-v5.12
commit b5df9b7a
category: bugfix
bugzilla: NA
CVE: NA

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.
Signed-off-by: NShunfeng Yang <yangshunfeng2@huawei.com>
Signed-off-by: NYangyang Li <liyangyang20@huawei.com>
Reviewed-by: Nchunzhi hu <huchunzhi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bc7c4b74
...@@ -529,6 +529,7 @@ struct ib_srq *hns_roce_create_srq(struct ib_pd *pd, ...@@ -529,6 +529,7 @@ struct ib_srq *hns_roce_create_srq(struct ib_pd *pd,
srq->ibsrq.ext.xrc.srq_num = srq->srqn; srq->ibsrq.ext.xrc.srq_num = srq->srqn;
srq_init_attr->attr.max_wr = srq->max; srq_init_attr->attr.max_wr = srq->max;
srq_init_attr->attr.max_sge = srq->max_gs - srq->rsv_sge; srq_init_attr->attr.max_sge = srq->max_gs - srq->rsv_sge;
srq_init_attr->attr.srq_limit = 0;
if (pd->uobject) { if (pd->uobject) {
if (ib_copy_to_udata(udata, &srq->srqn, sizeof(__u32))) { if (ib_copy_to_udata(udata, &srq->srqn, sizeof(__u32))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册