From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Frank Wunderlich" <frank-w@public-files.de>,
netdev@vger.kernel.org, "Sean Wang" <sean.wang@mediatek.com>,
linux-kernel@vger.kernel.org,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
"René van Dorst" <opensource@vdorst.com>,
linux-mediatek@lists.infradead.org,
"John Crispin" <john@phrozen.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org,
"Felix Fietkau" <nbd@nbd.name>
Subject: Re: [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning
Date: Thu, 9 Jul 2020 21:31:34 +0100 [thread overview]
Message-ID: <20200709203134.GI1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200709134115.GK928075@lunn.ch>
On Thu, Jul 09, 2020 at 03:41:15PM +0200, Andrew Lunn wrote:
> On Thu, Jul 09, 2020 at 07:57:42AM +0200, Frank Wunderlich wrote:
> > From: René van Dorst <opensource@vdorst.com>
> >
> > in recent Kernel-Versions there are warnings about incorrect MTU-Size
> > like these:
> >
> > mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port x
> > eth0: mtu greater than device maximum
> > mtk_soc_eth 1b100000.ethernet eth0: error -22 setting MTU to include DSA overhead
> >
> > Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports")
> > Fixes: 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU")
> > Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
> > Signed-off-by: René van Dorst <opensource@vdorst.com>
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> > ---
> > changes in v2:
> > Fixes: tag show 12-chars of sha1 and moved above other tags
> > ---
> > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > index 85735d32ecb0..00e3d70f7d07 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > @@ -2891,6 +2891,10 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
> > eth->netdev[id]->irq = eth->irq[0];
> > eth->netdev[id]->dev.of_node = np;
> >
> > + eth->netdev[id]->mtu = 1536;
>
> Hi Frank
>
> Don't change to MTU from the default. Anybody using this interface for
> non-DSA traffic expects the default MTU. DSA will change it as needed.
>
> > + eth->netdev[id]->min_mtu = ETH_MIN_MTU;
>
> No need to set the minimum. ether_setup() will initialize it.
>
> > + eth->netdev[id]->max_mtu = 1536;
>
> I assume this is enough to make the DSA warning go away, but it is the
> true max? I have a similar patch for the FEC driver which i should
> post sometime. Reviewing the FEC code and after some testing, i found
> the real max was 2K - 64.
Are there any plans to solve these warnings for Marvell 88e6xxx DSA ports?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-07-09 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 5:57 [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning Frank Wunderlich
2020-07-09 13:41 ` Andrew Lunn
2020-07-09 19:48 ` Aw: " Frank Wunderlich
2020-07-09 20:22 ` Andrew Lunn
2020-07-09 20:31 ` Russell King - ARM Linux admin [this message]
2020-07-09 20:38 ` Frank Wunderlich
2020-07-09 20:46 ` Andrew Lunn
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=20200709203134.GI1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Mark-MC.Lee@mediatek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=frank-w@public-files.de \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=opensource@vdorst.com \
--cc=sean.wang@mediatek.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).