netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net 1/2] net: dsa: be compatible with DSA masters with max_mtu of 1500 or less
Date: Tue, 21 Apr 2020 16:42:41 +0300	[thread overview]
Message-ID: <CA+h21hrXJf1vm-5b3O7zQciznKF-jGSTpe_v6Mgtv8dXNOCt7g@mail.gmail.com> (raw)
In-Reply-To: <20200421133321.GD937199@lunn.ch>

Hi Andrew,

On Tue, 21 Apr 2020 at 16:33, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Tue, Apr 21, 2020 at 03:31:09PM +0300, Vladimir Oltean wrote:
> > From: Vladimir Oltean <vladimir.oltean@nxp.com>
> >
> > It would be ideal if the DSA switch ports would support an MTU of 1500
> > bytes by default, same as any other net device. But there are 2 cases of
> > issues with trying to do that:
> >
> > - Drivers that are legitimately MTU-challenged and don't support
> >   anything larger than ETH_DATA_LEN. A very quick search shows that
> >   sungem.c is one such example - there may be many others.
> >
> > - Drivers that simply don't populate netdev->max_mtu. In that case, it
> >   seems that the ether_setup function sets dev->max_mtu to a default
> >   value of ETH_DATA_LEN. And due to the above cases which really are
> >   MTU-challenged, we can't really make any guesses.
> >
> > So for these cases, if the max_mtu of the master net_device is lower
> > than 1500, use that (minus the tagger overhead) as the max MTU of the
> > switch ports.
>
> I don't like this. I suspect this will also break in subtle ways.
>
> Please go back to the original behaviour. Make the call to request the
> minimum needed for DSA.

In what sense "minimum needed"? It is minimum needed. If
master->max_mtu is 1500, the MTU will be set to 1496.

> And don't care at all if it fails. For jumbo
> frames then you can error out.

Yes, that is patch 2/2.

>
>        Andrew

Thanks,
-Vladimir

  reply	other threads:[~2020-04-21 13:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 12:31 [PATCH net 0/2] MTU fixes for DSA Vladimir Oltean
2020-04-21 12:31 ` [PATCH net 1/2] net: dsa: be compatible with DSA masters with max_mtu of 1500 or less Vladimir Oltean
2020-04-21 13:33   ` Andrew Lunn
2020-04-21 13:42     ` Vladimir Oltean [this message]
2020-04-21 14:06       ` Andrew Lunn
2020-04-21 14:24         ` Vladimir Oltean
2020-04-21 14:50           ` Andrew Lunn
2020-04-21 12:31 ` [PATCH net 2/2] net: dsa: don't fail to probe if we couldn't set the MTU Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+h21hrXJf1vm-5b3O7zQciznKF-jGSTpe_v6Mgtv8dXNOCt7g@mail.gmail.com \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).