RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-10-08 Thread Andy Duan
@pengutronix.de > Subject: Re: [PATCH 3/3] net: fec: align IP header in hardware > > Thanks for the feedback David, > > On 09/29/2016 04:07 AM, David Laight wrote: > > From: Eric Nelson > >> Sent: 28 September 2016 18:15 > >> On 09/28/2016 09:42 AM, David

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-10-03 Thread Eric Nelson
Hi Russell, On 10/01/2016 09:52 PM, Russell King - ARM Linux wrote: > On Fri, Sep 30, 2016 at 07:16:12AM -0700, Eric Nelson wrote: >> On ARM, the CPU can't handle misaligned memory cycles without >> taking an alignment fault and NET_IP_ALIGN is set to 2. > > Let's get this right... With Linux on

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-10-03 Thread David Laight
From: Russell King - ARM Linux > Sent: 01 October 2016 20:52 > On Fri, Sep 30, 2016 at 07:16:12AM -0700, Eric Nelson wrote: > > On ARM, the CPU can't handle misaligned memory cycles without > > taking an alignment fault and NET_IP_ALIGN is set to 2. > > Let's get this right... With Linux on MMU p

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-10-01 Thread Russell King - ARM Linux
On Fri, Sep 30, 2016 at 07:16:12AM -0700, Eric Nelson wrote: > On ARM, the CPU can't handle misaligned memory cycles without > taking an alignment fault and NET_IP_ALIGN is set to 2. Let's get this right... With Linux on MMU parts: On ARMv6+, unaligned memory cycles using the LDR, LDRH and corre

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-30 Thread Eric Nelson
Hi David, On 09/30/2016 06:49 AM, David Laight wrote: > From: Eric Nelson >> Sent: 30 September 2016 14:27 >> Thanks for the feedback David, >> >> On 09/29/2016 04:07 AM, David Laight wrote: >>> From: Eric Nelson Sent: 28 September 2016 18:15 On 09/28/2016 09:42 AM, David Laight wrote: >

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-30 Thread David Laight
From: Eric Nelson > Sent: 30 September 2016 14:27 > Thanks for the feedback David, > > On 09/29/2016 04:07 AM, David Laight wrote: > > From: Eric Nelson > >> Sent: 28 September 2016 18:15 > >> On 09/28/2016 09:42 AM, David Laight wrote: > >>> From: Eric Nelson > Sent: 26 September 2016 19:40

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-30 Thread Eric Nelson
Thanks for the feedback David, On 09/29/2016 04:07 AM, David Laight wrote: > From: Eric Nelson >> Sent: 28 September 2016 18:15 >> On 09/28/2016 09:42 AM, David Laight wrote: >>> From: Eric Nelson Sent: 26 September 2016 19:40 Hi David, On 09/26/2016 02:26 AM, David Laight wrot

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-29 Thread David Laight
From: Eric Nelson > Sent: 28 September 2016 18:15 > On 09/28/2016 09:42 AM, David Laight wrote: > > From: Eric Nelson > >> Sent: 26 September 2016 19:40 > >> Hi David, > >> > >> On 09/26/2016 02:26 AM, David Laight wrote: > >>> From: Eric Nelson > Sent: 24 September 2016 15:42 > The FEC r

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-28 Thread Eric Nelson
Thanks Russell, On 09/28/2016 10:25 AM, Russell King - ARM Linux wrote: > On Wed, Sep 28, 2016 at 10:14:52AM -0700, Eric Nelson wrote: >> Thanks David, >> >> On 09/28/2016 09:42 AM, David Laight wrote: >>> From reading this it seems that the effect of FEC_RACC_SHIFT16 is to >>> add two bytes of 'j

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-28 Thread Russell King - ARM Linux
On Wed, Sep 28, 2016 at 10:14:52AM -0700, Eric Nelson wrote: > Thanks David, > > On 09/28/2016 09:42 AM, David Laight wrote: > > From reading this it seems that the effect of FEC_RACC_SHIFT16 is to > > add two bytes of 'junk' to the start of every receive frame. > > That's right. Two bytes of jun

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-28 Thread Eric Nelson
Thanks David, On 09/28/2016 09:42 AM, David Laight wrote: > From: Eric Nelson >> Sent: 26 September 2016 19:40 >> Hi David, >> >> On 09/26/2016 02:26 AM, David Laight wrote: >>> From: Eric Nelson Sent: 24 September 2016 15:42 The FEC receive accelerator (RACC) supports shifting the data

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-28 Thread David Laight
From: Eric Nelson > Sent: 26 September 2016 19:40 > Hi David, > > On 09/26/2016 02:26 AM, David Laight wrote: > > From: Eric Nelson > >> Sent: 24 September 2016 15:42 > >> The FEC receive accelerator (RACC) supports shifting the data payload of > >> received packets by 16-bits, which aligns the pa

Re: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-26 Thread Eric Nelson
Hi David, On 09/26/2016 02:26 AM, David Laight wrote: > From: Eric Nelson >> Sent: 24 September 2016 15:42 >> The FEC receive accelerator (RACC) supports shifting the data payload of >> received packets by 16-bits, which aligns the payload (IP header) on a >> 4-byte boundary, which is, if not requ

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-26 Thread David Laight
From: Eric Nelson > Sent: 24 September 2016 15:42 > The FEC receive accelerator (RACC) supports shifting the data payload of > received packets by 16-bits, which aligns the payload (IP header) on a > 4-byte boundary, which is, if not required, at least strongly suggested > by the Linux networking l