From: David Laight <David.Laight@ACULAB.COM>
To: 'Horatiu Vultur' <horatiu.vultur@microchip.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>
Subject: RE: [PATCH net v2 0/3] net: lan966x: Fixes for when MTU is changed
Date: Mon, 31 Oct 2022 10:43:47 +0000 [thread overview]
Message-ID: <b75a7136030846f587e555763ef2750e@AcuMS.aculab.com> (raw)
In-Reply-To: <20221030213636.1031408-1-horatiu.vultur@microchip.com>
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)
next prev parent reply other threads:[~2022-10-31 10:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-30 21:36 Horatiu Vultur
2022-10-30 21:36 ` [PATCH net v2 1/3] net: lan966x: Fix the MTU calculation Horatiu Vultur
2022-10-30 21:36 ` [PATCH net v2 2/3] net: lan966x: Adjust maximum frame size when vlan is enabled/disabled Horatiu Vultur
2022-10-30 21:36 ` [PATCH net v2 3/3] net: lan966x: Fix FDMA when MTU is changed Horatiu Vultur
2022-10-31 10:43 ` David Laight [this message]
2022-10-31 15:01 ` [PATCH net v2 0/3] net: lan966x: Fixes for " 'Horatiu Vultur'
2022-10-31 15:27 ` David Laight
2022-11-01 7:59 ` 'Horatiu Vultur'
2022-11-01 9:03 ` David Laight
2022-11-01 16:04 ` 'Horatiu Vultur'
2022-11-02 4:30 ` 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=b75a7136030846f587e555763ef2750e@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome