From: Junxian Huang huangjunxian6@hisilicon.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8HYSU
--------------------------------------------------------------------------
When the congest type pf a QP is invalid, the algorithm param will be set to DCQCN param by default. In this case, the congest type should also be set to DCQCN accordingly, or the algorithm may not take effect properly.
Fixes: a7052c43d9a4 ("RDMA/hns: Fix default congest type") Signed-off-by: Junxian Huang huangjunxian6@hisilicon.com --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 1cfcefb28d7e..350b824431e6 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -5153,6 +5153,7 @@ static int check_congest_type(struct ib_qp *ibqp, congest_alg->wnd_mode_sel = WND_LIMIT; break; default: + hr_qp->congest_type = HNS_ROCE_CONGEST_TYPE_DCQCN; congest_alg->alg_sel = CONGEST_DCQCN; congest_alg->alg_sub_sel = UNSUPPORT_CONGEST_LEVEL; congest_alg->dip_vld = DIP_INVALID;