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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc_avx512.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc_neon.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc_sse.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net_crc.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_esp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
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 lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_gre.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_gtp.h net: add extension header for GTP PSC 2021-09-28 12:34:58 +02:00
rte_higig.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_icmp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_ip.h net: fix aliasing in checksum computation 2021-10-18 18:15:58 +02:00
rte_mpls.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_net_crc.c log: register with standardized names 2021-05-11 15:17:55 +02:00
rte_net_crc.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_net.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_net.h net: promote IPv6 external headers skip API as stable 2021-10-13 12:57:12 +02:00
rte_sctp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_tcp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_udp.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rte_vxlan.h lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
version.map net: promote IPv6 external headers skip API as stable 2021-10-13 12:57:12 +02:00