From: Andrew Lunn <andrew@lunn.ch>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: netdev@vger.kernel.org, "Sean Wang" <sean.wang@mediatek.com>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
"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>,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
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 15:41:15 +0200 [thread overview]
Message-ID: <20200709134115.GK928075@lunn.ch> (raw)
In-Reply-To: <20200709055742.3425-1-frank-w@public-files.de>
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.
Andrew
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: netdev@vger.kernel.org, "Sean Wang" <sean.wang@mediatek.com>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
"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>,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
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 15:41:15 +0200 [thread overview]
Message-ID: <20200709134115.GK928075@lunn.ch> (raw)
In-Reply-To: <20200709055742.3425-1-frank-w@public-files.de>
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.
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: linux-mediatek@lists.infradead.org,
"René van Dorst" <opensource@vdorst.com>,
"Felix Fietkau" <nbd@nbd.name>, "John Crispin" <john@phrozen.org>,
"Sean Wang" <sean.wang@mediatek.com>,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning
Date: Thu, 9 Jul 2020 15:41:15 +0200 [thread overview]
Message-ID: <20200709134115.GK928075@lunn.ch> (raw)
In-Reply-To: <20200709055742.3425-1-frank-w@public-files.de>
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.
Andrew
next prev parent reply other threads:[~2020-07-09 13:41 UTC|newest]
Thread overview: 21+ 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 5:57 ` Frank Wunderlich
2020-07-09 5:57 ` Frank Wunderlich
2020-07-09 13:41 ` Andrew Lunn [this message]
2020-07-09 13:41 ` Andrew Lunn
2020-07-09 13:41 ` Andrew Lunn
2020-07-09 19:48 ` Aw: " Frank Wunderlich
2020-07-09 19:48 ` Frank Wunderlich
2020-07-09 19:48 ` Frank Wunderlich
2020-07-09 20:22 ` Andrew Lunn
2020-07-09 20:22 ` Andrew Lunn
2020-07-09 20:22 ` Andrew Lunn
2020-07-09 20:31 ` Russell King - ARM Linux admin
2020-07-09 20:31 ` Russell King - ARM Linux admin
2020-07-09 20:31 ` Russell King - ARM Linux admin
2020-07-09 20:38 ` Frank Wunderlich
2020-07-09 20:38 ` Frank Wunderlich
2020-07-09 20:38 ` Frank Wunderlich
2020-07-09 20:46 ` Andrew Lunn
2020-07-09 20:46 ` Andrew Lunn
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=20200709134115.GK928075@lunn.ch \
--to=andrew@lunn.ch \
--cc=Mark-MC.Lee@mediatek.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.