Olof Johansson <[EMAIL PROTECTED]> : > On Mon, Jan 29, 2007 at 11:35:06PM +0100, Francois Romieu wrote: [...] > > - The driver does not contain a single SMP locking instruction but > > http://www.pasemi.com claims the platform to be multicore. > > Is the driver really designed to be lockless ? > > Unless I misunderstood something, NAPI drivers that don't set NETIF_F_LLTX > will have all locking taken care of by higher layers, no?
It is not necessarily _that_ simple (it would be cool though :o) ). For instance, what does prevent pasemi_mac_clean_tx() to be issued from IRQ context (pasemi_mac_tx_intr) and from the xmit handler (pasemi_mac_start_tx) at the same time ? [...] > > unsigned int is supposed to save some cycles on ppc. > > Who told you that? That's not true. Jon D Mason <[EMAIL PROTECTED]> on 25/08/2004 about ppc64 (not ppc, sorry). [...] > > > +#define DESCR(ring, i) ((ring)->desc[i % ((ring)->count)]) > > > +#define BUFF(ring, i) ((ring)->buffers[i % ((ring)->count)]) > > > +#define INFO(ring, i) ((ring)->desc_info[i % ((ring)->count)]) > > > > A bit ugly/obfuscating/name clash prone imvho. > > > > Use local variables ? > > I'm open for suggestions here, not sure how local variables will help though? struct pas_dma_xct_descr *desc = ring->desc[i % ring->count]; -- Ueimor - 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