From: Florian Fainelli <f.fainelli@gmail.com>
To: "Linus Walleij" <linus.walleij@linaro.org>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: realtek: Rewrite RTL8366RB MTU handling
Date: Mon, 11 Dec 2023 13:24:03 -0800 [thread overview]
Message-ID: <b01fb27b-2d8d-4652-8f64-cbda79bcd266@gmail.com> (raw)
In-Reply-To: <20231209-rtl8366rb-mtu-fix-v1-2-df863e2b2b2a@linaro.org>
On 12/9/23 14:37, 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>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
next prev parent reply other threads:[~2023-12-11 21:24 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 [this message]
2023-12-12 13:16 ` Paolo Abeni
2023-12-12 13:18 ` Paolo Abeni
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=b01fb27b-2d8d-4652-8f64-cbda79bcd266@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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 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.