On Tue, Nov 5, 2024 at 10:09 AM Morten Brørup <m...@smartsharesystems.com> 
wrote:
>
> > From: David Marchand [mailto:david.march...@redhat.com]
> > Sent: Tuesday, 5 November 2024 09.59
> >
> > The new function breaks compilation with -Wcast-align.
> >
> > In file included from /home/runner/work/ovs/ovs/dpdk-
> > dir/include/rte_ip.h:9:
> > /home/runner/work/ovs/ovs/dpdk-dir/include/rte_ip4.h:191:10:
> >       error: cast from 'const uint8_t *' (aka 'const unsigned char *')
> >       to 'const unaligned_uint16_t *' (aka 'const unsigned short *')
> >       increases required alignment from 1 to 2 [-Werror,-Wcast-align]
> >         v16_h = (const unaligned_uint16_t *)&ipv4_hdr->version_ihl;
> >                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Fix this by aligning rte_ipv4_hdr to two bytes, and point at the start
> > of the structure rather than the first field (which happens to be 1
> > byte
> > large).
> >
> > Fixes: f9e1d67f237a ("net: add IPv4 cksum function for simple cases")
> >
> > Signed-off-by: David Marchand <david.march...@redhat.com>

Applied, thanks.


-- 
David Marchand

Reply via email to