[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb2ab419-733d-404f-b419-3aae6944d860@gmail.com>
Date: Fri, 4 Oct 2024 20:38:02 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Jonas Gorski <jonas.gorski@...il.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Murali Krishna Policharla <murali.policharla@...adcom.com>,
Russell King <linux@...linux.org.uk>
Cc: Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] net: dsa: b53: fix jumbo frame mtu check
On 10/4/2024 1:47 AM, Jonas Gorski wrote:
> JMS_MIN_SIZE is the full ethernet frame length, while mtu is just the
> data payload size. Comparing these two meant that mtus between 1500 and
> 1518 did not trigger enabling jumbo frames.
>
> So instead compare the set mtu ETH_DATA_LEN, which is equal to
> JMS_MIN_SIZE - ETH_HLEN - ETH_FCS_LEN;
>
> Also do a check that the requested mtu is actually greater than the
> minimum length, else we do not need to enable jumbo frames.
>
> In practice this only introduced a very small range of mtus that did not
> work properly. Newer chips allow 2000 byte large frames by default, and
> older chips allow 1536 bytes long, which is equivalent to an mtu of
> 1514. So effectivly only mtus of 1515~1517 were broken.
>
> Fixes: 6ae5834b983a ("net: dsa: b53: add MTU configuration support")
> Signed-off-by: Jonas Gorski <jonas.gorski@...il.com>
Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
--
Florian
Powered by blists - more mailing lists