]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/hns: Fix mis-modifying default congestion control algorithm
authorLuoyouming <luoyouming@huawei.com>
Mon, 19 Feb 2024 06:18:05 +0000 (14:18 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:01 +0000 (18:20 -0400)
commit522e5e4770620cb72bc34fd041d595cc08cda522
treefc7de1fdadb0f21923a4616d1b51737dbcbf74fb
parent076acd671fc6ebca768156cfe0c598793edfcaff
RDMA/hns: Fix mis-modifying default congestion control algorithm

[ Upstream commit d20a7cf9f714f0763efb56f0f2eeca1cb91315ed ]

Commit 27c5fd271d8b ("RDMA/hns: The UD mode can only be configured
with DCQCN") adds a check of congest control alorithm for UD. But
that patch causes a problem: hr_dev->caps.congest_type is global,
used by all QPs, so modifying this field to DCQCN for UD QPs causes
other QPs unable to use any other algorithm except DCQCN.

Revert the modification in commit 27c5fd271d8b ("RDMA/hns: The UD
mode can only be configured with DCQCN"). Add a new field cong_type
to struct hns_roce_qp and configure DCQCN for UD QPs.

Fixes: 27c5fd271d8b ("RDMA/hns: The UD mode can only be configured with DCQCN")
Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW")
Signed-off-by: Luoyouming <luoyouming@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20240219061805.668170-1-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c