]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
RDMA/hns: Avoid filling sgid index when modifying QP to RTR
authorWeihang Li <liweihang@huawei.com>
Fri, 5 Feb 2021 09:39:23 +0000 (17:39 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:09:25 +0000 (15:09 +0100)
commita135a050af1e829e3d271bca68af40609a842271
tree52f69e056504579da8f23a2ee0987d267e5398b4
parent87f87cbfa4300263950be97e70d793a80772c005
RDMA/hns: Avoid filling sgid index when modifying QP to RTR

[ Upstream commit 773f841ab1aeb0134e3872eb3545592732db8218 ]

ULP usually set IB(V)_QP_AV when trying to modify QP to RTR if they want
to record sgid index into QPC. For UD QPs, it is useless because it will
be included in WQE. For RC QPs, it will be filled in
hns_roce_set_path(). So sgid index shouldn't be filled by default. Then
hns_get_gid_index() is moved to hns_roce_hw_v1.c because it is only called
in it.

Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC")
Link: https://lore.kernel.org/r/1612517974-31867-2-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_main.c