Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-16 Thread Georg Sauthoff
Hello, On Sat, Oct 16, 2021 at 10:21:03AM +0200, Morten Brørup wrote: > I have given this some more thoughts. > > Most bytes transferred in real life are transferred in large packets, > so faster processing of large packets is a great improvement! > > Furthermore, a quick analysis of a recent pa

Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-16 Thread Georg Sauthoff
Hello, On Fri, Oct 15, 2021 at 04:39:02PM +0200, Olivier Matz wrote: > On Sat, Sep 18, 2021 at 01:49:30PM +0200, Georg Sauthoff wrote: > > That means a superfluous cast is removed and aliasing through a uint8_t > > pointer is eliminated. Note that uint8_t doesn't have the same > > strict-aliasing

Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-16 Thread Morten Brørup
x27;; 'Ferruh Yigit'; 'Olivier Matz'; 'Thomas Monjalon'; > 'David Marchand' > Subject: RE: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum > computation > > Geoff, > > I have given this some more thoughts. > > Most bytes t

Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-16 Thread Morten Brørup
Geoff, I have given this some more thoughts. Most bytes transferred in real life are transferred in large packets, so faster processing of large packets is a great improvement! Furthermore, a quick analysis of a recent packet sample from an ISP customer of ours shows that less than 8 % of the

Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-15 Thread Olivier Matz
Hi Georg, On Sat, Sep 18, 2021 at 01:49:30PM +0200, Georg Sauthoff wrote: > That means a superfluous cast is removed and aliasing through a uint8_t > pointer is eliminated. Note that uint8_t doesn't have the same > strict-aliasing properties as unsigned char. Interesting. Out of curiosity, do you

Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-14 Thread Morten Brørup
> -Original Message- > From: Ferruh Yigit [mailto:ferruh.yi...@intel.com] > Sent: Thursday, 14 October 2021 19.20 > > On 9/18/2021 12:49 PM, Georg Sauthoff wrote: > > That means a superfluous cast is removed and aliasing through a > uint8_t > > pointer is eliminated. Note that uint8_t does

Re: [dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-10-14 Thread Ferruh Yigit
On 9/18/2021 12:49 PM, Georg Sauthoff wrote: That means a superfluous cast is removed and aliasing through a uint8_t pointer is eliminated. Note that uint8_t doesn't have the same strict-aliasing properties as unsigned char. Also simplified the loop since a modern C compiler can speed up (i.e. a

[dpdk-dev] [PATCH 1/1] net: fix aliasing issue in checksum computation

2021-09-18 Thread Georg Sauthoff
That means a superfluous cast is removed and aliasing through a uint8_t pointer is eliminated. Note that uint8_t doesn't have the same strict-aliasing properties as unsigned char. Also simplified the loop since a modern C compiler can speed up (i.e. auto-vectorize) it in a similar way. For example