1c9a7fba5c
__rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its
data through an uint16_t pointer, which allowed the compiler to assume
the data was 16-bit aligned. This in turn would, with certain
architectures and compiler flag combinations, result in code with SIMD
load or store instructions with restrictions on data alignment.
This patch keeps the old algorithm, but data is read using memcpy()
instead of direct pointer access, forcing the compiler to always
generate code that handles unaligned input. The __may_alias__ GCC
attribute is no longer needed.
The data on which the Internet checksum functions operates are almost
always 16-bit aligned, but there are exceptions. In particular, the
PDCP protocol header may (literally) have an odd size.
Performance impact seems to range from none to a very slight
regression.
Bugzilla ID: 1035
Fixes:
|
||
---|---|---|
.. | ||
meson.build | ||
net_crc_avx512.c | ||
net_crc_neon.c | ||
net_crc_sse.c | ||
net_crc.h | ||
rte_arp.c | ||
rte_arp.h | ||
rte_ecpri.h | ||
rte_esp.h | ||
rte_ether.c | ||
rte_ether.h | ||
rte_geneve.h | ||
rte_gre.h | ||
rte_gtp.h | ||
rte_higig.h | ||
rte_icmp.h | ||
rte_ip.h | ||
rte_l2tpv2.h | ||
rte_mpls.h | ||
rte_net_crc.c | ||
rte_net_crc.h | ||
rte_net.c | ||
rte_net.h | ||
rte_ppp.h | ||
rte_sctp.h | ||
rte_tcp.h | ||
rte_udp.h | ||
rte_vxlan.h | ||
version.map |