lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X/+YQlEkeNYXditV@lunn.ch>
Date:   Thu, 14 Jan 2021 02:02:58 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        Ido Schimmel <idosch@...dia.com>,
        Petr Machata <petrm@...dia.com>,
        Alexander Duyck <alexander.duyck@...il.com>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...dia.com>, f.fainelli@...il.com,
        vivien.didelot@...il.com
Subject: Re: [RFC PATCH net-next 1/2] net: dsa: allow setting port-based QoS
 priority using tc matchall skbedit

On Thu, Jan 14, 2021 at 02:17:59AM +0200, Vladimir Oltean wrote:
> On Thu, Jan 14, 2021 at 12:41:28AM +0100, Andrew Lunn wrote:
> > On Wed, Jan 13, 2021 at 05:41:38PM +0200, Vladimir Oltean wrote:
> > > +	int	(*port_priority_set)(struct dsa_switch *ds, int port,
> > > +				     struct dsa_mall_skbedit_tc_entry *skbedit);
> > 
> > The fact we can turn this on/off suggests there should be a way to
> > disable this in the hardware, when the matchall is removed. I don't
> > see any such remove support in this patch.
> 
> I don't understand this comment, sorry. When the matchall filter
> containing the skbedit action gets removed, DSA calls the driver's
> .port_priority_set callback again, this time with a priority of 0.
> There's nothing to "remove" about a port priority. I made an assumption
> (which I still consider perfectly reasonable) that no port-based
> prioritization means that all traffic gets classified to traffic class 0.

That does not work for mv88e6xxx. Its default setup, if i remember
correctly, is it looks at the TOS bits to determine priority
classes. So in its default state, it is using all the available
traffic classes.  It can also be configured to look at the VLAN
priority, or the TCAM can set the priority class, or there is a per
port default priority, which is what you are describing here. There
are bits to select which of these happen on ingress, on a per port
basis.

So setting the port priority to 0 means setting the priority of
zero. It does not mean go back to the default prioritisation scheme.

I guess any switch which has a range of options for prioritisation
selection will have a similar problem. It defaults to something,
probably something a bit smarter than everything goes to traffic class
0.

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ