From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-gy0-f170.google.com (mail-gy0-f170.google.com [209.85.160.170]) by ozlabs.org (Postfix) with ESMTP id AB9B2B7D48 for ; Wed, 7 Apr 2010 03:55:04 +1000 (EST) Received: by gyf2 with SMTP id 2so55321gyf.15 for ; Tue, 06 Apr 2010 10:55:03 -0700 (PDT) MIME-Version: 1.0 Sender: glikely@secretlab.ca In-Reply-To: <7a42d507-bf50-40f3-a2a0-8de682b314d7@SG2EHSMHS017.ehs.local> References: <1270502993.9013.36.camel@edumazet-laptop> <7a42d507-bf50-40f3-a2a0-8de682b314d7@SG2EHSMHS017.ehs.local> From: Grant Likely Date: Tue, 6 Apr 2010 11:54:42 -0600 Message-ID: Subject: Re: [PATCH] [V3] Add non-Virtex5 support for LL TEMAC driver To: John Linn Content-Type: text/plain; charset=ISO-8859-1 Cc: Eric Dumazet , linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, John Tyner , michal.simek@petalogix.com, john.williams@petalogix.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Apr 5, 2010 at 3:33 PM, John Linn wrote: > From: Eric Dumazet [mailto:eric.dumazet@gmail.com] >> > +/* Align the IP data in the packet on word boundaries as MicroBlaze >> > + * needs it. >> > + */ >> > + >> > =A0#define XTE_ALIGN =A0 =A0 =A0 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 t= o 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.