Skip to content
Commit d20a7cf9 authored by Luoyouming's avatar Luoyouming Committed by Leon Romanovsky
Browse files

RDMA/hns: Fix mis-modifying default congestion control algorithm

Commit 27c5fd27 ("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 27c5fd27 ("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: 27c5fd27 ("RDMA/hns: The UD mode can only be configured with DCQCN")
Fixes: f91696f2

 ("RDMA/hns: Support congestion control type selection according to the FW")
Signed-off-by: default avatarLuoyouming <luoyouming@huawei.com>
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20240219061805.668170-1-huangjunxian6@hisilicon.com
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent aafe4cc5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment