From: Paolo Abeni <pabeni@redhat.com>
To: "Linus Walleij" <linus.walleij@linaro.org>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: realtek: Rewrite RTL8366RB MTU handling
Date: Tue, 12 Dec 2023 14:18:27 +0100 [thread overview]
Message-ID: <525abd42a7a5b45bb70e184b9c3e6b7e37b48339.camel@redhat.com> (raw)
In-Reply-To: <ddeff631a676d2763eb42fa620672c57743c514e.camel@redhat.com>
On Tue, 2023-12-12 at 14:16 +0100, Paolo Abeni wrote:
> On Sat, 2023-12-09 at 23:37 +0100, Linus Walleij wrote:
> > The MTU callbacks are in layer 1 size, so for example 1500
> > bytes is a normal setting. Cache this size, and only add
> > the layer 2 framing right before choosing the setting. On
> > the CPU port this will however include the DSA tag since
> > this is transmitted from the parent ethernet interface!
> >
> > Add the layer 2 overhead such as ethernet and VLAN framing
> > and FCS before selecting the size in the register.
> >
> > This will make the code easier to understand.
> >
> > The rtl8366rb_max_mtu() callback returns a bogus MTU
> > just subtracting the CPU tag, which is the only thing
> > we should NOT subtract. Return the correct layer 1
> > max MTU after removing headers and checksum.
> >
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> FTR, my understanding is that the possible MTU API changes still under
> discussion, are somewhat orthogonal to this patch, which is suitable
> as-is for net.
Typo above -> 'net-next'.
>
> I'm applying this fixes right now.
>
> Cheers,
>
> Paolo
next prev parent reply other threads:[~2023-12-12 13:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 22:37 [PATCH net-next 0/2] net: dsa: realtek: Two RTL8366RB fixes Linus Walleij
2023-12-09 22:37 ` [PATCH net-next 1/2] net: dsa: realtek: Rename bogus RTL8368S variable Linus Walleij
2023-12-10 13:00 ` Alvin Šipraga
2023-12-11 2:50 ` Luiz Angelo Daros de Luca
2023-12-11 21:24 ` Florian Fainelli
2023-12-09 22:37 ` [PATCH net-next 2/2] net: dsa: realtek: Rewrite RTL8366RB MTU handling Linus Walleij
2023-12-10 13:00 ` Alvin Šipraga
2023-12-11 3:14 ` Luiz Angelo Daros de Luca
2023-12-11 15:30 ` Vladimir Oltean
2023-12-11 21:07 ` Luiz Angelo Daros de Luca
2023-12-12 13:01 ` Vladimir Oltean
2023-12-11 21:24 ` Florian Fainelli
2023-12-12 13:16 ` Paolo Abeni
2023-12-12 13:18 ` Paolo Abeni [this message]
2023-12-12 13:30 ` [PATCH net-next 0/2] net: dsa: realtek: Two RTL8366RB fixes 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=525abd42a7a5b45bb70e184b9c3e6b7e37b48339.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).