From: Vladimir Oltean <olteanv@gmail.com>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan McDowell <noodles@earth.li>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Robert Marko <robert.marko@sartura.hr>
Subject: Re: [net PATCH 2/2] net: dsa: qca8k: fix MTU calculation
Date: Sun, 21 Nov 2021 20:14:29 +0200 [thread overview]
Message-ID: <20211121181429.jyelad2jbiebdtic@skbuf> (raw)
In-Reply-To: <20211119020350.32324-2-ansuelsmth@gmail.com>
On Fri, Nov 19, 2021 at 03:03:50AM +0100, Ansuel Smith wrote:
> From: Robert Marko <robert.marko@sartura.hr>
>
> qca8k has a global MTU, so its tracking the MTU per port to make sure
> that the largest MTU gets applied.
> Since it uses the frame size instead of MTU the driver MTU change function
> will then add the size of Ethernet header and checksum on top of MTU.
>
> The driver currently populates the per port MTU size as Ethernet frame
> length + checksum which equals 1518.
>
> The issue is that then MTU change function will go through all of the
> ports, find the largest MTU and apply the Ethernet header + checksum on
> top of it again, so for a desired MTU of 1500 you will end up with 1536.
>
> This is obviously incorrect, so to correct it populate the per port struct
> MTU with just the MTU and not include the Ethernet header + checksum size
> as those will be added by the MTU change function.
>
> Fixes: f58d2598cf70 ("net: dsa: qca8k: implement the port MTU callbacks")
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
next prev parent reply other threads:[~2021-11-21 18:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 2:03 [net PATCH 1/2] net: dsa: qca8k: fix internal delay applied to the wrong PAD config Ansuel Smith
2021-11-19 2:03 ` [net PATCH 2/2] net: dsa: qca8k: fix MTU calculation Ansuel Smith
2021-11-21 18:14 ` Vladimir Oltean [this message]
2021-11-21 18:18 ` [net PATCH 1/2] net: dsa: qca8k: fix internal delay applied to the wrong PAD config Vladimir Oltean
2021-11-21 18:22 ` Ansuel Smith
2021-11-21 18:36 ` Vladimir Oltean
2021-11-22 12:50 ` 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=20211121181429.jyelad2jbiebdtic@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noodles@earth.li \
--cc=robert.marko@sartura.hr \
--cc=vivien.didelot@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