From: David Marchand <david.marchand@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, "Robin Jarry" <rjarry@redhat.com>,
"Stephen Hemminger" <stephen@networkplumber.org>,
"Chengwen Feng" <fengchengwen@huawei.com>,
"Bruce Richardson" <bruce.richardson@intel.com>,
"Morten Brørup" <mb@smartsharesystems.com>
Subject: Re: [PATCH] net: fix IPv4 cksum simple function
Date: Wed, 6 Nov 2024 21:22:50 +0100 [thread overview]
Message-ID: <CAJFAV8yDvCRaQqyEb7_iuQuFqpPmFG-G66jpLQ_n0O6=uPwp8g@mail.gmail.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F877@smartserver.smartshare.dk>
On Tue, Nov 5, 2024 at 10:09 AM Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > From: David Marchand [mailto:david.marchand@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.marchand@redhat.com>
Applied, thanks.
--
David Marchand
next prev parent reply other threads:[~2024-11-06 20:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 8:59 David Marchand
2024-11-05 9:09 ` Morten Brørup
2024-11-05 9:27 ` David Marchand
2024-11-05 10:20 ` Morten Brørup
2024-11-05 10:49 ` David Marchand
2024-11-05 11:02 ` Bruce Richardson
2024-11-05 11:06 ` Morten Brørup
2024-11-05 13:12 ` David Marchand
2024-11-05 9:37 ` Robin Jarry
2024-11-05 9:53 ` Morten Brørup
2024-11-06 20:22 ` David Marchand [this message]
2024-11-05 10:18 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJFAV8yDvCRaQqyEb7_iuQuFqpPmFG-G66jpLQ_n0O6=uPwp8g@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=mb@smartsharesystems.com \
--cc=rjarry@redhat.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).