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]
Date:   Tue, 21 Apr 2020 16:42:41 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Oleksij Rempel <o.rempel@...gutronix.de>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net 1/2] net: dsa: be compatible with DSA masters with
 max_mtu of 1500 or less

Hi Andrew,

On Tue, 21 Apr 2020 at 16:33, Andrew Lunn <andrew@...n.ch> wrote:
>
> On Tue, Apr 21, 2020 at 03:31:09PM +0300, Vladimir Oltean wrote:
> > From: Vladimir Oltean <vladimir.oltean@....com>
> >
> > It would be ideal if the DSA switch ports would support an MTU of 1500
> > bytes by default, same as any other net device. But there are 2 cases of
> > issues with trying to do that:
> >
> > - Drivers that are legitimately MTU-challenged and don't support
> >   anything larger than ETH_DATA_LEN. A very quick search shows that
> >   sungem.c is one such example - there may be many others.
> >
> > - Drivers that simply don't populate netdev->max_mtu. In that case, it
> >   seems that the ether_setup function sets dev->max_mtu to a default
> >   value of ETH_DATA_LEN. And due to the above cases which really are
> >   MTU-challenged, we can't really make any guesses.
> >
> > So for these cases, if the max_mtu of the master net_device is lower
> > than 1500, use that (minus the tagger overhead) as the max MTU of the
> > switch ports.
>
> I don't like this. I suspect this will also break in subtle ways.
>
> Please go back to the original behaviour. Make the call to request the
> minimum needed for DSA.

In what sense "minimum needed"? It is minimum needed. If
master->max_mtu is 1500, the MTU will be set to 1496.

> And don't care at all if it fails. For jumbo
> frames then you can error out.

Yes, that is patch 2/2.

>
>        Andrew

Thanks,
-Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ