From: "Randy.Dunlap" <[EMAIL PROTECTED]>
Date: Mon, 15 May 2006 08:02:58 -0700

> > -#define    NETDEV_ALIGN            32
> > +#define    NETDEV_ALIGN            L1_CACHE_BYTES
> >  #define    NETDEV_ALIGN_CONST      (NETDEV_ALIGN - 1)
> 
> I don't know about the fixed value of 32, but if this patch is
> accepted, I'd prefer NETDEV_ALIGN_MASK instead of NETDEV_ALIGN_CONST.

The reason it's 32 is that old drivers depended on the
struct being at least 32-byte aligned because they would
embed structures DMA'd to/from the card in their private
area and just assumed that would be aligned enough for
the card's restrictions.

So setting it to L1_CACHE_BYTES would be wrong, because if
that happens to be less than 32 it would violate said
assumption which we are catering to.
-
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