linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, longli@microsoft.com,
	kotaranov@microsoft.com, kent.overstreet@linux.dev,
	brett.creeley@amd.com, schakrabarti@linux.microsoft.com,
	shradhagupta@linux.microsoft.com, ssengar@linux.microsoft.com,
	rosenp@gmail.com, paulros@microsoft.com,
	linux-hyperv@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 2/3] net: mana: Add sched HTB offload support
Date: Thu, 24 Apr 2025 10:38:16 +0100	[thread overview]
Message-ID: <20250424093816.GD3042781@horms.kernel.org> (raw)
In-Reply-To: <20250418165324.GA29127@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

On Fri, Apr 18, 2025 at 09:53:24AM -0700, Erni Sri Satya Vennela wrote:
> On Thu, Apr 17, 2025 at 05:00:52PM -0700, Jakub Kicinski wrote:
> > On Thu, 17 Apr 2025 12:47:27 -0700 Erni Sri Satya Vennela wrote:
> > > > A single leaf is just Token Bucket Filter (TBF).
> > > > Are you just trying to support some vendor config?  
> > > TBF does not support hardware offloading.
> > 
> > Did you take a look at net_shapers? Will it not let you set a global
> > config the way you intend?
> Yes, Jakub. I have reviewed net-shapers and noted that it is not
> integrated into the kernel like tc. I mean there isn't a standard,
> general-purpose command for net-shaper in Linux. It is used by other
> tools or potentially device-specific drivers that want to leverage the
> NIC's hardware shaping capabilities.
> 
> To configure shaping with net-shapers, users would need to execute a
> command similar to:
> 
> ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/shaper.yaml
> --do set --json '{"ifindex":'$IFINDEX', 
> 		  "shaper": {"handle": 
> 			    {"scope": "node", "id":'$NODEID' },
> 		  "bw-max": 2000000}}'
> 
> Ref: https://lore.kernel.org/all/cover.1722357745.git.pabeni@redhat.com/
> 
> Given the simplicity of code implementation and ease of use for users in
> writing commands, I opted for tc-htb.

Hi Erni,

As someone who was involved with the design of net-shapers, I think it is
reasonable to instead use the Kernel API which appears to have been
designed specifically for this purpose: to control HW TX rate limiting.

If tooling isn't intuitive or otherwise doesn't meet user's needs
then that is something that can be addressed. But it's not a Kernel issue.

  reply	other threads:[~2025-04-24  9:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17  7:57 [PATCH 0/3] net: mana: Add HTB Qdisc offload support Erni Sri Satya Vennela
2025-04-17  7:57 ` [PATCH 1/3] net: mana: Add speed support in mana_get_link_ksettings Erni Sri Satya Vennela
2025-04-17 13:38   ` Zhu Yanjun
2025-04-17 19:44     ` Erni Sri Satya Vennela
2025-04-17  7:57 ` [PATCH 2/3] net: mana: Add sched HTB offload support Erni Sri Satya Vennela
2025-04-17 15:10   ` Stephen Hemminger
2025-04-17 19:47     ` Erni Sri Satya Vennela
2025-04-18  0:00       ` Jakub Kicinski
2025-04-18 16:53         ` Erni Sri Satya Vennela
2025-04-24  9:38           ` Simon Horman [this message]
2025-04-25  6:23             ` Erni Sri Satya Vennela
2025-04-17  7:57 ` [PATCH 3/3] net: mana: Handle unsupported HWC commands Erni Sri Satya Vennela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250424093816.GD3042781@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=ernis@linux.microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kent.overstreet@linux.dev \
    --cc=kotaranov@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulros@microsoft.com \
    --cc=rosenp@gmail.com \
    --cc=schakrabarti@linux.microsoft.com \
    --cc=shradhagupta@linux.microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=stephen@networkplumber.org \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).