From: P@draigBrady.com
To: Chris Leech <chris.leech@gmail.com>
Cc: e1000-devel@lists.sourceforge.net, netdev@oss.sgi.com
Subject: [PATCH] Re: [E1000-devel] e1000 jumbo problems
Date: Thu, 01 Jul 2004 20:51:14 +0100 [thread overview]
Message-ID: <40E46B32.1080605@draigBrady.com> (raw)
In-Reply-To: <41b516cb040623114825a9c555@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2515 bytes --]
This patch is not for applying, just for discussion.
comments below...
Chris Leech wrote:
>>>Another related issue, is that the driver uses 4KiB buffers
>>>for MTUs in the 1500 -> 2000 range which seems a bit silly.
>>>Any particular reason for that?
>
>
> It is wasteful, but does anyone actually use an MTU in the range of
> 1501 - 2030? It seems silly to me to go with a non-standard frame
> size, but not go up to something that might give you a performance
> benefit (9k).
>
>
>>I changed the driver to use 2KiB buffers for frames in the
>>1518 -> 2048 range (BSEX=0, LPE=1). This breaks however
>>as packets are not dropped that are larger than the max specified?
>>Instead they're scribbled into memory causing a lockup after a while.
>
>
> That sounds right, if you actually got the RCTL register set
> correctly. In e1000_setup_rctl the adapter->rx_buffer_len is used to
> set that register, and it's currently written to only set LPE if the
> buffer size is bigger than 2k (thus, why 4k buffers are used even when
> the MTU is in the 1501 - 2030 range). To use 2k buffers for slightly
> large frames, you'd want some new flag in the adapter for LPE (or
> check netdev->mtu I guess) and do something like: rctl |=
> E1000_RCTL_SZ_2048 | E1000_RCTL_LPE
>
> e1000 devices don't have a programmable MTU for receive filtering,
> they drop anything larger than 1518 unless LPE (long packet enable) is
> set. If LPE is set they accept anything that fits in the FIFO and has
> a valid FCS.
More accurately e1000s accept anything (even greater than a FIFO).
When a large packet is written into multiple FIFOs, only the
last rx descriptor has the EOP (end of packet) flag set.
The driver doesn't handle this at all currently and will
drop the initial buffers (because they don't have the EOP set) which
is fine, but it will accept the last buffer (part of the packet).
I've attached a patch that fixes this. Also the patch drops packets
that fit within a buffer but are larger than MTU. So in summary
the patch will stop packets > MTU being accepted by the driver.
Note also this patch changes to using 2KiB buffers (from 4KiB)
for MTUs between 1500 and 2030, and also it enables large frame
reception (LFE) always, but ingore these as they're just for
debugging.
The patch makes my system completely stable now for MTUs <= 2500,
However I can still get the system to freeze repeatedly by sending
packets larger than this.
cheers,
Pádraig.
[-- Attachment #2: e1000-smallMTU.diff --]
[-- Type: application/x-texinfo, Size: 5497 bytes --]
prev parent reply other threads:[~2004-07-01 19:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <40D883C2.7010106@draigBrady.com>
2004-06-23 17:35 ` [E1000-devel] e1000 jumbo problems P
2004-06-24 5:49 ` TCP receiver's window calculation problem Cheng Jin
2004-06-24 17:43 ` John Heffner
2004-06-24 19:18 ` Cheng Jin
2004-06-24 19:26 ` John Heffner
2004-06-25 6:37 ` Cheng Jin
2004-06-25 13:43 ` John Heffner
[not found] ` <41b516cb040623114825a9c555@mail.gmail.com>
2004-06-24 10:36 ` [E1000-devel] e1000 jumbo problems P
2004-07-01 19:51 ` P [this message]
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=40E46B32.1080605@draigBrady.com \
--to=p@draigbrady.com \
--cc=chris.leech@gmail.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=netdev@oss.sgi.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).