From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Milton Miller <miltonm@bga.com>
Cc: David Acker <dacker@roinet.com>, Jeff Garzik <jgarzik@pobox.com>,
Scott Feldman <sfeldma@pobox.com>,
e1000-devel@lists.sourceforge.net,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
John Ronciak <john.ronciak@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] fix e100 rx path on ARM (was [PATCH] e100 rx: or s and el bits)
Date: Mon, 21 May 2007 10:45:37 -0700 [thread overview]
Message-ID: <4651DAC1.7050604@intel.com> (raw)
In-Reply-To: <e3819b7a866b1117fd5a69e6a85e0784@bga.com>
Milton Miller wrote:
> On May 18, 2007, at 12:11 PM, David Acker wrote:
>
>> Kok, Auke wrote:
>>> First impression just came in: It seems RX performance is dropped to
>>> 10mbit. TX is unaffected and runs at 94mbit/tcp, but RX the new code
>>> seems to misbehave and fluctuate, dropping below 10mbit after a few
>>> netperf runs and staying there...
>>> ideas?
>> I found the problem. Another casualty of working with two different
>> kernels at once...arg.
>> The blank rfd needs to have its el-bit clear now. Here is the new and
>> improved patch.
>>
>> On the ARM, their is a race condition between software allocating a
>> new receive
>> buffer and hardware writing into a buffer. The two race on touching
>> the last
>> Receive Frame Descriptor (RFD). It has its el-bit set and its next
>> link equal
>> to 0. When hardware encounters this buffer it attempts to write data
>> to it
>> and then update Status Word bits and Actual Count in the RFD. At the
>> same time
>> software may try to clear the el-bit and set the link address to a new
>> buffer.
>> Since the entire RFD is once cache-line, the two write operations can
>> collide. This can lead to the receive unit stalling or freed receive
>> buffers
>> getting written to.
>>
>> The fix is to set the el-bit on and the size to 0 on the next to last
>> buffer
>> in the chain. When the hardware encounters this buffer it stops and
>> does
>> not write to it at all. The hardware issues an RNR interrupt with the
>> receive unit in the No Resources state. When software allocates
>> buffers,
>> it can update the tail of the list because it knows the hardware will
>> stop
>> at the buffer before it. Once it has a new next to last buffer
>> prepared,
>> it can clear the el-bit and set the size on the previous one. The
>> race on
>> this buffer is safe since the link already points to a valid next
>> buffer.
>> If the hardware sees the el-bit cleared without the size set, it will
>> move on to the next buffer and complete that one in error. If it sees
>> the size set but the el-bit still set, it will complete that buffer
>> and then RNR interrupt and wait.
>>
>>
>> Signed-off-by: David Acker <dacker@roinet.com>
>>
>
>
> This patch doesn't apply. It appears white space damaged somewhere:
>
> (1) blank lines in diff are empty not <space>
> (2) unchanged lines starting with tab are <space><space><tab>
>
> After fixing the above I still get:
>
> patching file drivers/net/e100.c
> Hunk #1 FAILED at 285.
> Hunk #4 FAILED at 1749.
> Hunk #8 FAILED at 1865.
> Hunk #10 succeeded at 1965 with fuzz 1.
> Hunk #11 succeeded at 1982 with fuzz 1.
> 3 out of 14 hunks FAILED -- saving rejects to file
> drivers/net/e100.c.rej
>
> although I haven't figured out what is wrong.
>
> Proceeding with the review:
>
> Coding style:
> (1) if body on seperate line.
> (2) space after if before (
> (3) The other enums in this driver are not ALL_CAPS
> (4) This driver doesn't do CONSTANT != value but value != enum
> (see nic->mac for examples)
I sent Milton my copy of this patch which has these style issues corrected and
applies cleanly to a recent git tree. If anyone else specifically wants a copy
let me know.
Auke
next prev parent reply other threads:[~2007-05-21 17:46 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 11:24 [PATCH] e100 rx: or s and el bits Milton Miller
2007-05-01 15:01 ` David Acker
2007-05-02 20:21 ` David Acker
2007-05-04 21:43 ` David Acker
2007-05-06 6:36 ` Milton Miller
2007-05-07 15:27 ` David Acker
2007-05-14 18:26 ` [PATCH] fix e100 rx path on ARM (was [PATCH] e100 rx: or s and el bits) David Acker
2007-05-18 1:54 ` Jeff Garzik
2007-05-18 3:47 ` Kok, Auke
2007-05-18 14:07 ` David Acker
2007-05-18 14:20 ` David Acker
2007-05-18 15:29 ` Kok, Auke
2007-05-18 15:47 ` David Acker
2007-05-18 15:59 ` Kok, Auke
2007-05-18 17:11 ` David Acker
2007-05-18 17:47 ` Kok, Auke
2007-05-21 17:35 ` Milton Miller
2007-05-21 17:45 ` Kok, Auke [this message]
2007-05-22 16:51 ` Milton Miller
2007-05-22 22:07 ` David Acker
2007-05-23 14:02 ` Milton Miller
2007-05-23 21:32 ` David Acker
2007-05-24 5:26 ` Milton Miller
2007-05-24 11:21 ` Milton Miller
2007-05-24 12:51 ` David Acker
2007-05-24 14:25 ` Milton Miller
2007-05-29 15:58 ` David Acker
2007-05-30 8:26 ` Milton Miller
2007-06-01 20:45 ` David Acker
2007-06-01 21:13 ` Jeff Garzik
2007-06-01 22:13 ` Kok, Auke
2007-06-04 9:03 ` Milton Miller
2007-06-05 13:34 ` David Acker
2007-06-05 16:14 ` Milton Miller
2007-08-27 17:34 ` Kok, Auke
2007-08-27 18:32 ` David Acker
2007-06-05 16:14 ` Milton Miller
2007-06-05 17:27 ` Kok, Auke
2007-06-05 17:39 ` Jeff Garzik
2007-06-05 17:42 ` David Acker
2007-06-05 17:43 ` Kok, Auke
2007-06-05 17:56 ` Milton Miller
2007-06-05 23:33 ` Kok, Auke
2007-06-05 23:44 ` Jeff Garzik
2007-06-06 2:26 ` Kok, Auke
2007-06-06 9:28 ` Milton Miller
2007-06-11 15:58 ` Milton Miller
2007-06-15 14:39 ` Jeff Garzik
2007-05-24 12:44 ` David Acker
2007-05-24 4:13 ` Milton Miller
2007-05-01 15:21 ` [PATCH] e100 rx: or s and el bits Kok, Auke
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=4651DAC1.7050604@intel.com \
--to=auke-jan.h.kok@intel.com \
--cc=dacker@roinet.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=john.ronciak@intel.com \
--cc=miltonm@bga.com \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@pobox.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).