From: Michael Cronenworth <mike@cchtml.com>
To: netdev@vger.kernel.org
Subject: Re: e1000e max frame calculation
Date: Mon, 06 Apr 2015 16:45:40 -0500 [thread overview]
Message-ID: <5522FE84.6030104@cchtml.com> (raw)
In-Reply-To: <5522B685.2030104@cchtml.com>
Preface: I am not here to start a discussion about header sizes or hardware limits.
This is solely about the calculation used to limit a user when they pass a MTU to a
driver.
On 04/06/2015 11:38 AM, Michael Cronenworth wrote:
> Other drivers appear to be using the "old" maximum frame calculation and can
> continue to use 9000.
>
> Can a standard be decided upon that all drivers use or is it acceptable that one
> driver "does its own thing?"
To be specific here are some examples of maximum MTU calculation and their tests:
sky2: user_mtu > ETH_JUMBO_MTU
r8169: user_mtu < ETH_ZLEN || user_mtu > (ETH_DATA_LEN||x*1024 - ETH_HLEN - 2)
igb: user_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN > MAX_JUMBO_FRAME_SIZE
e1000e <3.15: user_mtu + ETH_HLEN + ETH_FCS_LEN > adapter->max_hw_frame_size;
e1000e >=3.15: user_mtu + VLAN_HLEN + ETH_HLEN + ETH_FCS_LEN >
adapter->max_hw_frame_size;
Let's say the hardware has a limit of 4096 bytes. The user wishes to set an MTU of
4078 bytes.
sky2: false, mtu is set
r8169: false, mtu is set
igb: true, mtu is not set
e1000e <3.15: false, mtu is set
e1000e <3.15: true, mtu is not set
So some drivers work with the 4078 MTU and some do not. They all had the same
hardware limit, but their driver's software calculated limit was different. Am I crazy?
Thanks,
Michael
next prev parent reply other threads:[~2015-04-06 21:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 16:38 e1000e max frame calculation Michael Cronenworth
2015-04-06 18:38 ` Alexander Duyck
2015-04-06 21:45 ` Michael Cronenworth [this message]
2015-04-06 23:17 ` Alexander Duyck
2015-04-07 3:47 ` Hisashi T Fujinaka
2015-04-08 17:17 ` Alexander Duyck
2015-04-08 17:25 ` Hisashi T Fujinaka
2015-04-08 21:02 ` [PATCH] e1000e: Cleanup handling of VLAN_HLEN as a part of max frame size Alexander Duyck
2015-04-08 21:15 ` Hisashi T Fujinaka
2015-04-08 22:58 ` Alexander Duyck
2015-04-08 23:05 ` Hisashi T Fujinaka
2015-04-08 23:13 ` Alexander Duyck
2015-04-09 0:10 ` Hisashi T Fujinaka
2015-04-09 0:26 ` Hisashi T Fujinaka
2015-04-09 1:19 ` Alexander Duyck
2015-04-09 6:17 ` [Intel-wired-lan] " Templeman, Chaim
2015-04-09 15:51 ` Alexander Duyck
2015-04-13 18:26 ` Templeman, Chaim
2015-04-09 0:01 ` Jeff Kirsher
2015-04-09 4:48 ` Michael Cronenworth
2015-04-21 2:38 ` [Intel-wired-lan] " Brown, Aaron F
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=5522FE84.6030104@cchtml.com \
--to=mike@cchtml.com \
--cc=netdev@vger.kernel.org \
/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).