From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Laight <David.Laight@ACULAB.COM>,
'Tariq Toukan' <tariqt@mellanox.com>,
"David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eran Ben Elisha <eranbe@mellanox.com>
Subject: Re: [PATCH net 1/2] net/mlx4_en: Change min MTU size to ETH_MIN_MTU
Date: Tue, 4 Dec 2018 09:04:15 -0800 [thread overview]
Message-ID: <34fbdbfd-5684-af7d-0d50-b0b18312127e@gmail.com> (raw)
In-Reply-To: <4bcf49b33a8e4ae29ef44351bf5c0bf2@AcuMS.aculab.com>
On 12/04/2018 08:59 AM, David Laight wrote:
> From: Tariq Toukan
>> Sent: 02 December 2018 12:35
>> From: Eran Ben Elisha <eranbe@mellanox.com>
>>
>> NIC driver minimal MTU size shall be set to ETH_MIN_MTU, as defined in
>> the RFC791 and in the network stack. Remove old mlx4_en only define for
>> it, which was set to wrong value.
> ...
>>
>> - /* MTU range: 46 - hw-specific max */
>> - dev->min_mtu = MLX4_EN_MIN_MTU;
>> + /* MTU range: 68 - hw-specific max */
>> + dev->min_mtu = ETH_MIN_MTU;
>> dev->max_mtu = priv->max_mtu;
>
> Where does 68 come from?
Min IPv4 MTU per RFC791
> The minimum size of an ethernet packet including the mac addresses
> and CRC is 64 bytes - but that would never be an 'mtu'.
>
> Since 64 - 46 = 18, the 46 probably excludes both MAC addresses,
> the ethertype/length and the CRC.
> This is 'sort of' the minimum mtu for an ethernet frame.
>
> I'm not sure which values are supposed to be in dev->min/max_mtu.
I am not sure we really care, only syzkaller can possibly.
next prev parent reply other threads:[~2018-12-04 17:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-02 12:34 [PATCH net 0/2] mlx4 fixes for 4.20-rc Tariq Toukan
2018-12-02 12:34 ` [PATCH net 1/2] net/mlx4_en: Change min MTU size to ETH_MIN_MTU Tariq Toukan
2018-12-04 16:59 ` David Laight
2018-12-04 17:04 ` Eric Dumazet [this message]
2018-12-04 17:17 ` David Laight
2018-12-04 17:21 ` David Laight
2018-12-05 5:24 ` Cong Wang
2018-12-02 12:34 ` [PATCH net 2/2] net/mlx4_en: Fix build break when CONFIG_INET is off Tariq Toukan
2018-12-05 5:40 ` Cong Wang
2018-12-04 0:17 ` [PATCH net 0/2] mlx4 fixes for 4.20-rc David Miller
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=34fbdbfd-5684-af7d-0d50-b0b18312127e@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.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;
as well as URLs for NNTP newsgroup(s).