From: "Jan Lübbe" <jlu@pengutronix.de>
To: Florian Fainelli <f.fainelli@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>
Cc: netdev <netdev@vger.kernel.org>,
Vladimir Oltean <olteanv@gmail.com>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
kernel@pengutronix.de, Andrew Lunn <andrew@lunn.ch>
Subject: Re: dsa traffic priorization
Date: Mon, 23 Sep 2019 14:56:08 +0200 [thread overview]
Message-ID: <bc0acd2803c4f513babe6bcc006b95a6297484bc.camel@pengutronix.de> (raw)
In-Reply-To: <bc70ddd1-0360-5c09-f03d-3560a0948f52@gmail.com>
Adding TC maintainers... (we're trying to find a mainline-acceptable
way to configure and offload strict port-based priorities in the
context of DSA/switchdev).
On Thu, 2019-09-19 at 10:12 -0700, Florian Fainelli wrote:
> On 9/19/19 1:44 AM, Sascha Hauer wrote:
> > On Wed, Sep 18, 2019 at 10:41:58AM -0700, Florian Fainelli wrote:
> > > On 9/18/19 7:36 AM, Vladimir Oltean wrote:
> > > > On Wed, 18 Sep 2019 at 17:03, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > > > > The other part of the problem seems to be that the CPU port
> > > > > has no network device representation in Linux, so there's no
> > > > > interface to configure the egress limits via tc.
> > > > > This has been discussed before, but it seems there hasn't
> > > > > been any consensous regarding how we want to proceed?
> > >
> > > You have the DSA master network device which is on the other side of the
> > > switch,
> >
> > You mean the (in my case) i.MX FEC? Everything I do on this device ends
> > up in the FEC itself and not on the switch, right?
>
> Yes, we have a way to overload specific netdevice_ops and ethtool_ops
> operations in order to use the i.MX FEC network device as configuration
> entry point, say eth0, but have it operate on the switch, because when
> the DSA switch got attached to the DSA master, we replaced some of that
> network device's operations with ones that piggy back into the switch.
> See net/dsa/master.c for details.
Currently, it overrides
for ethtool:
ops->get_sset_count = dsa_master_get_sset_count;
ops->get_ethtool_stats = dsa_master_get_ethtool_stats;
ops->get_strings = dsa_master_get_strings;
ops->get_ethtool_phy_stats = dsa_master_get_ethtool_phy_stats;
for ndo:
ops->ndo_get_phys_port_name = dsa_master_get_phys_port_name;
In dsa/slave.c we have for ndo:
.ndo_setup_tc = dsa_slave_setup_tc,
So we would override ndo_setup_tc from dsa as well, maybe falling back
to the original ndo_setup_tc provided by the ethernet driver if we the
switch HW cannot handle a TC configuration?
That would allow us to configure and offload a CPU-port-specific TC
policy under the control of DSA. Is this interface reasonable?
Im not sure if the existing TC filters and qdiscs can match on bridge-
specific information (like the ingress port) yet, so this might require
extensions to TC filters as well...
Regards,
Jan
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2019-09-23 12:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 14:02 dsa traffic priorization Sascha Hauer
2019-09-18 14:36 ` Vladimir Oltean
2019-09-18 15:03 ` Dave Taht
2019-09-18 17:27 ` Florian Fainelli
2019-09-18 17:41 ` Florian Fainelli
2019-09-18 19:39 ` Vladimir Oltean
2019-09-18 22:02 ` Florian Fainelli
2019-09-19 8:44 ` Sascha Hauer
2019-09-19 17:12 ` Florian Fainelli
2019-09-23 12:56 ` Jan Lübbe [this message]
2019-09-23 15:32 ` Florian Fainelli
2019-09-19 13:21 ` Jan Lübbe
2019-09-19 13:33 ` Vladimir Oltean
2019-09-19 13:35 ` Jan Lübbe
2019-09-19 8:00 ` Sascha Hauer
2019-09-19 8:18 ` Vladimir Oltean
2019-09-19 8:41 ` Sascha Hauer
2019-09-19 8:36 ` Uwe Kleine-König
2019-09-19 8:42 ` Vladimir Oltean
2019-09-19 13:34 ` Andrew Lunn
2019-09-19 14:44 ` Jan Lübbe
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=bc0acd2803c4f513babe6bcc006b95a6297484bc.camel@pengutronix.de \
--to=jlu@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kernel@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=vivien.didelot@savoirfairelinux.com \
--cc=xiyou.wangcong@gmail.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).