Re: [PATCH 1/1] gianfar: fix a flooded alignment reports because of padding issue.

From: David Miller
Date: Tue Dec 05 2017 - 11:48:53 EST


From: Zumeng Chen <zumeng.chen@xxxxxxxxx>
Date: Mon, 4 Dec 2017 11:22:02 +0800

> According to LS1021A RM, the value of PAL can be set so that the start of the
> IP header in the receive data buffer is aligned to a 32-bit boundary. Normally,
> setting PAL = 2 provides minimal padding to ensure such alignment of the IP
> header.
>
> However every incoming packet's 8-byte time stamp will be inserted into the
> packet data buffer as padding alignment bytes when hardware time stamping is
> enabled.
>
> So we set the padding 8+2 here to avoid the flooded alignment faults:
>
> root@128:~# cat /proc/cpu/alignment
> User: 0
> System: 17539 (inet_gro_receive+0x114/0x2c0)
> Skipped: 0
> Half: 0
> Word: 0
> DWord: 0
> Multi: 17539
> User faults: 2 (fixup)
>
> Also shown when exception report enablement
...
> Signed-off-by: Zumeng Chen <zumeng.chen@xxxxxxxxx>

Applied.