numam-dpdk/lib
Mattias Rönnblom 1c9a7fba5c net: accept unaligned data in checksum routines
__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: 6006818cfb ("net: new checksum functions")
Cc: stable@dpdk.org

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2022-09-20 18:09:42 +02:00
..
acl version: 22.11-rc0 2022-07-21 12:13:48 +02:00
bbdev version: 22.11-rc0 2022-07-21 12:13:48 +02:00
bitratestats version: 22.11-rc0 2022-07-21 12:13:48 +02:00
bpf version: 22.11-rc0 2022-07-21 12:13:48 +02:00
cfgfile version: 22.11-rc0 2022-07-21 12:13:48 +02:00
cmdline version: 22.11-rc0 2022-07-21 12:13:48 +02:00
compressdev lib: document free functions 2022-06-24 14:50:34 +02:00
cryptodev version: 22.11-rc0 2022-07-21 12:13:48 +02:00
distributor version: 22.11-rc0 2022-07-21 12:13:48 +02:00
dmadev remove passive voice in function description 2022-06-24 14:05:54 +02:00
eal version: 22.11-rc0 2022-07-21 12:13:48 +02:00
efd version: 22.11-rc0 2022-07-21 12:13:48 +02:00
ethdev version: 22.11-rc0 2022-07-21 12:13:48 +02:00
eventdev version: 22.11-rc0 2022-07-21 12:13:48 +02:00
fib version: 22.11-rc0 2022-07-21 12:13:48 +02:00
flow_classify lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
gpudev gpudev: remove unneeded header includes 2022-06-21 16:46:56 +02:00
graph graph: remove useless duplicate name check 2022-03-07 20:31:14 +01:00
gro version: 22.11-rc0 2022-07-21 12:13:48 +02:00
gso version: 22.11-rc0 2022-07-21 12:13:48 +02:00
hash version: 22.11-rc0 2022-07-21 12:13:48 +02:00
ip_frag ip_frag: add IPv4 fragment copy 2022-08-29 16:24:18 +02:00
ipsec version: 22.11-rc0 2022-07-21 12:13:48 +02:00
jobstats version: 22.11-rc0 2022-07-21 12:13:48 +02:00
kni version: 22.11-rc0 2022-07-21 12:13:48 +02:00
kvargs version: 22.11-rc0 2022-07-21 12:13:48 +02:00
latencystats version: 22.11-rc0 2022-07-21 12:13:48 +02:00
lpm version: 22.11-rc0 2022-07-21 12:13:48 +02:00
mbuf version: 22.11-rc0 2022-07-21 12:13:48 +02:00
member version: 22.11-rc0 2022-07-21 12:13:48 +02:00
mempool version: 22.11-rc0 2022-07-21 12:13:48 +02:00
meter version: 22.11-rc0 2022-07-21 12:13:48 +02:00
metrics version: 22.11-rc0 2022-07-21 12:13:48 +02:00
net net: accept unaligned data in checksum routines 2022-09-20 18:09:42 +02:00
node lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pcapng pcapng: fix timestamp wrapping in output files 2022-06-01 16:39:25 +02:00
pci version: 22.11-rc0 2022-07-21 12:13:48 +02:00
pdump version: 22.11-rc0 2022-07-21 12:13:48 +02:00
pipeline pipeline: add API for shared library-based pipeline build 2022-09-15 17:46:09 +02:00
port version: 22.11-rc0 2022-07-21 12:13:48 +02:00
power version: 22.11-rc0 2022-07-21 12:13:48 +02:00
rawdev version: 22.11-rc0 2022-07-21 12:13:48 +02:00
rcu version: 22.11-rc0 2022-07-21 12:13:48 +02:00
regexdev build: hide local symbols in shared libraries 2022-03-08 15:22:33 +01:00
reorder version: 22.11-rc0 2022-07-21 12:13:48 +02:00
rib version: 22.11-rc0 2022-07-21 12:13:48 +02:00
ring version: 22.11-rc0 2022-07-21 12:13:48 +02:00
sched sched: enable congestion management at runtime 2022-08-25 16:18:06 +02:00
security version: 22.11-rc0 2022-07-21 12:13:48 +02:00
stack version: 22.11-rc0 2022-07-21 12:13:48 +02:00
table version: 22.11-rc0 2022-07-21 12:13:48 +02:00
telemetry version: 22.11-rc0 2022-07-21 12:13:48 +02:00
timer version: 22.11-rc0 2022-07-21 12:13:48 +02:00
vhost vhost: stop using mempool for IOTLB cache 2022-09-15 17:56:24 +02:00
meson.build build: add definitions for use as Meson subproject 2022-06-07 20:49:20 +02:00