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

RDMA/hns: Add interception for resizing SRQs

mainline inclusion
from mainline-v5.9
commit 221109e6
category: bugfix
bugzilla: NA
CVE: NA

HIP08 doesn't support modifying the maximum number of outstanding WR in an
SRQ. However, the driver does not return a failure message, and users may
mistakenly think that the resizing is executed successfully. So the driver
needs to intercept this operation.
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>
上级 7d2ea8b2
...@@ -6920,6 +6920,10 @@ static int hns_roce_v2_modify_srq(struct ib_srq *ibsrq, ...@@ -6920,6 +6920,10 @@ static int hns_roce_v2_modify_srq(struct ib_srq *ibsrq,
struct hns_roce_cmd_mailbox *mailbox; struct hns_roce_cmd_mailbox *mailbox;
int ret; int ret;
/* Resizing SRQs is not supported yet */
if (srq_attr_mask & IB_SRQ_MAX_WR)
return -EINVAL;
if (srq_attr_mask & IB_SRQ_LIMIT) { if (srq_attr_mask & IB_SRQ_LIMIT) {
if (srq_attr->srq_limit >= srq->max) { if (srq_attr->srq_limit >= srq->max) {
dev_err(hr_dev->dev, dev_err(hr_dev->dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册