On Sun, Aug 06, 2006 at 08:56:31PM -0700, Michael Chan wrote: > > > Because netif_queue_stopped is *not* a memory barrier, it can float > > above the assignment to tx_cons. So even though netif_stop_queue *is* > > a memory barrier on x86, the second BUFF_AVAIL test can still fail to > > see the updated index. > > > > The fix here is obviously to add a memory barrier in tg3_tx. > > You are absolutely right and I missed it. We should add a wmb() > after the tx_cons update in tg3_tx(). Thanks.
A wmb() only prevents stores from passing stores. We need to prevent a load from passing a store so you need a full memory barrier (smp_mb). 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