netdev
[Top] [All Lists]

Re: RFR: new SiS gige driver

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: RFR: new SiS gige driver
From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Date: Sat, 09 Aug 2003 11:10:45 -0700
Cc: Andi Kleen <ak@xxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <3F350CC8.3090605@pobox.com>
Organization: Candela Technologies
References: <20030808173932.GA4077@gtf.org> <20030809141533.GB4539@wotan.suse.de> <3F350CC8.3090605@pobox.com>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030718
Jeff Garzik wrote:
Andi Kleen wrote:

* 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)



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?

Ben


-- Ben Greear <greearb@xxxxxxxxxxxxxxx> Candela Technologies Inc http://www.candelatech.com



<Prev in Thread] Current Thread [Next in Thread>