Skip to contentSkip to conversation

net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames

PATCH Superseded Sayantan Nandy 5 participants 11 messages Jan 15 – Jan 16 1 message not in the archive

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

---
 drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_eth.h +1 -1
index fbbc58133364..20e602d61e61 100644
@@ -21,7 +21,7 @@
 #define AIROHA_MAX_NUM_IRQ_BANKS	4
 #define AIROHA_MAX_DSA_PORTS		7
 #define AIROHA_MAX_NUM_RSTS		3
-#define AIROHA_MAX_MTU			9216
+#define AIROHA_MAX_MTU			9220
 #define AIROHA_MAX_PACKET_SIZE		2048
 #define AIROHA_NUM_QOS_CHANNELS		4
 #define AIROHA_NUM_QOS_QUEUES		8
Signature · 1 line
2.43.0
#1 lore raw
Quoted 26 lines · Sayantan Nandy

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

---
  drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_eth.h +1 -2
index fbbc58133364..20e602d61e61 100644
@@ -21,7 +21,7 @@
  #define AIROHA_MAX_NUM_IRQ_BANKS       4
  #define AIROHA_MAX_DSA_PORTS           7
  #define AIROHA_MAX_NUM_RSTS            3
-#define AIROHA_MAX_MTU                 9216
+#define AIROHA_MAX_MTU                 9220
  #define AIROHA_MAX_PACKET_SIZE         2048
  #define AIROHA_NUM_QOS_CHANNELS                4
  #define AIROHA_NUM_QOS_QUEUES          8
--
Quoted 1 line

2.43.0

Hi, for reference the hardware datasheets lists support for jumbo frame sizes up to 16k.

In the Airoha case the MTK-DSA tag is transmitted out of band via the dma descriptor. I am not sure how this affects the frame size, it might be opaque in the actual hardware.

MvH
Benjamin Larsson

maintainer
#2 lore raw
In reply to Sayantan Nandy
Quoted 6 lines

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

I think the patch is fine, but here you are missing to specify this is v2 and this patch targets net-next. Moreover, please wait 24h before reposting a new version of the same patch.

Regards,
Lorenzo

Quoted 20 lines
---
 drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/airoha/airoha_eth.h +1 -1
index fbbc58133364..20e602d61e61 100644
@@ -21,7 +21,7 @@
 #define AIROHA_MAX_NUM_IRQ_BANKS	4
 #define AIROHA_MAX_DSA_PORTS		7
 #define AIROHA_MAX_NUM_RSTS		3
-#define AIROHA_MAX_MTU			9216
+#define AIROHA_MAX_MTU			9220
 #define AIROHA_MAX_PACKET_SIZE		2048
 #define AIROHA_NUM_QOS_CHANNELS		4
 #define AIROHA_NUM_QOS_QUEUES		8
Signature · 1 line
2.43.0
#4 lore raw
In reply to Sayantan Nandy
Quoted 4 lines · Sayantan Nandy

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

What does the hardware actually support? Is 9220 the real limit? 10K? 16K?

Andrew

#5 lore raw
Quoted 10 lines · Andrew Lunn
Quoted 4 lines · Sayantan Nandy

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

What does the hardware actually support? Is 9220 the real limit? 10K? 16K?

Andrew

Hi, datasheets say 16k and I have observed packet sizes close to that on the previous SoC generation EN7523 on the tx path.

MvH

Benjamin Larsson

#6 lore raw
Quoted 6 lines · Benjamin Larsson
Quoted 5 lines · Andrew Lunn
Quoted 4 lines · Sayantan Nandy

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

Quoted 7 lines
Quoted 5 lines

What does the hardware actually support? Is 9220 the real limit? 10K? 16K?

Andrew

Hi, datasheets say 16k and I have observed packet sizes close to that on the previous SoC generation EN7523 on the tx path.

Can you test 16K?

Does it make any difference to the memory allocation? Some drivers allocate receive buffers based on the MAX MTU, not the current MTU, so can eat up a lot of memory which is unlikely to be used. We should try to avoid that.

Thanks
Andrew

maintainer
#3 lore raw
In reply to Lorenzo Bianconi
Quoted 10 lines · On Thu, 15 Jan 2026 14:40:03 +0100 Lorenzo Bianconi wrote:
Quoted 6 lines

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

I think the patch is fine, but here you are missing to specify this is v2 and this patch targets net-next. Moreover, please wait 24h before reposting a new version of the same patch.

FWIW this is a good reminder for Sayantan for the future but it doesn't merit a repost in itself. net-next is our default tree, and pw bot guessed correctly.

That said I think Andrews request warrants some extra testing here so:

Signature · 1 line
pw-bot: cr
#7 lore raw
In reply to Andrew Lunn

Hi.

Quoted 7 lines · Andrew Lunn
Quoted 6 lines · Benjamin Larsson
Quoted 5 lines · Andrew Lunn
Quoted 4 lines · Sayantan Nandy

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

What does the hardware actually support? Is 9220 the real limit? 10K? 16K?

Andrew

Hi, datasheets say 16k and I have observed packet sizes close to that on the previous SoC generation EN7523 on the tx path.

Can you test 16K?

I probably can but it would take some time (weeks) as I dont have any current setup with AN7581.

Quoted 8 lines

Does it make any difference to the memory allocation? Some drivers allocate receive buffers based on the MAX MTU, not the current MTU, so can eat up a lot of memory which is unlikely to be used. We should try to avoid that.

Thanks
Andrew

Larger packets will consume more dma descriptors (a larger packet will be split into several dma descriptors). So you dont allocate more memory to be able to send jumbo frames.

MvH

Benjamin Larsson

#8 lore raw
Quoted 28 lines · Benjamin Larsson

Hi.

Quoted 7 lines · Andrew Lunn
Quoted 6 lines · Benjamin Larsson
Quoted 5 lines · Andrew Lunn
Quoted 4 lines · Sayantan Nandy

The Industry standard for jumbo frame MTU is 9216 bytes. When using DSA sub-system, an extra 4 byte tag is added to each frame. To allow users to set the standard 9216-byte MTU via ifconfig,increase AIROHA_MAX_MTU to 9220 bytes (9216+4).

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

What does the hardware actually support? Is 9220 the real limit? 10K? 16K?

Andrew

Hi, datasheets say 16k and I have observed packet sizes close to that on the previous SoC generation EN7523 on the tx path.

Can you test 16K?

I probably can but it would take some time (weeks) as I dont have any current setup with AN7581.

Quoted 6 lines

Does it make any difference to the memory allocation? Some drivers allocate receive buffers based on the MAX MTU, not the current MTU, so can eat up a lot of memory which is unlikely to be used. We should try to avoid that.

Quoted 6 lines
Quoted 2 lines

Thanks
Andrew

Larger packets will consume more dma descriptors (a larger packet will be split into several dma descriptors). So you dont allocate more memory to be able to send jumbo frames.

So it 'costs' nothing to declare the actual maximum.

For the moment, 9220 seems acceptable, but please include in the commit message that the real maximum is higher, probably somewhere around 16K.

Andrew

#10 lore raw
In reply to a message not in the archive
Quoted 7 lines · sayantan nandy

Hi all,

Thanks for the review and comments.

I checked the AN7581 HW and it does support MTU sizes up to 16K. However, as mentioned by Benjamin, larger packets consume more DMA descriptors, and while no extra buffers are allocated, this can put pressure on the descriptor rings.

Does the hardware consume DMA descriptors for the full 16K, not just the number of descriptors needed for the actual received packet size? That seems like a bad design.

Andrew

#11 lore raw
Quoted 5 lines · Andrew Lunn
Quoted 4 lines · sayantan nandy

Hi all,

Thanks for the review and comments.

Quoted 8 lines
Quoted 3 lines

I checked the AN7581 HW and it does support MTU sizes up to 16K. However, as mentioned by Benjamin, larger packets consume more DMA descriptors, and while no extra buffers are allocated, this can put pressure on the descriptor rings.

Does the hardware consume DMA descriptors for the full 16K, not just the number of descriptors needed for the actual received packet size? That seems like a bad design.

Andrew

The descriptor buffer size is configurable. The amount of used descriptors will be the received packet size % descriptor buffer size + 1.

MvH

Benjamin Larsson