From: David Laight <David.Laight@ACULAB.COM>
To: '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 16:59:17 +0000 [thread overview]
Message-ID: <4bcf49b33a8e4ae29ef44351bf5c0bf2@AcuMS.aculab.com> (raw)
In-Reply-To: <1543754077-18643-2-git-send-email-tariqt@mellanox.com>
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?
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.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2018-12-04 16:59 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 [this message]
2018-12-04 17:04 ` Eric Dumazet
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=4bcf49b33a8e4ae29ef44351bf5c0bf2@AcuMS.aculab.com \
--to=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).