Thread (9 messages) flat view 9 messages, 5 authors, 2003-08-13

Re: RFR: new SiS gige driver

From: Jeff Garzik <hidden>
Date: 2003-08-13 18:52:15

Ben Greear wrote:
Jeff Garzik wrote:
quoted
Andi Kleen wrote:
quoted
* netif_stop_queue in hard_start_xmit is not protected against the 
interrupt by the spinlock. That's racy, isn't it?


Shouldn't be, if done right.  If the interrupt runs a TX completion 
cycle, it will run the code
    if (work_done && netif_queue_stopped(dev))
        netif_wake_queue(dev)
quoted
Since ->hard_start_xmit is guaranteed never to be called if the queue 
is stopped, you also guaranteed that netif_wake_queue and 
->hard_start_xmit are mutually exclusive.

Is this really guaranteed?  What if the queue is stopped between the check
to see if it's stopped and the call to hard_start_xmit?

Actually, a slight correction (something I forgot):  the atomicity is 
provided by the bitops already so the netif_queue_stopped check isn't 
needed.

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