From patchwork Tue Oct 17 12:52:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junxian Huang X-Patchwork-Id: 154261 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4111804vqb; Tue, 17 Oct 2023 05:57:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/31KWDmMGkrCMBs2714MY8vtq+P7itjFUOHwXp8nElsVmVT+wxC0CBjtc4pMMOsTBtCjk X-Received: by 2002:a05:6a20:c182:b0:163:f945:42c4 with SMTP id bg2-20020a056a20c18200b00163f94542c4mr2192952pzb.1.1697547445010; Tue, 17 Oct 2023 05:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697547444; cv=none; d=google.com; s=arc-20160816; b=lpXS01Uvf4cawVsY/x8OR82nFSxWoAd8ArA82gD3dnuLFhaKrYCkGfbXdClbuirSxD z1fjXU9nYbsCJwB0yHBFCdlI9psiHOa4AuUYpu9YOvrOZ7Evk/n0ObiYZhNANMbGwsw1 6LGpuLHDP17ukmzsrin2BwWQtKsIV6WSva0/BSQPN9rcHq294rGpaTakiwjK5dab397H moinFi2gnvIEp6euxTomaDb+QlXbHtJRxMacAdGsduMgMsm1txoP2utUkTfDDZckHU1E 83jRFitcGBkBHl5hQeyjKoBKhyyjtvNoF6w0ufyA7sJ6I5gAooQLC7zp/z3JD/6ma/Jj 5CaA== 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.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x11-20020a17090aca0b00b0027b0acd55d2si8545786pjt.101.2023.10.17.05.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:57:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 8700E806500F; Tue, 17 Oct 2023 05:56:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343782AbjJQM4S (ORCPT + 19 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 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 05:56:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780007509570867242 X-GMAIL-MSGID: 1780007509570867242 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: