Skip to contentSkip to conversation

net: macb: Adding support for Jumbo Frames up to 10240 Bytes in SAMA5D2

PATCH Applied Aleksander Jan Bajkowski 4 participants 4 messages Oct 3, 2024 – Oct 4, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: macb: Adding support for Jumbo Frames up to 10240 Bytes in SAMA5D2

As per the SAMA5D2 device specification it supports Jumbo frames. But the suggested flag and length of bytes it supports was not updated in this driver config_structure.
The maximum jumbo frames the device supports:
10240 bytes as per the device spec.

While changing the MTU value greater than 1500, it threw error:
sudo ifconfig eth1 mtu 9000
SIOCSIFMTU: Invalid argument

Add this support to driver so that it works as expected and designed.

---
 drivers/net/ethernet/cadence/macb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb_main.c +2 -1
index f06babec04a0..9fda16557509 100644
@@ -4841,10 +4841,11 @@ static const struct macb_config pc302gem_config = {
 };
 
 static const struct macb_config sama5d2_config = {
-	.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
+	.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_JUMBO,
 	.dma_burst_length = 16,
 	.clk_init = macb_clk_init,
 	.init = macb_init,
+	.jumbo_max_len = 10240,
 	.usrio = &macb_default_usrio,
 };
 
Signature · 1 line
2.39.5
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Aleksander Jan Bajkowski

As per the SAMA5D2 device specification it supports Jumbo frames. But the suggested flag and length of bytes it supports was not updated in this driver config_structure.
The maximum jumbo frames the device supports:
10240 bytes as per the device spec.

Quoted 7 lines

While changing the MTU value greater than 1500, it threw error:
sudo ifconfig eth1 mtu 9000
SIOCSIFMTU: Invalid argument

Add this support to driver so that it works as expected and designed.

Thanks Aleksander,

This appears to be consistent with:

233a15875396 ("net: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3")

Acked-by on v1 1/1
#2 lore raw
In reply to Aleksander Jan Bajkowski
Quoted 6 lines · Aleksander Jan Bajkowski

As per the SAMA5D2 device specification it supports Jumbo frames. But the suggested flag and length of bytes it supports was not updated in this driver config_structure.
The maximum jumbo frames the device supports:
10240 bytes as per the device spec.

Quoted 7 lines

While changing the MTU value greater than 1500, it threw error:
sudo ifconfig eth1 mtu 9000
SIOCSIFMTU: Invalid argument

Add this support to driver so that it works as expected and designed.

Looks good indeed:

Thanks, best regards,
Nicolas

Quoted 24 lines
---
  drivers/net/ethernet/cadence/macb_main.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb_main.c +2 -2
index f06babec04a0..9fda16557509 100644
@@ -4841,10 +4841,11 @@ static const struct macb_config pc302gem_config = {
  };
 
  static const struct macb_config sama5d2_config = {
-       .caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII,
+       .caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_JUMBO,
         .dma_burst_length = 16,
         .clk_init = macb_clk_init,
         .init = macb_init,
+       .jumbo_max_len = 10240,
         .usrio = &macb_default_usrio,
  };
 
--

2.39.5

#3 lore raw
In reply to Aleksander Jan Bajkowski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Thu, 3 Oct 2024 19:19:41 +0200 you wrote:

As per the SAMA5D2 device specification it supports Jumbo frames. But the suggested flag and length of bytes it supports was not updated in this driver config_structure.
The maximum jumbo frames the device supports:
10240 bytes as per the device spec.

While changing the MTU value greater than 1500, it threw error:
sudo ifconfig eth1 mtu 9000
SIOCSIFMTU: Invalid argument

[...]

Here is the summary with links:
- [net-next] net: macb: Adding support for Jumbo Frames up to 10240 Bytes in SAMA5D2

    https://git.kernel.org/netdev/net-next/c/8389cdb5c192

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html