Thread (9 messages) 9 messages, 4 authors, 2015-02-22

Re: 1e918876 breaks r8169 (linux-3.18+)

flat view

From: Eric Dumazet <hidden>
Date: 2015-02-21 18:09:07
Also in: lkml

On Sat, 2015-02-21 at 18:46 +0100, Florian Westphal wrote:
Eric Dumazet [off-list ref] wrote:
quoted
Hold on.

I believe there is one race in the way you access skb->xmit_more _after_

txd->opts1 = cpu_to_le32(status);

After this point, TX might have completed and TX completion already have
freed skb
Hmm, I _thought_ HW would not start xmit of this descriptor/skb until after

RTL_W8(TxPoll, NPQ);
Note this 'kick' does not provide tail ptr.

NIC basically looks at TX descriptors to find ones with the DescOwn bit
set. It stops when if find one TX descriptor _without_ DescOwn.

So what can happen here is the NIC was kicked earlier (prior transmit),
but found your TX descriptor, before you got a chance to read
skb->xmit_more

This is why we have these wmb() everywhere. We want to do

txd->opts1 = XXX

Only when we are really ready.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help