Commit d1f77b65 authored by wangsirong's avatar wangsirong Committed by Zheng Zengkai
Browse files

RDMA/hns: Allocate one more recv SGE for HIP08

mainline inclusion
from mainline-v5.12-rc1
commit 9dd05247
category: bugfix
bugzilla: 174002
CVE:NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9dd052474a2645b2a6171d19ad17b05b180d446d

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

The RQ/SRQ of HIP08 needs one special sge to stop receive reliably. So the
driver needs to allocate at least one SGE when creating RQ/SRQ and ensure
that at least one SGE is filled with the special value during post_recv.

Besides, the kernel driver should only do this for kernel ULP. For
userspace ULP, the userspace driver will allocate the reserved SGE in
buffer, and the kernel driver just needs to pin the corresponding size of
memory based on the userspace driver's requirements.

    Link: https://lore.kernel.org/r/1611997090-48820-2-git-send-email-liweihang@huawei

.
com
    Signed-off-by: default avatarLang Cheng <chenglang@huawei.com>
    Signed-off-by: default avatarWeihang Li <liweihang@huawei.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>

Reviewed-by: default avatarChunZhi Hu <huchunzhi@huawei.com>

Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 2158c110
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment