net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
Subsystems (4)
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
@@ -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
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_MTUto 9220 bytes (9216+4).Signed-off-by Sayantan Nandy <[email protected]>--- drivers/net/ethernet/airoha/airoha_eth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/airoha/airoha_eth.h +1
-2@@ -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
Lorenzo Bianconi
maintainerQuoted 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_MTUto 9220 bytes (9216+4).Signed-off-by Sayantan Nandy <[email protected]>
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@@ -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 8Signature · 1 line
2.43.0
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_MTUto 9220 bytes (9216+4).
What does the hardware actually support? Is 9220 the real limit? 10K? 16K?
Andrew
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_MTUto 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
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_MTUto 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
Jakub Kicinski
maintainerQuoted 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_MTUto 9220 bytes (9216+4).Signed-off-by Sayantan Nandy <[email protected]>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
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_MTUto 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
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_MTUto 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
AndrewLarger 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
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
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