Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp903633lql; Tue, 12 Mar 2024 01:05:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUoses8AYkEM6XrhFKkci3Wd6ZrYCdq5aMNIi6vZUokS6/rgIb/MlAwns1avkBprz5j3rfk0d1NGtj1y0i8kJVho2u43wh5O72B2vMpfA== X-Google-Smtp-Source: AGHT+IF/kQdLIIcaSnbyg01q3KINLMJXBn68kCsyOymJCkMkBa6skdDCAMzAffAg/us7GYT8jmqO X-Received: by 2002:a50:a417:0:b0:563:c54e:ee with SMTP id u23-20020a50a417000000b00563c54e00eemr6263660edb.2.1710230736807; Tue, 12 Mar 2024 01:05:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710230736; cv=pass; d=google.com; s=arc-20160816; b=Ge5hxBRITMdXretBeJbMTprF120Fiy+N8GFxo5ReF6VGzmBeNPtDtrg+E92YTI6nws Vc6se569uizYuF06/AuLOrW+8oDSuM4QP8mae1n8MjBgGkGr5Jrb5lTv3WrUGAn12Q1B OYroE2QbzwgiYeFFoXIpSY2rFyYbs0Eg+Jyc37w67tSKE3yrA5TUR4PPl8QYj0BkNfSU jrFMdgVXcYh5tQtYAj6Xn7vTn2PkHwmTXVrwy/ATifSBwrKuyXlBa9qGjCqH7bQ7/OI/ pPRb9xbr+nmPsVOZyphPmV+AyauTaKkX8ueSarO7asJVcIiJ5GKp+sG/75q1zYj0zSv9 1Zmw== 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=2Z92HKlQBHq9+GFSXOxkv6oYU8y7QF8VA7+cOoSxG5w=; fh=DQ4iYRSMLAEi5vZHJLJxXHYGayqB3vG83MXII+z0OHs=; b=vtuk7pbM70j5xuaktBghdGq16tcAexGJemxH6jBNYL6cBqzyFdqaoHdBeZ1wJvOFiG pTtBltdltz+5xzMhT2h13voBPkHKAadE6Mq15axd765yau8XiEHgnsOnqZu9xO+Ibq19 4BOB8GZoNyM9VUxXJUcJjKz21Pr050hXZNStC/tv0UtPRnswCapeTHKlxyVwhryEIbjk W6E4bFcs91QqIMkAgZmeSj58BVSo9EIYDNYUTMbHdvBXKW+xbwQXaWTzxfl8ZMcM/g77 UV+Y8rzyoDQawtWssmZyF9FENUhSGJ1Wg3r1FG/jQeCFivnVXMADOVdjhnKn70P6V+he 40kg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rxOMTwL6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99935-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 n9-20020a056402434900b0056864c4aea1si1274125edc.601.2024.03.12.01.05.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 01:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99935-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=rxOMTwL6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99935-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 7ACC91F224C0 for ; Tue, 12 Mar 2024 08:05:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8A6369D09; Tue, 12 Mar 2024 08:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rxOMTwL6" 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 BB53769976; Tue, 12 Mar 2024 08:05:27 +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=1710230727; cv=none; b=pgVVR6/NGK3nyMHON13DOwRySU915eub1n+MsUZ4TzQcgN8F9y6qhNFN316t8Or8HI6/ALPIpfaQZykOUzYPN4k8yIzaLTl+4bKPpLi/wYaUtrdilbRUI2iiJSR/eXKoTWItRzXCOWHgj3kLOtsgeciwLkIfyXGGN3GSivyd5PI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710230727; c=relaxed/simple; bh=hjEUoaSnv3s4TMFYXd/dWLIM48mAjAsndwyEjqfY9hY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JSx2PdHomE0rkSBaYjXdPQZAft2syg5289CkoweG/MPbrZGmgxgmeuG57fGknucZeHT+9t5VnQJk4bp0UYBFQCacIlWH95uRfTUASotl6zQSuFawp5MmyGm4ufWAbMugtH3iuWmBPMohs/BuBkdYo4hrvqLNEwh9j7/4vCf5ILQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rxOMTwL6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A85EEC433F1; Tue, 12 Mar 2024 08:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710230727; bh=hjEUoaSnv3s4TMFYXd/dWLIM48mAjAsndwyEjqfY9hY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rxOMTwL6CLqKvUmKKZhXs//giXwuz+tRxxYx7Mqvik9xwkptCnzWPx20iaaTnpnNB 5Q5b8fd/ALL7izauL33I5LeCoHis1RCkM63v0bN6bGJuV2gM1cLyZdEzhnr102YlHh RkVcjcpc9KQW6QpWiq7yNDRtKtmmKGCT7ge0xvb7cUUkgBZbX5CtRAuGPNCvAG83Gv HumVmlbLTZ1xr6kThWuQtm5NI6dkZBu1kuvUIy3WmtZckP4H6oPgYYpKxb4QZT//S3 u0ALKd5W8as/336mZm0UuaTFri0sALnLH9WzquwPSUkABb59oql0L1zmJ2qmLjEmAO vzyIejzEnB19A== Date: Tue, 12 Mar 2024 10:05:22 +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: <20240312080522.GO12921@unreal> References: <20240308105443.1130283-1-huangjunxian6@hisilicon.com> <20240310100027.GC12921@unreal> <20240311071119.GH12921@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:27PM +0800, Junxian Huang wrote: > > > 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? Moshe's patch is for devlink. We are working on a generic solution for other vendors to control/debug their devices. https://lwn.net/Articles/955001/ https://lore.kernel.org/all/20240304160237.GA2909161@nvidia.com/ Feel free to join the discussion and reply that you are interested in this proposal as well and emphasize that your device is not netdev at all. Thanks > > [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 > >>