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: <20220324210508.doj7fsjn3ihronnx@skbuf>
Date:   Thu, 24 Mar 2022 23:05:08 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Ansuel Smith <ansuelsmth@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH 1/4] drivers: net: dsa: qca8k: drop MTU tracking
 from qca8k_priv

On Thu, Mar 24, 2022 at 09:44:27PM +0100, Ansuel Smith wrote:
> On Thu, Mar 24, 2022 at 12:45:24PM +0200, Vladimir Oltean wrote:
> > You need the max MTU.
> > 
> > Why calculate it again? Why don't you do what mt7530 does, which has a
> > similar restriction, and just program the hardware when the CPU port MTU
> > is updated?
> >
> 
> I just checked and wow it was that easy...
> Also wonder if I should add some check for jumbo frame... (I should
> check what is the max MTU for the switch and if it can accept jumbo
> frame+fcs+l2)

I'm not following you, sorry. What is your definition of "jumbo frame",
and what check is there to add?

> Wonder if I should propose a change for stmmac and just drop the
> interface and restart it when the change is down.

In the case of stmmac, dev->mtu is considered from stmmac_fix_features()
and from init_dma_rx_desc_rings(), so yes, putting the interface down
before updating the MTU and the device features, and then putting it
back up if it was previously up, should do the trick. Other drivers like
gianfar and many others do this too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ