netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Acker <dacker@roinet.com>
To: Milton Miller <miltonm@bga.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	John Ronciak <john.ronciak@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Scott Feldman <sfeldma@pobox.com>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>
Subject: Re: [PATCH] fix e100 rx path on ARM (was [PATCH] e100 rx: or s and el bits)
Date: Thu, 24 May 2007 08:44:06 -0400	[thread overview]
Message-ID: <46558896.9070505@roinet.com> (raw)
In-Reply-To: <039d8ee49a8dfcbff8695b19d0a1a5c4@bga.com>

Milton Miller wrote:
> On May 23, 2007, at 4:32 PM, David Acker wrote:
>> Milton Miller wrote:
>>> My current reading of the manual is that the C bit will not be
>>> set on an RFD that is size 0.  It goes on to processes EL and
>>> S, and decides to stop and interrupt RNR or suspend, or just
>>> go to the next packet.
>> I double checked this with a quick experiment and it appears you are 
>> correct.
>>
>> What about if we always did the following:
>> set the size:
>> sync();
>> clear el-bit
>> sync()
>>
>> Then if the hardware sees just the size set, the packet completes but 
>> with the el-bit and we know we need to restart since it completed.
>> If it sees the size == 0, and the el bit set, it stops and RNR 
>> interrupts.
> 
> I think this is exposed to a hole and a race:  we don't know if the 
> hardware
> read the RFD before we set the size or after, just that it was before 
> the EL
> bit was cleared.  If it read it before the size was set, then it will not
> set the C bit.  If it reads it after the size is set, it will complete it.
Yep...I too got sidetracked!  My test time got lost to two 2 month old 
twins needing to be fed or else! :-)

> 
> For coherent DMA we can always observe the C bit.  But for the 
> incoherent DMA
> case, our store to clear the EL bit may overwrite the dma from the 
> device to
> the beginning of the packet, or the write to EOF, F, and size, and/or the
> write to C, OK, and status bits to tell us its done.  In the worst case, we
> would overwrite the beginning of the data but catch the C bit and even the
> actual size, and therefore would receive corrupted data.
> 
> We can only detect the hardware went RNR when it does so or decide we 
> won the
> race when it receives and completes the next frame.
Yes, I agree.

>> When we find a buffer that is not completed but has the el-bit set, we 
>> read the status byte of the status control block to see if the RU is 
>> in the no resources state.  If it isn't, it means that we found that 
>> buffer  before the hardware did and thus need to wait for it.  We will 
>> either find it on the next poll or enable interrupts and get told 
>> about it by hardware.
>>
>> What do you think?
> 
> I think the second part is good ...
Cool.  That part seemed to work well in my tests.

I will reply to your next mail to discuss your plan so that I get it all 
in one message.
-Ack

  parent reply	other threads:[~2007-05-24 12:42 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
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 [this message]
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=46558896.9070505@roinet.com \
    --to=dacker@roinet.com \
    --cc=auke-jan.h.kok@intel.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).