lkml.org 
[lkml]   [2012]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] e1000: Reset rx ring index on receive overrun


On Thu, 17 May 2012, Samuel Thibault wrote:
> Brandeburg, Jesse, le Thu 17 May 2012 17:04:04 -0700, a écrit :
> > > BTW, it also happens easily when request_irq takes some time to
> > > complete: since we enable E1000_TCTL_EN before that, the card can have
> > > time to fill the ring before irqs are processed.
> >
> > I think there may well be a bug in the implementation in kvm. The
> > hardware doesn't have this bug.
>
> How does it avoid filling the ring? What is the purpose of the RXO flag
> if it does avoid them?

RXO is only used to let the driver know "information" that the rx fifo is
overflowing. As it turns out the flag isn't very useful and none of our
drivers currently use it for anything.

If the hardware fills all the available receive *descriptors* then the
hardware's RDH (head) register will advance all the way to the RDT (tail)
value. The tail always points one past the rx descriptors available to
hardware to use. RDH==RDT means there are no software provided
descriptors in the ring available to be used by the hardware. Our drivers
typically allow for 1-2 descriptors to be unused in the ring to help avoid
any confusion.

Hope this helps,
Jesse
\
 
 \ /
  Last update: 2012-05-18 03:01    [W:0.093 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site