public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
@ 2026-01-15  8:48 Sayantan Nandy
  2026-01-15 13:40 ` Lorenzo Bianconi
  2026-01-15 17:41 ` Andrew Lunn
  0 siblings, 2 replies; 10+ messages in thread
From: Sayantan Nandy @ 2026-01-15  8:48 UTC (permalink / raw)
  To: lorenzo
  Cc: linux-arm-kernel, linux-mediatek, netdev, sayantan.nandy,
	bread.hsu, kuldeep.malik, aniket.negi, rajeev.kumar,
	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).

Signed-off-by: Sayantan Nandy <sayantann11@gmail.com>
---
 drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
index fbbc58133364..20e602d61e61 100644
--- a/drivers/net/ethernet/airoha/airoha_eth.h
+++ b/drivers/net/ethernet/airoha/airoha_eth.h
@@ -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
-- 
2.43.0


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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-15  8:48 [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames Sayantan Nandy
@ 2026-01-15 13:40 ` Lorenzo Bianconi
  2026-01-16  3:05   ` Jakub Kicinski
  2026-01-15 17:41 ` Andrew Lunn
  1 sibling, 1 reply; 10+ messages in thread
From: Lorenzo Bianconi @ 2026-01-15 13:40 UTC (permalink / raw)
  To: Sayantan Nandy
  Cc: linux-arm-kernel, linux-mediatek, netdev, sayantan.nandy,
	bread.hsu, kuldeep.malik, aniket.negi, rajeev.kumar

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

> 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).
> 
> Signed-off-by: Sayantan Nandy <sayantann11@gmail.com>

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

> ---
>  drivers/net/ethernet/airoha/airoha_eth.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/airoha/airoha_eth.h b/drivers/net/ethernet/airoha/airoha_eth.h
> index fbbc58133364..20e602d61e61 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.h
> +++ b/drivers/net/ethernet/airoha/airoha_eth.h
> @@ -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
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-15  8:48 [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames Sayantan Nandy
  2026-01-15 13:40 ` Lorenzo Bianconi
@ 2026-01-15 17:41 ` Andrew Lunn
  2026-01-15 19:10   ` Benjamin Larsson
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2026-01-15 17:41 UTC (permalink / raw)
  To: Sayantan Nandy
  Cc: lorenzo, linux-arm-kernel, linux-mediatek, netdev, sayantan.nandy,
	bread.hsu, kuldeep.malik, aniket.negi, rajeev.kumar

On Thu, Jan 15, 2026 at 02:18:37PM +0530, Sayantan Nandy wrote:
> 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

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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-15 17:41 ` Andrew Lunn
@ 2026-01-15 19:10   ` Benjamin Larsson
  2026-01-16  1:08     ` Andrew Lunn
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Larsson @ 2026-01-15 19:10 UTC (permalink / raw)
  To: Andrew Lunn, Sayantan Nandy
  Cc: lorenzo, linux-arm-kernel, linux-mediatek, netdev, sayantan.nandy,
	bread.hsu, kuldeep.malik, aniket.negi, rajeev.kumar

On 15/01/2026 18:41, Andrew Lunn wrote:
> On Thu, Jan 15, 2026 at 02:18:37PM +0530, Sayantan Nandy wrote:
>> 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


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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-15 19:10   ` Benjamin Larsson
@ 2026-01-16  1:08     ` Andrew Lunn
  2026-01-16 10:48       ` Benjamin Larsson
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2026-01-16  1:08 UTC (permalink / raw)
  To: Benjamin Larsson
  Cc: Sayantan Nandy, lorenzo, linux-arm-kernel, linux-mediatek, netdev,
	sayantan.nandy, bread.hsu, kuldeep.malik, aniket.negi,
	rajeev.kumar

On Thu, Jan 15, 2026 at 08:10:20PM +0100, Benjamin Larsson wrote:
> On 15/01/2026 18:41, Andrew Lunn wrote:
> > On Thu, Jan 15, 2026 at 02:18:37PM +0530, Sayantan Nandy wrote:
> > > 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.

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

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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-15 13:40 ` Lorenzo Bianconi
@ 2026-01-16  3:05   ` Jakub Kicinski
  0 siblings, 0 replies; 10+ messages in thread
From: Jakub Kicinski @ 2026-01-16  3:05 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Sayantan Nandy, linux-arm-kernel, linux-mediatek, netdev,
	sayantan.nandy, bread.hsu, kuldeep.malik, aniket.negi,
	rajeev.kumar

On Thu, 15 Jan 2026 14:40:03 +0100 Lorenzo Bianconi wrote:
> > 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).
> > 
> > Signed-off-by: Sayantan Nandy <sayantann11@gmail.com>  
> 
> 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:
-- 
pw-bot: cr

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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-16  1:08     ` Andrew Lunn
@ 2026-01-16 10:48       ` Benjamin Larsson
  2026-01-16 14:21         ` Andrew Lunn
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Larsson @ 2026-01-16 10:48 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sayantan Nandy, lorenzo, linux-arm-kernel, linux-mediatek, netdev,
	sayantan.nandy, bread.hsu, kuldeep.malik, aniket.negi,
	rajeev.kumar

Hi.

On 16/01/2026 02:08, Andrew Lunn wrote:
> On Thu, Jan 15, 2026 at 08:10:20PM +0100, Benjamin Larsson wrote:
>> On 15/01/2026 18:41, Andrew Lunn wrote:
>>> On Thu, Jan 15, 2026 at 02:18:37PM +0530, Sayantan Nandy wrote:
>>>> 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.
> Can you test 16K?

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

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


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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-16 10:48       ` Benjamin Larsson
@ 2026-01-16 14:21         ` Andrew Lunn
       [not found]           ` <CADJVu8XP_wBudwOrT1OLhcZ3-9Qoci8FQzw+yyxnogiC2Asx5w@mail.gmail.com>
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2026-01-16 14:21 UTC (permalink / raw)
  To: Benjamin Larsson
  Cc: Sayantan Nandy, lorenzo, linux-arm-kernel, linux-mediatek, netdev,
	sayantan.nandy, bread.hsu, kuldeep.malik, aniket.negi,
	rajeev.kumar

On Fri, Jan 16, 2026 at 11:48:30AM +0100, Benjamin Larsson wrote:
> Hi.
> 
> On 16/01/2026 02:08, Andrew Lunn wrote:
> > On Thu, Jan 15, 2026 at 08:10:20PM +0100, Benjamin Larsson wrote:
> > > On 15/01/2026 18:41, Andrew Lunn wrote:
> > > > On Thu, Jan 15, 2026 at 02:18:37PM +0530, Sayantan Nandy wrote:
> > > > > 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.
> > Can you test 16K?
> 
> I probably can but it would take some time (weeks) as I dont have any
> current setup with AN7581.
> 
> > 
> > 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.

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

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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
       [not found]           ` <CADJVu8XP_wBudwOrT1OLhcZ3-9Qoci8FQzw+yyxnogiC2Asx5w@mail.gmail.com>
@ 2026-01-16 14:56             ` Andrew Lunn
  2026-01-16 15:05               ` Benjamin Larsson
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2026-01-16 14:56 UTC (permalink / raw)
  To: sayantan nandy
  Cc: Benjamin Larsson, lorenzo, linux-arm-kernel, linux-mediatek,
	netdev, sayantan.nandy, bread.hsu, kuldeep.malik, aniket.negi,
	rajeev.kumar

On Fri, Jan 16, 2026 at 08:09:51PM +0530, sayantan nandy wrote:
> 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

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

* Re: [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames
  2026-01-16 14:56             ` Andrew Lunn
@ 2026-01-16 15:05               ` Benjamin Larsson
  0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Larsson @ 2026-01-16 15:05 UTC (permalink / raw)
  To: Andrew Lunn, sayantan nandy
  Cc: lorenzo, linux-arm-kernel, linux-mediatek, netdev, sayantan.nandy,
	bread.hsu, kuldeep.malik, aniket.negi, rajeev.kumar

On 16/01/2026 15:56, Andrew Lunn wrote:
> On Fri, Jan 16, 2026 at 08:09:51PM +0530, sayantan nandy wrote:
>> 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

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

MvH

Benjamin Larsson


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

end of thread, other threads:[~2026-01-16 15:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15  8:48 [PATCH] net: airoha_eth: increase max mtu to 9220 for DSA jumbo frames Sayantan Nandy
2026-01-15 13:40 ` Lorenzo Bianconi
2026-01-16  3:05   ` Jakub Kicinski
2026-01-15 17:41 ` Andrew Lunn
2026-01-15 19:10   ` Benjamin Larsson
2026-01-16  1:08     ` Andrew Lunn
2026-01-16 10:48       ` Benjamin Larsson
2026-01-16 14:21         ` Andrew Lunn
     [not found]           ` <CADJVu8XP_wBudwOrT1OLhcZ3-9Qoci8FQzw+yyxnogiC2Asx5w@mail.gmail.com>
2026-01-16 14:56             ` Andrew Lunn
2026-01-16 15:05               ` Benjamin Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox