From: Simon Horman <horms@kernel.org>
To: Charles Perry <charles.perry@microchip.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/4] net: macb: add safeguards for jumbo frame larger than 10240
Date: Thu, 5 Mar 2026 11:40:10 +0000 [thread overview]
Message-ID: <20260305114010.GD90938@kernel.org> (raw)
In-Reply-To: <20260303180318.1814791-4-charles.perry@microchip.com>
On Tue, Mar 03, 2026 at 10:03:17AM -0800, Charles Perry wrote:
> The RX buffers for GEM can have a maximum size of 16320 bytes
> (0xff in the RXBS field of the DMACFG register means 255*64 =
> 16320 bytes).
>
> The "jumbo_max_length" field (bits 0..13) of the DCFG2 register
> can take a value of up to 16383 (0x3FFF). This field is not used
> when determining the max MTU, instead an hardcoded value
> (jumbo_max_len) is used for each platform. Right now the maximum
> value for jumbo_max_len is 10240 (0x2800).
>
> GEM uses one buffer per packet which means that one buffer must
> allow room for the max MTU plus L2 encapsulation and alignment.
>
> This commit adds a limit to max_mtu and rx_buffer_size so that
> the RXBS field can never overflow when a large MTU is used.
>
> With this commit, it is now possible to add new platforms that
> have their gem_jumbo_max_length set to 16383.
>
> Signed-off-by: Charles Perry <charles.perry@microchip.com>
Hi Charles,
I am sorry if this question is a bit naïve.
I understand the need to clamp the max_mtu to avoid overflowing RXBS.
And that this hasn't been an issue up until now due to the maximum
value of jumbo_max_len used in the driver.
But I'm unclear on the relationship between DCFG2 and the max_mtu.
Why does it need to be set to a value larger than that corresponding to
the maximum mtu and RX buf size?
...
next prev parent reply other threads:[~2026-03-05 11:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 18:03 [PATCH net-next 0/4] Initial support for p64h GEM Charles Perry
2026-03-03 18:03 ` [PATCH net-next 1/4] dt-bindings: net: cdns,macb: add a compatible for Microchip p64h Charles Perry
2026-03-03 18:18 ` Conor Dooley
2026-03-03 18:54 ` Charles Perry
2026-03-03 19:32 ` Conor Dooley
2026-03-03 20:45 ` Charles Perry
2026-03-03 18:03 ` [PATCH net-next 2/4] dt-bindings: net: cdns,macb: forbid phy nodes " Charles Perry
2026-03-03 18:11 ` Conor Dooley
2026-03-03 18:57 ` Charles Perry
2026-03-03 18:03 ` [PATCH net-next 3/4] net: macb: add safeguards for jumbo frame larger than 10240 Charles Perry
2026-03-05 11:40 ` Simon Horman [this message]
2026-03-05 14:24 ` Charles Perry
2026-03-06 13:04 ` Simon Horman
2026-03-06 15:25 ` Charles Perry
2026-03-03 18:03 ` [PATCH net-next 4/4] net: macb: add support for Microchip p64h ethernet endpoint Charles Perry
2026-03-06 13:04 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260305114010.GD90938@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=charles.perry@microchip.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.