[PATCH] [V3] Add non-Virtex5 support for LL TEMAC driver

Grant Likely grant.likely at secretlab.ca
Wed Apr 7 03:54:42 EST 2010


On Mon, Apr 5, 2010 at 3:33 PM, John Linn <John.Linn at xilinx.com> wrote:
> From: Eric Dumazet [mailto:eric.dumazet at gmail.com]
>> > +/* Align the IP data in the packet on word boundaries as MicroBlaze
>> > + * needs it.
>> > + */
>> > +
>> >  #define XTE_ALIGN       32
>> > -#define BUFFER_ALIGN(adr) ((XTE_ALIGN - ((u32) adr)) % XTE_ALIGN)
>> > +#define BUFFER_ALIGN(adr) ((34 - ((u32) adr)) % XTE_ALIGN)
>> >
>>
>> Very interesting way of doing this, but why such convoluted thing ?
>
> Grant might have insight into why this started this way, I just updated to help with MicroBlaze alignment.

It was that way in the code I received from Yoshio Kashiwagi and David
H. Lynch.  I have no problem with it being changed.

Personally I would probably write a followup patch to change this to
netdev_alloc_skb_ip_align(), just to keep changes logically separated.
 But I'm okay with it rolled into this patch also.

g.


More information about the Linuxppc-dev mailing list