From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: Sunil Kovvuri <sunil.kovvuri@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
paul.arola@telus.com, scott.roberts@telus.com
Subject: Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: implement egress tbf qdisc for 6393x family
Date: Mon, 12 Jun 2023 10:54:29 +0200 [thread overview]
Message-ID: <e650d15a-3fa6-5c76-8eee-ba21df3230f2@bootlin.com> (raw)
In-Reply-To: <CA+sq2CcG4pQDLcw+fTkcEfTZv6zPY3pcGCKeOy8owiaRF2HELA@mail.gmail.com>
Hi Sunil,
On 6/12/23 08:34, Sunil Kovvuri wrote:
>
>
> On Fri, Jun 9, 2023 at 11:08 PM Alexis Lothoré <alexis.lothore@bootlin.com
> <mailto:alexis.lothore@bootlin.com>> wrote:
>
> On 6/9/23 19:16, Andrew Lunn wrote:
> >> Yes, I can do that (or maybe -EINVAL to match Vladimir's comment ?). I think
> >> it's worth mentioning that I encountered an issue regarding those values
> during
> >> tests: I use tc program to set the tbf, and I observed that tc does not even
> >> reach kernel to set the qdisc if we pass no burst/latency value OR if we
> set it
> >> to 0. So tc enforces right on userspace side non-zero value for those
> >> parameters, and I have passed random values and ignored them on kernel side.
> >
> > That is not good. Please take a look around and see if any other
> > driver offloads TBF, and what they do with burst.
> >
> >> Checking available doc about tc-tbf makes me feel like that indeed a TBF
> qdisc
> >> command without burst or latency value makes no sense, except my use case can
> >> not have such values. That's what I struggled a bit to find a proper qdisc to
> >> match hardware cap. I may fallback to a custom netlink program to improve
> testing.
> >
> > We don't really want a custom application, since we want users to use
> > TC to set this up.
> >
> > Looking at the 6390 datasheet, Queue Counter Registers, mode 8 gives
> > the number of egress buffers for a port. You could validate that the
> > switch has at least the requested number of buffers assigned to the
> > port? There is quite a bit you can configure, so maybe there is a way
> > to influence the number of buffers, so you can actually implement the
> > burst parameter?
>
> Thanks for the pointers. I will check the egress buffers configuration and see
> if I can come up with something better
>
>
> For setting up simple per-port ratelimit, instead of TBF isn't "egress matchall"
> suitable here ?
I guess you are suggesting matchall + policer ? At first glance, I see no
obvious elements showing if one or another is more relevant. From user point of
view, controls are pretty much the same (rate + burst at least), but it looks
like policer is more of a pass/drop action, contrary to TBF which has some delay
notions, so it would solve the latency/limit absence of control. I am not sure
how it would look like on kernel side and how it would behave (how is managed
the filter, how can the policer be offloaded). I see some port_policer_add/del
callbacks in DSA, I will take a look at that as well and check differences with
TBF. Thanks for the suggestion.
Alexis
>
> Thanks,
> Sunil.
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2023-06-12 8:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 14:18 [PATCH net-next 0/2] add egress rate limit offload for Marvell 6393X family alexis.lothore
2023-06-09 14:18 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: allow driver to hook TC callback alexis.lothore
2023-06-09 14:18 ` [PATCH net-next 2/2] net: dsa: mv88e6xxx: implement egress tbf qdisc for 6393x family alexis.lothore
2023-06-09 14:53 ` Andrew Lunn
2023-06-09 16:27 ` Alexis Lothoré
2023-06-09 17:16 ` Andrew Lunn
2023-06-09 17:38 ` Alexis Lothoré
[not found] ` <CA+sq2CcG4pQDLcw+fTkcEfTZv6zPY3pcGCKeOy8owiaRF2HELA@mail.gmail.com>
2023-06-12 8:54 ` Alexis Lothoré [this message]
2023-06-12 9:43 ` Vladimir Oltean
2023-06-12 18:23 ` Sunil Kovvuri
2023-06-12 18:51 ` Vladimir Oltean
2023-06-09 14:57 ` Vladimir Oltean
2023-06-09 16:27 ` Alexis Lothoré
2023-06-09 15:52 ` kernel test robot
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=e650d15a-3fa6-5c76-8eee-ba21df3230f2@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=paul.arola@telus.com \
--cc=scott.roberts@telus.com \
--cc=sunil.kovvuri@gmail.com \
--cc=thomas.petazzoni@bootlin.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