numam-dpdk/lib/net
Georg Sauthoff 24f1955d1e net: fix aliasing in checksum computation
That means a superfluous cast is removed and aliasing through a uint8_t
pointer is eliminated. NB: The C standard specifies that a unsigned char
pointer may alias while the C standard doesn't include such requirement
for uint8_t pointers.

Also simplified the loop since a modern C compiler can speed up (i.e.
auto-vectorize) it in a similar way. For example, GCC auto-vectorizes it
for Haswell using AVX registers while halving the number of instructions
in the generated code.

Fixes: 6006818cfb ("net: new checksum functions")
Fixes: e079655c41 ("net: fix build with gcc 4.4.7 and strict aliasing")
Cc: stable@dpdk.org

Signed-off-by: Georg Sauthoff <mail@gms.tf>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2021-10-18 18:15:58 +02:00
..
meson.build
net_crc_avx512.c
net_crc_neon.c
net_crc_sse.c
net_crc.h
rte_arp.c net: rename Ethernet header fields 2021-10-08 14:58:11 +02:00
rte_arp.h net: promote make rarp packet function to stable 2021-10-02 11:12:32 +02:00
rte_ecpri.h
rte_esp.h
rte_ether.c net: enable random address on Windows 2021-09-30 20:51:11 +02:00
rte_ether.h net: rename Ethernet header fields 2021-10-08 14:58:11 +02:00
rte_geneve.h
rte_gre.h
rte_gtp.h net: add extension header for GTP PSC 2021-09-28 12:34:58 +02:00
rte_higig.h
rte_icmp.h
rte_ip.h net: fix aliasing in checksum computation 2021-10-18 18:15:58 +02:00
rte_mpls.h
rte_net_crc.c
rte_net_crc.h
rte_net.c
rte_net.h net: promote IPv6 external headers skip API as stable 2021-10-13 12:57:12 +02:00
rte_sctp.h
rte_tcp.h
rte_udp.h
rte_vxlan.h
version.map net: promote IPv6 external headers skip API as stable 2021-10-13 12:57:12 +02:00