提交 fea32683 编写于 作者: Y Yixing Liu 提交者: Zheng Zengkai

RDMA/hns: Fix device ex_cmd capacity

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5YZ0Q

----------------------------------------------------------

When the driver does not have an ex_cmd flag, related ioctl()
or syscall() will fail to execute. for example, if the modify_qp
flag is missing, the following error will appear when running
perftest:
Failed to modify QP to INIT, ret=95
Failed to modify QP to INIT
Failed to modify QP 24 to RTR
Failed to modify QP 25 to RTR
Unable to Connect the HCA's through the link
Unable to Connect the HCA's through the link

So add query_device、create_cq、modify_qp and create_qp flag.

Fixes: df065107 ("RDMA/hns: Enable modify_cq for uverbs.")
Signed-off-by: NYixing Liu <liuyixing1@huawei.com>
Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c7cf81b5
......@@ -654,7 +654,12 @@ static int hns_roce_register_device(struct hns_roce_dev *hr_dev)
(1ULL << IB_USER_VERBS_CMD_CREATE_AH) |
(1ULL << IB_USER_VERBS_CMD_DESTROY_AH);
ib_dev->uverbs_ex_cmd_mask |= (1ULL << IB_USER_VERBS_EX_CMD_MODIFY_CQ);
ib_dev->uverbs_ex_cmd_mask |=
(1ULL << IB_USER_VERBS_EX_CMD_QUERY_DEVICE) |
(1ULL << IB_USER_VERBS_EX_CMD_MODIFY_CQ) |
(1ULL << IB_USER_VERBS_EX_CMD_CREATE_CQ) |
(1ULL << IB_USER_VERBS_EX_CMD_MODIFY_QP) |
(1ULL << IB_USER_VERBS_EX_CMD_CREATE_QP);
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_REREG_MR) {
ib_dev->uverbs_cmd_mask |= (1ULL << IB_USER_VERBS_CMD_REREG_MR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册