]> xenbits.xensource.com Git - people/aperard/linux.git/commitdiff
RDMA/hns: The UD mode can only be configured with DCQCN
authorLuoyouming <luoyouming@huawei.com>
Tue, 17 Oct 2023 12:52:37 +0000 (20:52 +0800)
committerLeon Romanovsky <leon@kernel.org>
Thu, 19 Oct 2023 06:49:40 +0000 (09:49 +0300)
Due to hardware limitations, only DCQCN is supported for UD. Therefore, the
default algorithm for UD is set to 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/20231017125239.164455-6-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index cef43e77dc252c27ce66128b35cbdbea8e92de9d..0cd2612a49870f1e831f5a6b088aff3260ce2cb6 100644 (file)
@@ -4730,6 +4730,9 @@ static int check_cong_type(struct ib_qp *ibqp,
 {
        struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
 
+       if (ibqp->qp_type == IB_QPT_UD)
+               hr_dev->caps.cong_type = CONG_TYPE_DCQCN;
+
        /* different congestion types match different configurations */
        switch (hr_dev->caps.cong_type) {
        case CONG_TYPE_DCQCN: