[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78d1e5e1-30dd-e434-9656-2d2bab32956f@nelint.com>
Date: Sat, 24 Sep 2016 05:27:15 -0700
From: Eric Nelson <eric@...int.com>
To: David Miller <davem@...emloft.net>
Cc: edumazet@...gle.com, linux-arm-kernel@...ts.infradead.org,
netdev@...r.kernel.org, rmk+kernel@....linux.org.uk,
fugang.duan@....com, troy.kisky@...ndarydevices.com,
otavio@...ystems.com.br, cjb.sw.nospam@...il.com
Subject: Re: Alignment issues with freescale FEC driver
Hi David,
On 09/23/2016 07:43 PM, David Miller wrote:
> From: Eric Nelson <eric@...int.com>
> Date: Fri, 23 Sep 2016 10:33:29 -0700
>
>> Since the hardware requires longword alignment for its' DMA transfers,
>> aligning the IP header will require a memcpy, right?
>
> I wish hardware designers didn't do this.
>
> There is no conflict between DMA alignment and properly offseting
> the packet data by two bytes.
>
> All hardware designers have to do is allow 2 padding bytes to be
> emitted by the chip before the actual packet data.
>
Andrew Lunn pointed out that the hardware does support this,
and I just pushed a patch for the vendor kernel to the meta-freescale
mailing list:
https://lists.yoctoproject.org/pipermail/meta-freescale/2016-September/019228.html
> Then the longword or whatever DMA transfer alignment is met
> whilst still giving the necessary flexibility for where the
> packet data lands.
>
Right. A relatively small change fixes things right up.
Many thanks to Andrew for pointing this out and Russell for providing
the basis for my patch.
I'll re-work this for the up-stream kernel when I get out from
under a couple of unrelated things.
Powered by blists - more mailing lists