[U-Boot] [PATCH v2 2/2] net: ping, arp: Fix cache alignment issues

Joe Hershberger joe.hershberger at ni.com
Fri Jun 8 20:55:26 UTC 2018


On Wed, May 30, 2018 at 12:52 AM, Baruch Siach <baruch at tkos.co.il> wrote:
> From: Jon Nettleton <jon at solid-run.com>
>
> Both ping_receive and arp_receive would transmit a received packet
> back out using its original point.  This causes problems with
> certain network cards that add a custom header to the packet.
> Specifically the mvneta driver for the Armada series boards has
> a 2 byte Marvell header that is bypassed and passed along to
> the system, but that 2 byte offset now causes a misalignment if
> it is attempted to be sent back out.
>
> Rather than changing the driver to memcpy all the received packets
> to cache aligned buffers we instead change the two offending
> network commands to copy the packet into a cache aligned net_tx_packet
> before sending it back out.

It seems reasonable to make these match the rest of the network commands.

> This fixes occasional messages like:
>
>   CACHE: Misaligned operation at range [3fc01082, 3fc010c2]
>
> Reviewed-by: Stefan Roese <sr at denx.de>
> Signed-off-by: Jon Nettleton <jon at solid-run.com>
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
> ---

Acked-by: Joe Hershberger <joe.hershberger at ni.com>


More information about the U-Boot mailing list