netdev
[Top] [All Lists]

Re: RFR: new SiS gige driver

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: RFR: new SiS gige driver
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Sat, 09 Aug 2003 11:01:28 -0400
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20030809141533.GB4539@wotan.suse.de>
Organization: none
References: <20030808173932.GA4077@gtf.org> <20030809141533.GB4539@wotan.suse.de>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk
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.

This of course assumes certain details about the driver implementation, which may be missing from that driver's TX completion handler :)

Thanks for your, and everybody else's comments.  They are being saved.

        Jeff




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