Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3135389rdg; Tue, 17 Oct 2023 05:56:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHWfS2/6cLxdgyy/FN/FiYmq/5qYVRi4DEvtKImxH37OOXGdVGn3ReS/tQUEo8z7DtxjQU X-Received: by 2002:a17:902:e543:b0:1c9:b2c1:139c with SMTP id n3-20020a170902e54300b001c9b2c1139cmr2683440plf.62.1697547399916; Tue, 17 Oct 2023 05:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697547399; cv=none; d=google.com; s=arc-20160816; b=C63lvPuks0Z/IcI++S3gHoL5wfm2pBMhkCqb/8riCGUvfymiPD9d8So2Ju3Gp+butY G+mNa+1deZE34oxn+R14IJFDJHJVvv60TRo/u4rwMz9AWQnaLdB60y3lerVVZtjMhlWb Qy9RHAoSvHYYfeTbeirDU8MYjdU406nYZxdfgZpt0iQtDk4VJc/OSbxVjyI7JoF40roN T8TAXz4/kD8kYMbaY03tvW8YYMXdFrTAAS+uYlfn9X0T8grybrlO1XRLf0NjLaCDk4rL T8i4/vQevGGlIGqxcw7daK4X8OrPMJyhwEoIV3XzXr52AByLedYpY8z7uwPGcpJyIzc5 tABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=X4kPyIuxLD81qOGCoDZdbIb7dn/kollxIqnCHhsQ8i4=; fh=KWvyQxL3Ff+3WPSMjlYu+P4255AmcMULAsFol6M1vNI=; b=HP5PFvX0YkfOV1C9p3lSumCNmkdALhaR7nffbbxNm/pHBP/08J0qq7MSrL8tYE69Ji U6pG5a6JqjHfwL3uSCHAZH33hsr/eAzedsqa0Nm0VwdxLd0hZEiccWXs7KfP+D9r7qf7 FuqyIl6vYwu7GcrpjJtZozTQprY+ItVhn0FxXpxdlb1HLgGC8L89IC1sxQ8le3LeGOvS 81suGKmM1HmbgX37iN8i3pvw3826fBqKTVQNlIx+dD9p1Y2mPKuRJSyMmrhtQCDNvOzO ebs/ppjv1TYg5RN31/FHddUckfdlnsRpY3goOKq6UVTmHawVK5cmHOUSZXVc3PKmh3l9 BJeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h12-20020a170902704c00b001c62b51ac0fsi1609116plt.306.2023.10.17.05.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 89FAA802913C; Tue, 17 Oct 2023 05:56:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343822AbjJQM4S (ORCPT + 99 others); Tue, 17 Oct 2023 08:56:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234939AbjJQMz6 (ORCPT ); Tue, 17 Oct 2023 08:55:58 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB56F2; Tue, 17 Oct 2023 05:55:56 -0700 (PDT) Received: from kwepemi500006.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S8v4p3ckqzCrRP; Tue, 17 Oct 2023 20:51:54 +0800 (CST) Received: from localhost.localdomain (10.67.165.2) by kwepemi500006.china.huawei.com (7.221.188.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 17 Oct 2023 20:55:53 +0800 From: Junxian Huang To: , CC: , , , Subject: [PATCH for-rc 5/7] RDMA/hns: The UD mode can only be configured with DCQCN Date: Tue, 17 Oct 2023 20:52:37 +0800 Message-ID: <20231017125239.164455-6-huangjunxian6@hisilicon.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20231017125239.164455-1-huangjunxian6@hisilicon.com> References: <20231017125239.164455-1-huangjunxian6@hisilicon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500006.china.huawei.com (7.221.188.68) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 17 Oct 2023 05:56:37 -0700 (PDT) From: Luoyouming 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 Signed-off-by: Junxian Huang --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index b7faf5c8f6ba..58d14f1562b9 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -4725,6 +4725,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: -- 2.30.0