[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21hq4ck2AhKfJtJvEHkpeYRsTWtXBBPxczo+oaN7X5QZvKw@mail.gmail.com>
Date: Fri, 27 Mar 2020 15:01:09 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
murali.policharla@...adcom.com,
Stephen Hemminger <stephen@...workplumber.org>,
Jiri Pirko <jiri@...nulli.us>,
Ido Schimmel <idosch@...sch.org>,
Jakub Kicinski <kuba@...nel.org>,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net-next 5/8] net: dsa: b53: add MTU configuration support
On Fri, 27 Mar 2020 at 01:16, Florian Fainelli <f.fainelli@...il.com> wrote:
>
> On 3/26/2020 3:40 PM, Vladimir Oltean wrote:
> > From: Murali Krishna Policharla <murali.policharla@...adcom.com>
> >
> > It looks like the Broadcomm switches supported by the b53 driver don't
> ^= one too many m's, the attempt to acquire
> Qualcomm failed a few years ago :)
>
I knew you guys were jealous of their extra m!
> > support precise configuration of the MTU, but just a mumbo-jumbo boolean
> > flag. Set that.
I'm more concerned of the mumbo-jumbo, in fact. Right now, DSA sets
dev->mtu = mtu in slave.c. But for hardware like this, it would be
confusing to do that. I would do dev->mtu = JMS_MIN_SIZE or dev->mtu =
JMS_MAX_SIZE depending on configuration, so that the user isn't led
into thinking that their exact requested value went into the hardware.
Any ideas on how I could structure things differently for that?
> >
> > Also configure BCM583XX devices to send and receive jumbo frames when
> > ports are configured with 10/100 Mbps speed.
> >
> > Signed-off-by: Murali Krishna Policharla <murali.policharla@...adcom.com>
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> > ---
>
> [snip]
>
> > +static int b53_change_mtu(struct dsa_switch *ds, int port, int mtu)
> > +{
> > + struct b53_device *dev = ds->priv;
> > + bool enable_jumbo;
> > + bool allow_10_100;
> > +
> > + if (is5325(dev) || is5365(dev))
> > + return -EOPNOTSUPP;
> > +
> > + enable_jumbo = (mtu >= JMS_MIN_SIZE);
> > + allow_10_100 = (dev->chip_id == BCM58XX_DEVICE_ID);
>
> I believe this was meant to be BCM583XX_DEVICE_ID to be consistent with
> the previous patch version. With that:
>
Ok.
> Acked-by: Florian Fainelli <f.fainelli@...il.com>
> --
> Florian
Powered by blists - more mailing lists