Subject: Re: [U-Boot] [PATCH 2/2] net: ping,arp: Fix cache alignment issues Message-ID: <099414db-a264-a3ac-8aae-fb8aa0d96...@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed
On 28.05.2018 08:33, Baruch Siach wrote: > From: Jon Nettleton <j...@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. > > This fixes occasional messages like: > > CACHE: Misaligned operation at range [3fc01082, 3fc010c2] > ___________________________________________________________________ This is not a good idea. I believe it should be implemented in the driver. Putting it in in the app code leads to confusionas to its purpose. Duncan Hare 714 931 7952 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot