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.pab...@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.