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: <20221111052656.GC27099@pengutronix.de>
Date:   Fri, 11 Nov 2022 06:26:56 +0100
From:   Oleksij Rempel <o.rempel@...gutronix.de>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Woojung Huh <woojung.huh@...rochip.com>,
        UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Arun Ramadoss <arun.ramadoss@...rochip.com>,
        kernel@...gutronix.de, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next v4 1/4] net: dsa: microchip: move max mtu to one
 location

Hi Florian,

On Thu, Nov 10, 2022 at 06:42:03AM -0800, Florian Fainelli wrote:
> 
> 
> On 11/10/2022 4:22 AM, Oleksij Rempel wrote:
> > There are no HW specific registers, so we can process all of them
> > in one location.
> > 
> > Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> > Tested-by: Arun Ramadoss <arun.ramadoss@...rochip.com> (KSZ9893 and LAN937x)
> 
> This looks good to me, just one nit see below
> 
> [snip]
> 
> > @@ -2500,10 +2499,23 @@ static int ksz_max_mtu(struct dsa_switch *ds, int port)
> >   {
> >   	struct ksz_device *dev = ds->priv;
> > -	if (!dev->dev_ops->max_mtu)
> > -		return -EOPNOTSUPP;
> > +	switch (dev->chip_id) {
> > +	case KSZ8563_CHIP_ID:
> > +	case KSZ9477_CHIP_ID:
> > +	case KSZ9563_CHIP_ID:
> > +	case KSZ9567_CHIP_ID:
> > +	case KSZ9893_CHIP_ID:
> > +	case KSZ9896_CHIP_ID:
> > +	case KSZ9897_CHIP_ID:
> > +	case LAN9370_CHIP_ID:
> > +	case LAN9371_CHIP_ID:
> > +	case LAN9372_CHIP_ID:
> > +	case LAN9373_CHIP_ID:
> > +	case LAN9374_CHIP_ID:
> > +		return KSZ9477_MAX_FRAME_SIZE - VLAN_ETH_HLEN - ETH_FCS_LEN;
> 
> Rename to KSZ_MAX_FRAME_SIZE to denote this is a common constant?

This is not so common. This list is extended by the patch 4, with two
more types of switches with different max frame size.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ