提交 c22b4e60 编写于 作者: L Luoyouming 提交者: ZhouJuan

RDMA/hns: Fix the compatibility flag problem

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

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

When the compatibility flag is interacted, the kernel space does
not confirm whether the user space has issued the flag but
responds directly, which will cause the flag to be received in
any scenario in the user space, and the current patch adds this
judgment.

Fixes: b3b7a525 ("RDMA/hns: Support cqe inline in user space")
Fixes: d67087cc ("RDMA/hns: Remove enable rq inline in kernel and add compatibility handling")
Signed-off-by: NLuoyouming <luoyouming@huawei.com>
上级 a77029a8
......@@ -527,12 +527,14 @@ static int hns_roce_alloc_ucontext(struct ib_ucontext *uctx,
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE) {
context->config |= ucmd.config & HNS_ROCE_RQ_INLINE_FLAGS;
resp.config |= HNS_ROCE_RSP_RQ_INLINE_FLAGS;
if (context->config & HNS_ROCE_RQ_INLINE_FLAGS)
resp.config |= HNS_ROCE_RSP_RQ_INLINE_FLAGS;
}
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQE_INLINE) {
context->config |= ucmd.config & HNS_ROCE_CQE_INLINE_FLAGS;
resp.config |= HNS_ROCE_RSP_CQE_INLINE_FLAGS;
if (context->config & HNS_ROCE_CQE_INLINE_FLAGS)
resp.config |= HNS_ROCE_RSP_CQE_INLINE_FLAGS;
}
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_DCA_MODE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册