* [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU
@ 2023-09-23 18:38 Linus Walleij
2023-10-03 9:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2023-09-23 18:38 UTC (permalink / raw)
To: Krzysztof Halasa, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: netdev, linux-kernel, Linus Walleij
As we don't specify the MTU in the driver, the framework
will fall back to 1500 bytes and this doesn't work very
well when we try to attach a DSA switch:
eth1: mtu greater than device maximum
ixp4xx_eth c800a000.ethernet eth1: error -22 setting
MTU to 1504 to include DSA overhead
I checked the developer docs and the hardware can actually
do really big frames, so update the driver accordingly.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/net/ethernet/xscale/ixp4xx_eth.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 3b0c5f177447..8f40287c8d58 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -24,6 +24,7 @@
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/etherdevice.h>
+#include <linux/if_vlan.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/net_tstamp.h>
@@ -1488,6 +1489,13 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
ndev->dev.dma_mask = dev->dma_mask;
ndev->dev.coherent_dma_mask = dev->coherent_dma_mask;
+ /* Maximum frame size is 16320 bytes and includes VLAN and
+ * ethernet headers. See "IXP400 Software Programmer's Guide"
+ * section 10.3.2, page 161.
+ */
+ ndev->min_mtu = ETH_MIN_MTU;
+ ndev->max_mtu = 16320 - VLAN_ETH_HLEN;
+
netif_napi_add_weight(ndev, &port->napi, eth_poll, NAPI_WEIGHT);
if (!(port->npe = npe_request(NPE_ID(port->id))))
---
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
change-id: 20230923-ixp4xx-eth-mtu-c041d7efe932
Best regards,
--
Linus Walleij <linus.walleij@linaro.org>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU
2023-09-23 18:38 [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU Linus Walleij
@ 2023-10-03 9:40 ` patchwork-bot+netdevbpf
2023-10-03 21:54 ` Linus Walleij
0 siblings, 1 reply; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-03 9:40 UTC (permalink / raw)
To: Linus Walleij
Cc: khalasa, davem, edumazet, kuba, pabeni, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Sat, 23 Sep 2023 20:38:22 +0200 you wrote:
> As we don't specify the MTU in the driver, the framework
> will fall back to 1500 bytes and this doesn't work very
> well when we try to attach a DSA switch:
>
> eth1: mtu greater than device maximum
> ixp4xx_eth c800a000.ethernet eth1: error -22 setting
> MTU to 1504 to include DSA overhead
>
> [...]
Here is the summary with links:
- [net-next] net: ixp4xx_eth: Specify min/max MTU
https://git.kernel.org/netdev/net-next/c/13efc44ca644
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] 6+ messages in thread* Re: [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU
2023-10-03 9:40 ` patchwork-bot+netdevbpf
@ 2023-10-03 21:54 ` Linus Walleij
2023-10-04 17:25 ` Jakub Kicinski
2023-10-05 7:37 ` Paolo Abeni
0 siblings, 2 replies; 6+ messages in thread
From: Linus Walleij @ 2023-10-03 21:54 UTC (permalink / raw)
To: patchwork-bot+netdevbpf
Cc: khalasa, davem, edumazet, kuba, pabeni, netdev, linux-kernel
On Tue, Oct 3, 2023 at 11:40 AM <patchwork-bot+netdevbpf@kernel.org> wrote:
> This patch was applied to netdev/net-next.git (main)
> by Paolo Abeni <pabeni@redhat.com>:
Sorry Paolo, this is the latest version of this patch, which sadly changed
Subject in the process:
https://lore.kernel.org/netdev/20230928-ixp4xx-eth-mtu-v3-1-cb18eaa0edb9@linaro.org/
If it causes trouble for you to replace the patch I can rebase
this work on top of your branch, just tell me.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU
2023-10-03 21:54 ` Linus Walleij
@ 2023-10-04 17:25 ` Jakub Kicinski
2023-10-05 7:37 ` Paolo Abeni
1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2023-10-04 17:25 UTC (permalink / raw)
To: Linus Walleij
Cc: patchwork-bot+netdevbpf, khalasa, davem, edumazet, pabeni, netdev,
linux-kernel
On Tue, 3 Oct 2023 23:54:49 +0200 Linus Walleij wrote:
> Sorry Paolo, this is the latest version of this patch, which sadly changed
> Subject in the process:
> https://lore.kernel.org/netdev/20230928-ixp4xx-eth-mtu-v3-1-cb18eaa0edb9@linaro.org/
>
> If it causes trouble for you to replace the patch I can rebase
> this work on top of your branch, just tell me.
Yes, please! Sorry about the mess, we're a bit backlogged after we
all went to Kernel Recipes :(
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU
2023-10-03 21:54 ` Linus Walleij
2023-10-04 17:25 ` Jakub Kicinski
@ 2023-10-05 7:37 ` Paolo Abeni
2023-10-05 20:26 ` Linus Walleij
1 sibling, 1 reply; 6+ messages in thread
From: Paolo Abeni @ 2023-10-05 7:37 UTC (permalink / raw)
To: Linus Walleij, patchwork-bot+netdevbpf
Cc: khalasa, davem, edumazet, kuba, netdev, linux-kernel
On Tue, 2023-10-03 at 23:54 +0200, Linus Walleij wrote:
> On Tue, Oct 3, 2023 at 11:40 AM <patchwork-bot+netdevbpf@kernel.org> wrote:
>
> > This patch was applied to netdev/net-next.git (main)
> > by Paolo Abeni <pabeni@redhat.com>:
>
> Sorry Paolo, this is the latest version of this patch, which sadly changed
> Subject in the process:
> https://lore.kernel.org/netdev/20230928-ixp4xx-eth-mtu-v3-1-cb18eaa0edb9@linaro.org/
Ouch, my bad :(
The change of subject baffled both me and patchwork. As I process the
backlog fifo, and was unable to reach the most recent versions due to
the backlog size, I missed the newer revisions.
In the future, please try to avoid subject change. If the subject chane
is needed, please explicitly mark the old version as superseded, it
will help us a lot, thanks!
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU
2023-10-05 7:37 ` Paolo Abeni
@ 2023-10-05 20:26 ` Linus Walleij
0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2023-10-05 20:26 UTC (permalink / raw)
To: Paolo Abeni
Cc: patchwork-bot+netdevbpf, khalasa, davem, edumazet, kuba, netdev,
linux-kernel
On Thu, Oct 5, 2023 at 9:37 AM Paolo Abeni <pabeni@redhat.com> wrote:
> > Sorry Paolo, this is the latest version of this patch, which sadly changed
> > Subject in the process:
> > https://lore.kernel.org/netdev/20230928-ixp4xx-eth-mtu-v3-1-cb18eaa0edb9@linaro.org/
>
> Ouch, my bad :(
It's chill, I already rebased and resent the patch, it's life.
> The change of subject baffled both me and patchwork. As I process the
> backlog fifo, and was unable to reach the most recent versions due to
> the backlog size, I missed the newer revisions.
>
> In the future, please try to avoid subject change. If the subject chane
> is needed, please explicitly mark the old version as superseded, it
> will help us a lot, thanks!
OK in patchwork I guess, I don't understand that tool very well otherwise
I would have done it right, I'll try not to confuse it more.
BR
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-05 20:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-23 18:38 [PATCH net-next] net: ixp4xx_eth: Specify min/max MTU Linus Walleij
2023-10-03 9:40 ` patchwork-bot+netdevbpf
2023-10-03 21:54 ` Linus Walleij
2023-10-04 17:25 ` Jakub Kicinski
2023-10-05 7:37 ` Paolo Abeni
2023-10-05 20:26 ` Linus Walleij
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).