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: <Yjz6WxkElADpJ5e7@Ansuel-xps.localdomain>
Date:   Fri, 25 Mar 2022 00:10:19 +0100
From:   Ansuel Smith <ansuelsmth@...il.com>
To:     Vladimir Oltean <olteanv@...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 11:05:08PM +0200, Vladimir Oltean wrote:
> 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?
>

With jumbo frame i mean frame with MTU of 9000. This is supported by
this switch. Anyway i just checked and the reg can totally accept a 9000
MTU + fcs + l2

> > 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.

Ok i'm reworking this in v2 with the stmmac change and the change to
change mtu following what is done for mt7530. Thx a lot for the
suggestion. Happy that the additional space can be dropped and still use
a more correct and simple approach.

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ