[U-Boot] [PATCH] net: Mark the ip_udp_hdr struct as packed

Joe Hershberger joe.hershberger at ni.com
Wed Jul 19 18:14:23 UTC 2017


On Wed, Jul 12, 2017 at 9:34 AM, Maxime Ripard
<maxime.ripard at free-electrons.com> wrote:
> The -mno-unaligned-access flag used on ARM to prevent GCC from generating
> unaligned accesses (obviously) will only do so on packed structures.
>
> It seems like gcc 7.1 is a bit stricter than previous gcc versions on this,
> and using it lead to data abort for unaligned accesses when generating
> network traffic.
>
> Fix this by adding the packed attribute to the ip_udp_hdr structure in
> order to let GCC do its job.
>
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>

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


More information about the U-Boot mailing list