Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-06 Thread David Marchand
On Tue, Nov 5, 2024 at 10:09 AM Morten Brørup 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/

Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread David Marchand
On Tue, Nov 5, 2024 at 12:08 PM Bruce Richardson wrote: > > On Tue, Nov 05, 2024 at 11:49:52AM +0100, David Marchand wrote: > > On Tue, Nov 5, 2024 at 11:20 AM Morten Brørup > > wrote: > > > > But there is still the question of packed structures with MSVC. > > > > Tyler proposal seemed to rely o

RE: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Morten Brørup
> From: Bruce Richardson [mailto:bruce.richard...@intel.com] > Sent: Tuesday, 5 November 2024 12.03 > > On Tue, Nov 05, 2024 at 11:49:52AM +0100, David Marchand wrote: > > On Tue, Nov 5, 2024 at 11:20 AM Morten Brørup > wrote: > > > > But there is still the question of packed structures with MSVC

Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Bruce Richardson
On Tue, Nov 05, 2024 at 11:49:52AM +0100, David Marchand wrote: > On Tue, Nov 5, 2024 at 11:20 AM Morten Brørup > wrote: > > > But there is still the question of packed structures with MSVC. > > > Tyler proposal seemed to rely on the current __rte_packed conventional > > > position. > > > https:/

Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread David Marchand
On Tue, Nov 5, 2024 at 11:20 AM Morten Brørup wrote: > > But there is still the question of packed structures with MSVC. > > Tyler proposal seemed to rely on the current __rte_packed conventional > > position. > > https://patchwork.dpdk.org/project/dpdk/patch/1713225913-20792-2-git- > > send-emai

RE: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Morten Brørup
> From: David Marchand [mailto:david.march...@redhat.com] > Sent: Tuesday, 5 November 2024 10.28 > > On Tue, Nov 5, 2024 at 10:09 AM Morten Brørup > wrote: > > > diff --git a/lib/net/rte_ip4.h b/lib/net/rte_ip4.h > > > index 4dd0058cc5..f9b832 100644 > > > --- a/lib/net/rte_ip4.h > > > +++ b/

Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Bruce Richardson
On Tue, Nov 05, 2024 at 09:59:11AM +0100, David Marchand wrote: > 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 u

RE: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Morten Brørup
> From: Robin Jarry [mailto:rja...@redhat.com] > Sent: Tuesday, 5 November 2024 10.37 > > Morten Brørup, Nov 05, 2024 at 10:09: > > For consistency, could one of you - David or Robin - please also > > 2-byte align the IPv6 header structure? > > I can send a patch but I wonder if this is really ne

Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Robin Jarry
Morten Brørup, Nov 05, 2024 at 10:09: For consistency, could one of you - David or Robin - please also 2-byte align the IPv6 header structure? I can send a patch but I wonder if this is really necessary after the RC-1 has passed? We don't have any gcc warning related to IPv6 unaligned access

Re: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread David Marchand
On Tue, Nov 5, 2024 at 10:09 AM Morten Brørup wrote: > > diff --git a/lib/net/rte_ip4.h b/lib/net/rte_ip4.h > > index 4dd0058cc5..f9b832 100644 > > --- a/lib/net/rte_ip4.h > > +++ b/lib/net/rte_ip4.h > > @@ -39,7 +39,7 @@ extern "C" { > > /** > > * IPv4 Header > > */ > > -struct rte_ipv4

RE: [PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread Morten Brørup
> 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:19

[PATCH] net: fix IPv4 cksum simple function

2024-11-05 Thread David Marchand
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_uint