On Wed, May 31, 2006 at 12:08:18AM -0700, David Miller wrote:
> 
> I understand what you're saying.  What I'm talking about is that in
> net channel drivers we might go back to IRQ disabling locks again.

OK, let's assume that the TX completion will go back into the IRQ
handler.  I contend that we can still get by with a BH-disabling
xmit_lock.  This is how it would work:

The IRQ handler would look like

        if (!spin_trylock(&dev->xmit_lock)) {
                tasklet_schedule(&priv->tx_completion_tasklet);
                return;
        }

        handle_tx_completion();
        spin_unlock(&dev->xmit_lock);

Where the TX completion tasklet would simply do

        spin_lock(&dev->xmit_lock);
        handle_tx_completion();
        spin_unlock(&dev->xmit_lock);

What do you think?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to