netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ftmac100: set max_mtu to allow DSA overhead setting
@ 2022-08-21 16:08 Sergei Antonov
  2022-08-21 16:45 ` Andrew Lunn
  2022-08-23 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Sergei Antonov @ 2022-08-21 16:08 UTC (permalink / raw)
  To: netdev; +Cc: andrew, olteanv, davem, edumazet, kuba, Sergei Antonov

In case ftmac100 is used with a DSA switch, Linux wants to set MTU
to 1504 to accommodate for DSA overhead. With the default max_mtu
it leads to the error message:
 ftmac100 92000000.mac eth0: error -22 setting MTU to 1504 to include DSA overhead

ftmac100 supports packet length 1518 (MAX_PKT_SIZE constant), so it is
safe to report it in max_mtu.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
---
 drivers/net/ethernet/faraday/ftmac100.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 8a341e2d5833..2e6524009b19 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -1075,6 +1075,7 @@ static int ftmac100_probe(struct platform_device *pdev)
 	SET_NETDEV_DEV(netdev, &pdev->dev);
 	netdev->ethtool_ops = &ftmac100_ethtool_ops;
 	netdev->netdev_ops = &ftmac100_netdev_ops;
+	netdev->max_mtu = MAX_PKT_SIZE;
 
 	platform_set_drvdata(pdev, netdev);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ftmac100: set max_mtu to allow DSA overhead setting
  2022-08-21 16:08 [PATCH] net: ftmac100: set max_mtu to allow DSA overhead setting Sergei Antonov
@ 2022-08-21 16:45 ` Andrew Lunn
  2022-08-23 22:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2022-08-21 16:45 UTC (permalink / raw)
  To: Sergei Antonov; +Cc: netdev, olteanv, davem, edumazet, kuba

On Sun, Aug 21, 2022 at 07:08:44PM +0300, Sergei Antonov wrote:
> In case ftmac100 is used with a DSA switch, Linux wants to set MTU
> to 1504 to accommodate for DSA overhead. With the default max_mtu
> it leads to the error message:
>  ftmac100 92000000.mac eth0: error -22 setting MTU to 1504 to include DSA overhead
> 
> ftmac100 supports packet length 1518 (MAX_PKT_SIZE constant), so it is
> safe to report it in max_mtu.
> 
> Signed-off-by: Sergei Antonov <saproj@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ftmac100: set max_mtu to allow DSA overhead setting
  2022-08-21 16:08 [PATCH] net: ftmac100: set max_mtu to allow DSA overhead setting Sergei Antonov
  2022-08-21 16:45 ` Andrew Lunn
@ 2022-08-23 22:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-23 22:40 UTC (permalink / raw)
  To: Sergei Antonov; +Cc: netdev, andrew, olteanv, davem, edumazet, kuba

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 21 Aug 2022 19:08:44 +0300 you wrote:
> In case ftmac100 is used with a DSA switch, Linux wants to set MTU
> to 1504 to accommodate for DSA overhead. With the default max_mtu
> it leads to the error message:
>  ftmac100 92000000.mac eth0: error -22 setting MTU to 1504 to include DSA overhead
> 
> ftmac100 supports packet length 1518 (MAX_PKT_SIZE constant), so it is
> safe to report it in max_mtu.
> 
> [...]

Here is the summary with links:
  - net: ftmac100: set max_mtu to allow DSA overhead setting
    https://git.kernel.org/netdev/net-next/c/6c2c782fa013

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-23 22:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-21 16:08 [PATCH] net: ftmac100: set max_mtu to allow DSA overhead setting Sergei Antonov
2022-08-21 16:45 ` Andrew Lunn
2022-08-23 22:40 ` patchwork-bot+netdevbpf

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).