lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211121181429.jyelad2jbiebdtic@skbuf>
Date:   Sun, 21 Nov 2021 20:14:29 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Ansuel Smith <ansuelsmth@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jonathan McDowell <noodles@...th.li>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Robert Marko <robert.marko@...tura.hr>
Subject: Re: [net PATCH 2/2] net: dsa: qca8k: fix MTU calculation

On Fri, Nov 19, 2021 at 03:03:50AM +0100, Ansuel Smith wrote:
> From: Robert Marko <robert.marko@...tura.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@...tura.hr>
> Signed-off-by: Ansuel Smith <ansuelsmth@...il.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ