]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Fix querying wrong SCC context for DIP algorithm
authorwenglianfa <wenglianfa@huawei.com>
Sat, 26 Jul 2025 07:53:45 +0000 (15:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:31:12 +0000 (16:31 +0200)
commit89053e3f0c2d68ec6f00f38f1fa4fe31f8ff5fb6
treebe6810dbb710c6fc2db19edb913c75b5109446ca
parented4f1d589168b6211c75081c356284684c410c58
RDMA/hns: Fix querying wrong SCC context for DIP algorithm

[ Upstream commit 085a1b42e52750769a3fa29d4da6c05ab56f18f8 ]

When using DIP algorithm, all QPs establishing connections with
the same destination IP share the same SCC, which is indexed by
dip_idx, but dip_idx isn't necessarily equal to qpn. Therefore,
dip_idx should be used to query SCC context instead of qpn.

Fixes: 124a9fbe43aa ("RDMA/hns: Append SCC context to the raw dump of QPC")
Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20250726075345.846957-1-huangjunxian6@hisilicon.com
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_restrack.c