Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp425868lql; Mon, 11 Mar 2024 07:00:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXybwq57p7+CQjVrtwAubgtcW/RaVp1+JKNcGgrMLrCiJ3Qp60H2r+YiSMQSIjcCzoiulmVudA73dbIJVWbb5/0rX2QveeSVcf1i2VV/g== X-Google-Smtp-Source: AGHT+IGQ/aGjGJji88L1B+IQmtW/s1u2zGwppNtxE0HW3H1gh67HFR8bdVQnYQK37zz0fPS1GTGE X-Received: by 2002:aca:2b19:0:b0:3c2:35e7:6856 with SMTP id i25-20020aca2b19000000b003c235e76856mr6767002oik.29.1710165645557; Mon, 11 Mar 2024 07:00:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710165645; cv=pass; d=google.com; s=arc-20160816; b=CyczoTFjJ4b0Xao+5kyJb7mgfNd1f7H+d9YLbVSWuBMSUcAZ0jxtKiBqB4dT7LZV95 Bc8JcwRPqYCAgpz5fSvI0zHgdPv7cTQDQ36KC4VvOzVWzdDkY54ZuoIx+TUCLHAdlRjw I55QzfI8oForHE2JccXql6CTIgcU3MstFTxvl6f/cs0iYvGwPQFfM1E8ar6nHpR5F7Hm SXq81e4Koki5r1y/JwOA9xCxQbr4yUWQDT73AFH9+Lt4tkx6nAtYvP6s+ZNT8A6WNwTm RfBG5k8XB5sF9f1sWd3SNbZgWTGt6PTkGszRx8o4EFY3stqCcA/3QJ01nEU/vVwmYkW3 lX+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=S7Ub9IyLDIodo1ODQoeRjTbBAKWkycc5yCFjhPiK4Og=; fh=/0b1uayxl6xObb+ppBuwyrMHN3i6f8LQGamT2h+wQt8=; b=Xkxb0GPjEOPK3m0n8i1cgnKn9//80s2rP0/6ZbaCyJgz9w01UtEfa05jbtzEU5oZcB rjwd2R1jdJetNV/HeP6pQpCcJPKvNIw0MOzRz2Veo65q+uT+deqN33kK7F+yVDkYbEvl UJxsYlpKbF5XW1Y/QBBMxqugGLUn43RMjY0PS6TQb4G98vclVzAHCT7SOOvSkABmrRZ/ 2PdCDTApMvA0qQGTGIgQQtr6OpMLOC4nPdLcKE80RXaSZiSf4IqKRRc9yJerWJxbx4I4 /VbCepAFNYcaMy3zX3u+BEnXGaHLFJeUGQwSvoynf5LlcdKAYsp4xxCnCNK0zk+inqZV Sx5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hisilicon.com dmarc=pass fromdomain=hisilicon.com); spf=pass (google.com: domain of linux-kernel+bounces-98930-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98930-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n2-20020a05622a11c200b0042ef5fa37f2si5590236qtk.452.2024.03.11.07.00.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 07:00:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98930-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=hisilicon.com dmarc=pass fromdomain=hisilicon.com); spf=pass (google.com: domain of linux-kernel+bounces-98930-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98930-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EEDE11C20E95 for ; Mon, 11 Mar 2024 14:00:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F34D3FB3B; Mon, 11 Mar 2024 14:00:36 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0D2625755; Mon, 11 Mar 2024 14:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710165635; cv=none; b=K4NT8KMgVmyXIY+Y43kv1irpXirqKc0W2s9nFgpbQm+langIpMDzkYpNQgK4GOjMI0HpWcKvgHZcg2ZCpUge4Dhh4xWI9M7M2KdePFVVJrj1TMwi5LO774XCSJotFJfgKJQMdxLdYC41TFBAOC0up5mI2yphKf1OTK52Qog5Yww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710165635; c=relaxed/simple; bh=yeIfJKwxZ8NuIULLluOK4QJcbswhSvGsUU/2cdooVIU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=oEv2mutCKoccoDKowaXB2NB1zItTy5+gxgy7A85ErvLTM8rnfPZZC7ZJnBm2BGdbYLcuHNQZFj2Xg9u5DYfV/BCN6ljDc/s3vwv1N+GHpatuZS17JT8dqlA7nEcZcb8ciQfRwWLrpzRAl6VLYG7h2CGj7Y0L/aAbNPSSjdjPApU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com; spf=pass smtp.mailfrom=hisilicon.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hisilicon.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Ttddl0z6Sz1h1wg; Mon, 11 Mar 2024 21:58:03 +0800 (CST) Received: from kwepemi500006.china.huawei.com (unknown [7.221.188.68]) by mail.maildlp.com (Postfix) with ESMTPS id 8BD65180061; Mon, 11 Mar 2024 22:00:28 +0800 (CST) Received: from [10.67.120.168] (10.67.120.168) by kwepemi500006.china.huawei.com (7.221.188.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 11 Mar 2024 22:00:27 +0800 Message-ID: Date: Mon, 11 Mar 2024 22:00:27 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 Subject: Re: [PATCH for-next] RDMA/hns: Support congestion control algorithm parameter configuration Content-Language: en-US To: Leon Romanovsky CC: , , , References: <20240308105443.1130283-1-huangjunxian6@hisilicon.com> <20240310100027.GC12921@unreal> <20240311071119.GH12921@unreal> From: Junxian Huang In-Reply-To: <20240311071119.GH12921@unreal> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500006.china.huawei.com (7.221.188.68) On 2024/3/11 15:11, Leon Romanovsky wrote: > On Mon, Mar 11, 2024 at 10:00:51AM +0800, Junxian Huang wrote: >> >> >> On 2024/3/10 18:00, Leon Romanovsky wrote: >>> On Fri, Mar 08, 2024 at 06:54:43PM +0800, Junxian Huang wrote: >>>> From: Chengchang Tang >>>> >>>> hns RoCE supports 4 congestion control algorithms. Each algorihm >>>> involves multiple parameters. Add port sysfs directory for each >>>> algorithm to allow modifying their parameters. >>> >>> Unless Jason changed his position after this rewrite [1], we don't allow >>> any custom driver sysfs code. >>> >>> [1] https://lore.kernel.org/all/cover.1623427137.git.leonro@nvidia.com/ >>> >> >> I didn't quite get the reason from [1], could you please explain it? > > Before [1], we didn't allow custom sysfs. After [1], the sysfs code > started to be more sane and usable for the drivers. However, it is > unlikely that the policy is changed to allow driver sysfs code. > >> >> And it would be helpful if you could give us a hint about any other >> proper ways to do the algorithm parameter configuration. > > Like any other FW internals. > If we add the capability of custom driver parameter configuration to rdmatool (similar to [2]), would it be acceptable? [2] https://patchwork.ozlabs.org/project/netdev/patch/1530703837-24563-4-git-send-email-moshe@mellanox.com/ Junxian > Thanks > >> >> Thanks, >> Junxian >> >>>> >>>> Signed-off-by: Chengchang Tang >>>> Signed-off-by: Junxian Huang >>>> --- >>>> drivers/infiniband/hw/hns/Makefile | 2 +- >>>> drivers/infiniband/hw/hns/hns_roce_device.h | 20 ++ >>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 59 ++++ >>>> drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 132 ++++++++ >>>> drivers/infiniband/hw/hns/hns_roce_main.c | 3 + >>>> drivers/infiniband/hw/hns/hns_roce_sysfs.c | 346 ++++++++++++++++++++ >>>> 6 files changed, 561 insertions(+), 1 deletion(-) >>>> create mode 100644 drivers/infiniband/hw/hns/hns_roce_sysfs.c >>> >>> Thanks >>