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: <ZBGV1e00JTncoW3k@corigine.com>
Date:   Wed, 15 Mar 2023 10:54:29 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Murali Krishna Policharla <murali.policharla@...adcom.com>,
        Lukasz Majewski <lukma@...x.de>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 2/2] net: dsa: mv88e6xxx: fix max_mtu of 1492 on
 6165, 6191, 6220, 6250, 6290

On Tue, Mar 14, 2023 at 08:24:05PM +0200, Vladimir Oltean wrote:
> There are 3 classes of switch families that the driver is aware of, as
> far as mv88e6xxx_change_mtu() is concerned:
> 
> - MTU configuration is available per port. Here, the
>   chip->info->ops->port_set_jumbo_size() method will be present.
> 
> - MTU configuration is global to the switch. Here, the
>   chip->info->ops->set_max_frame_size() method will be present.
> 
> - We don't know how to change the MTU. Here, none of the above methods
>   will be present.
> 
> Switch families MV88E6165, MV88E6191, MV88E6220, MV88E6250 and MV88E6290
> fall in category 3.
> 
> The blamed commit has adjusted the MTU for all 3 categories by EDSA_HLEN
> (8 bytes), resulting in a new maximum MTU of 1492 being reported by the
> driver for these switches.
> 
> I don't have the hardware to test, but I do have a MV88E6390 switch on
> which I can simulate this by commenting out its .port_set_jumbo_size
> definition from mv88e6390_ops. The result is this set of messages at
> probe time:
> 
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 1
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 2
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 3
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 4
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 5
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 6
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 7
> mv88e6085 d0032004.mdio-mii:10: nonfatal error -34 setting MTU to 1500 on port 8
> 
> It is highly implausible that there exist Ethernet switches which don't
> support the standard MTU of 1500 octets, and this is what the DSA
> framework says as well - the error comes from dsa_slave_create() ->
> dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN).
> 
> But the error messages are alarming, and it would be good to suppress
> them.
> 
> As a consequence of this unlikeliness, we reimplement mv88e6xxx_get_max_mtu()
> and mv88e6xxx_change_mtu() on switches from the 3rd category as follows:
> the maximum supported MTU is 1500, and any request to set the MTU to a
> value larger than that fails in dev_validate_mtu().
> 
> Fixes: b9c587fed61c ("dsa: mv88e6xxx: Include tagger overhead when setting MTU for DSA and CPU ports")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Simon Horman <simon.horman@...igine.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ