Thread (8 messages) flat view 8 messages, 3 authors, 2012-05-18

Re: [PATCH] e1000: Reset rx ring index on receive overrun

From: Brandeburg, Jesse <hidden>
Date: 2012-05-18 00:26:49
Also in: lkml


On Thu, 17 May 2012, Samuel Thibault wrote:
Brandeburg, Jesse, le Thu 17 May 2012 17:04:04 -0700, a écrit :
quoted
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help