From: John Fastabend <john.fastabend@gmail.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
Madhu Chittim <madhu.chittim@intel.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [RFC] HW TX Rate Limiting Driver API
Date: Thu, 11 Apr 2024 21:39:17 -0700 [thread overview]
Message-ID: <6618baf56c815_3a050208f4@john.notmuch> (raw)
In-Reply-To: <87a5lzihke.fsf@intel.com>
Vinicius Costa Gomes wrote:
> Hi,
>
> Simon Horman <horms@kernel.org> writes:
>
> > Hi,
> >
> > This is follow-up to the ongoing discussion started by Intel to extend the
> > support for TX shaping H/W offload [1].
> >
> > The goal is allowing the user-space to configure TX shaping offload on a
> > per-queue basis with min guaranteed B/W, max B/W limit and burst size on a
> > VF device.
> >
>
> What about non-VF cases? Would it be out of scope?
>
> >
> > In the past few months several different solutions were attempted and
> > discussed, without finding a perfect fit:
> >
> > - devlink_rate APIs are not appropriate for to control TX shaping on netdevs
> > - No existing TC qdisc offload covers the required feature set
> > - HTB does not allow direct queue configuration
> > - MQPRIO imposes constraint on the maximum number of TX queues
> > - TBF does not support max B/W limit
> > - ndo_set_tx_maxrate() only controls the max B/W limit
> >
>
> Another questions: is how "to plug" different shaper algorithms? for
> example, the TSN world defines the Credit Based Shaper (IEEE 802.1Q-2018
> Annex L gives a good overview), which tries to be accurate over sub
> milisecond intervals.
>
> (sooner or later, some NIC with lots of queues will appear with TSN
> features, and I guess some people would like to know that they are using
> the expected shaper)
>
> > A new H/W offload API is needed, but offload API proliferation should be
> > avoided.
> >
> > The following proposal intends to cover the above specified requirement and
> > provide a possible base to unify all the shaping offload APIs mentioned above.
> >
> > The following only defines the in-kernel interface between the core and
> > drivers. The intention is to expose the feature to user-space via Netlink.
> > Hopefully the latter part should be straight-forward after agreement
> > on the in-kernel interface.
> >
>
> Another thing that MQPRIO (indirectly) gives is the ability to userspace
> applications to have some amount of control in which queue their packets
> will end up, via skb->priority.
You can attach a BPF program now to set the queue_mapping. So one way
to do this would be to have a simple BPF program that maps priority
to a set of queues. We could likely include it somewhere in the source
or tooling to make it easily available for folks.
I agree having a way to map applications/packets to QOS is useful. The
nice bit about allowing BPF to do this is you don't have to figure out
how to set the priority on the socket and can use whatever policy makes
sense.
>
> Would this new shaper hierarchy have something that would fill this
> role? (if this is for VF-only use cases, then the answer would be "no" I
> guess)
>
> (I tried to read the whole thread, sorry if I missed something)
>
next prev parent reply other threads:[~2024-04-12 4:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 10:23 [RFC] HW TX Rate Limiting Driver API Simon Horman
2024-04-05 13:33 ` Jamal Hadi Salim
2024-04-05 17:06 ` Paolo Abeni
2024-04-06 13:48 ` Jamal Hadi Salim
2024-04-10 9:41 ` Paolo Abeni
2024-04-05 14:34 ` John Fastabend
2024-04-05 16:25 ` Paolo Abeni
2024-04-09 22:32 ` Jakub Kicinski
2024-04-10 8:33 ` Paolo Abeni
2024-04-10 14:57 ` Jakub Kicinski
2024-04-11 15:58 ` Paolo Abeni
2024-04-11 16:03 ` Jakub Kicinski
2024-04-19 11:53 ` Paolo Abeni
2024-04-22 18:06 ` Jakub Kicinski
2024-04-23 17:25 ` Paolo Abeni
2024-04-24 23:57 ` Jakub Kicinski
2024-04-11 23:51 ` Vinicius Costa Gomes
2024-04-12 4:39 ` John Fastabend [this message]
2024-04-22 11:30 ` Sunil Kovvuri Goutham
2024-04-23 14:07 ` Paolo Abeni
2024-04-23 15:56 ` Sunil Kovvuri Goutham
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=6618baf56c815_3a050208f4@john.notmuch \
--to=john.fastabend@gmail.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=madhu.chittim@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sridhar.samudrala@intel.com \
--cc=vinicius.gomes@intel.com \
/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).