[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <34fbdbfd-5684-af7d-0d50-b0b18312127e@gmail.com>
Date: Tue, 4 Dec 2018 09:04:15 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Laight <David.Laight@...LAB.COM>,
'Tariq Toukan' <tariqt@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eran Ben Elisha <eranbe@...lanox.com>
Subject: Re: [PATCH net 1/2] net/mlx4_en: Change min MTU size to ETH_MIN_MTU
On 12/04/2018 08:59 AM, David Laight wrote:
> From: Tariq Toukan
>> Sent: 02 December 2018 12:35
>> From: Eran Ben Elisha <eranbe@...lanox.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.
Powered by blists - more mailing lists