Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp232465lql; Mon, 11 Mar 2024 00:11:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWAOIEHQQ9ADhM9CIg0sLVaGiesPq22WY1PTxfzD4M35V9Uvt0zrqKzDlGMLkvT8JMICRwH6CmTaHX9Monu7+jDoHW5mBZQK0Kp17FVUw== X-Google-Smtp-Source: AGHT+IEUCjB39ahrsSSY2kLoajHyxudAMYyX/02QLY4U/AbxDTBGWdsOMI3LBGIDLKpQuJ+bPDyU X-Received: by 2002:a2e:9d92:0:b0:2d2:c82c:b822 with SMTP id c18-20020a2e9d92000000b002d2c82cb822mr3324412ljj.22.1710141094815; Mon, 11 Mar 2024 00:11:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710141094; cv=pass; d=google.com; s=arc-20160816; b=d8c5dBZH1tD6Eoq0/HJrX5+am0PCN6xaqvz5IHrX7e9CiyNytbV9G5ICyqNjkkqQDS NmfuzNwGF2pNlSV9ss4S+BoEaEIWWWhh6ss9pZLZKl+vOj6TDgLGIb3BzHW5dVwXg/4f DSVs8qUvaoFd3wnh4f7vEo7XLsDX9n2Ba9Z/GWfqZSLK4dC7Df5lSX7dtcmXQCsk5mac 26ZLJUSRXGxx0wij0myCjf9DkU2aTZTqVpu+iIlAwhx7FHFzdFeyHVH/F5g/xfaoJ+cD 1Ybpkey/sKnGe0lsAk2mqcpjpPWEji+jk1LYfblRqiCbksf+ANafF6OwjIIEw6gvCP1y /R/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OyG0jiuMyaZRk4gDZzP24+0uqpuR+0eYJ1hNpRf5o+U=; fh=DQ4iYRSMLAEi5vZHJLJxXHYGayqB3vG83MXII+z0OHs=; b=mg7/3ix49KQRhfE/BTuLr85Gwaik1+rLWqslEewFe/KVHCULdOTSBxFZ3ag+nkb2CM OeSGfLe/clM6zJ5Px6BPE9e2+bDXM/1ZtWNPcp3PyJ0elAa9AXMy8sUkFCr7dorAHT7B fnJ7EMp7m1idBXLQiyX/W/prcrBykTdJ+jctEVvEEAv6TUS5lG4EaDSQ+Axta9VhBOSO OzhcZ4kxwr0n0RHPxLrqunenuUwJAIZC4j2drvzW7U2FkDORo4aGsmU6bne+5drS2Iz5 Fw2R1ekGVzQyRrAamlh00C9Rtdn6o0qeU2pKZD3WqBvJ4L5DpQH442uZd7c9w9yJcdhC 0+7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mIHtkuQW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f12-20020a056402194c00b005685eb26a8dsi588671edz.480.2024.03.11.00.11.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 00:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mIHtkuQW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 861CD1F21528 for ; Mon, 11 Mar 2024 07:11:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8835E107B4; Mon, 11 Mar 2024 07:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mIHtkuQW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A6EACFBF2; Mon, 11 Mar 2024 07:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710141083; cv=none; b=B1kb/F9sxKSQ4KZlBOvARw5M/emSQ3OoS1Xl3eUFN9IIxvXei4N7hLOKzmlHw1H8Pg9LhPpB9EhlNP49Vl3AzbYP9LaoMlkAw31UKRIScq4OULvh2GMUbK9Xdm9w4M9fnZIMc4GHHL4XHcJTrg22nAE/lnoOeCHnOSldAx0q+zc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710141083; c=relaxed/simple; bh=4k2sfDO9r77vfUAyF7jF5oNEM2gJ6Lzfg5JkoPLhg1o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=btikiaUUfBeJqw50RdV17obTvRbpvs+9wz5CetDkornvzfxRXwMDjE2SlzC6TrqArPWRE87sQfiDF6H376GFWj9PojVtpCpM5H2pA2wMTMOeDH7BDmSQbk1pTftvhSUutMr8spldejUb+haaEBwiLjmUAFYKEUOqYXPtbKfDWJE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mIHtkuQW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4308C433F1; Mon, 11 Mar 2024 07:11:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710141083; bh=4k2sfDO9r77vfUAyF7jF5oNEM2gJ6Lzfg5JkoPLhg1o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mIHtkuQWTH3TXkmrrLiRThcLOhfXFg9RHzNou/nReR/oZG4UCJnnDHa51DlbQOk/N za1Rzfb6cvksAZPNZKF/NP1QJ2Wv6MP+CM5+eBo23XTI90YACQb03AXJmoYXL6QTjy oxW3hkks/pnok0H1CBQM8KJjKqeevL53zW/q0Q/bMmA4bkleTyDE44Wky+p/hM/OZc 9TKaFNh2o9lC19AzOo6vi0zUdVkvs1wMgPsz+SemtSuSazpfkf7+TDGHzhKNOPCrMj 5PNy3Iyup09hR3yQll+6MT8KN5X7dJY+UylZWmga3xoU4Lc5+H7tQLu5s82WYGu21x +9P9rEA1D9gkQ== Date: Mon, 11 Mar 2024 09:11:19 +0200 From: Leon Romanovsky To: Junxian Huang Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH for-next] RDMA/hns: Support congestion control algorithm parameter configuration Message-ID: <20240311071119.GH12921@unreal> References: <20240308105443.1130283-1-huangjunxian6@hisilicon.com> <20240310100027.GC12921@unreal> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. 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 >