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: <b75a7136030846f587e555763ef2750e@AcuMS.aculab.com>
Date:   Mon, 31 Oct 2022 10:43:47 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Horatiu Vultur' <horatiu.vultur@...rochip.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH net v2 0/3] net: lan966x: Fixes for when MTU is changed

From: Horatiu Vultur
> Sent: 30 October 2022 21:37
> 
> There were multiple problems in different parts of the driver when
> the MTU was changed.
> The first problem was that the HW was missing to configure the correct
> value, it was missing ETH_HLEN and ETH_FCS_LEN. The second problem was
> when vlan filtering was enabled/disabled, the MRU was not adjusted
> corretly. While the last issue was that the FDMA was calculated wrongly
> the correct maximum MTU.

IIRC all these lengths are 1514, 1518 and maybe 1522?
How long are the actual receive buffers?
I'd guess they have to be rounded up to a whole number of cache lines
(especially on non-coherent systems) so are probably 1536 bytes.

If driver does support 8k+ jumbo frames just set the hardware
frame length to match the receive buffer size.

There is no real need to exactly police the receive MTU.
There are definitely situations where the transmit MTU has
to be limited (eg to avoid ptmu blackholes) but where some
systems still send 'full sized' packets.

There is also the possibility of receiving PPPoE encapsulated
full sized ethernet packets.
I can remember how big that header is - something like 8 bytes.
There is no real reason to discard them if they'd fit in the buffer.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ