From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: "Paolo Abeni" <pabeni@redhat.com>,
"Charles Perry" <charles.perry@microchip.com>,
"Théo Lebrun" <theo.lebrun@bootlin.com>
Cc: <netdev@vger.kernel.org>, "Simon Horman" <horms@kernel.org>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"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 v3 2/3] net: macb: add safeguards for jumbo frame larger than 10240
Date: Tue, 17 Mar 2026 16:32:10 +0100 [thread overview]
Message-ID: <DH55ZHTD35E2.37QYMVRD6KWZ7@bootlin.com> (raw)
In-Reply-To: <fb33e9ec-d93c-45f2-aacb-7633beca7805@redhat.com>
On Tue Mar 17, 2026 at 1:29 PM CET, Paolo Abeni wrote:
> On 3/16/26 7:26 PM, Charles Perry wrote:
>> On Mon, Mar 16, 2026 at 06:21:38PM +0100, Théo Lebrun wrote:
>>> Hello Charles,
>>>
>>> On Fri Mar 13, 2026 at 3:06 PM CET, 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 GEM IP has configurable maximum jumbo frame length that can go up to
>>>> 16383. The actual value for this limit can be found in the
>>>> "jumbo_max_length" field (bits 0..13) of the DCFG2 register.
>>>> Currently, the macb driver doesn't use the DCFG2 register when
>>>> determining the max MTU, instead an hardcoded value (jumbo_max_len in
>>>> struct macb_config) is used for each platform. Right now the maximum
>>>> value for jumbo_max_len is 10240 (0x2800).
>>>
>>> If DCFG2 contains the value then we can runtime detect it. With that, we
>>> could make the macb_config->jumbo_max_len attribute optional. Then
>>> start dropping it from platforms where we know we can trust the DCFG2
>>> value.
>>>
>>
>> Hello Théo,
>>
>> That would be a good idea. We could use "jumbo_max_len == 0" as a way to
>> signal that the DCFG2 register should be used for determining the max MTU.
>>
>> However, that's a new feature and it doesn't belong in this patch. All I
>> want to do in this patchset is put the real value of jumbo_max_length in
>> the PIC64-HPSC macb_config and make sure the driver doesn't overflow when
>> that's used.
>
> FWIW, I agree that is better suited for a follow-up than for the initial
> bring-up.
then:
Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com>
Thanks,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-03-17 15:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 14:06 [PATCH net-next v3 0/3] Initial support for PIC64-HPSC/HX Ethernet endpoint Charles Perry
2026-03-13 14:06 ` [PATCH net-next v3 1/3] dt-bindings: net: cdns,macb: add a compatible for Microchip pic64hpsc Charles Perry
2026-03-17 15:31 ` Théo Lebrun
2026-03-13 14:06 ` [PATCH net-next v3 2/3] net: macb: add safeguards for jumbo frame larger than 10240 Charles Perry
2026-03-16 17:21 ` Théo Lebrun
2026-03-16 18:26 ` Charles Perry
2026-03-17 12:29 ` Paolo Abeni
2026-03-17 15:32 ` Théo Lebrun [this message]
2026-03-13 14:06 ` [PATCH net-next v3 3/3] net: macb: add support for Microchip pic64hpsc ethernet endpoint Charles Perry
2026-03-17 15:32 ` Théo Lebrun
2026-03-16 17:28 ` [PATCH net-next v3 0/3] Initial support for PIC64-HPSC/HX Ethernet endpoint Théo Lebrun
2026-03-16 18:47 ` Charles Perry
2026-03-17 12:31 ` Paolo Abeni
2026-03-17 12:40 ` patchwork-bot+netdevbpf
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=DH55ZHTD35E2.37QYMVRD6KWZ7@bootlin.com \
--to=theo.lebrun@bootlin.com \
--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=horms@kernel.org \
--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.