]> xenbits.xensource.com Git - people/aperard/linux.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)
committerLeon Romanovsky <leon@kernel.org>
Mon, 19 Feb 2024 07:50:31 +0000 (09:50 +0200)
commitd20a7cf9f714f0763efb56f0f2eeca1cb91315ed
tree9231cb6c8604d36a418a0efb3bc72a7f3019abd6
parentaafe4cc5096996873817ff4981a3744e8caf7808
RDMA/hns: Fix mis-modifying default congestion control algorithm

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>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c