numam-dpdk/lib
Stanislaw Kardach 1abb185d6c stack: allow lock-free only on relevant architectures
Since commit 7911ba0473 ("stack: enable lock-free implementation for
aarch64"), lock-free stack is supported on arm64 but this description was
missing from the doxygen for the flag.

Currently it is impossible to detect programmatically whether lock-free
implementation of rte_stack is supported. One could check whether the
header guard for lock-free stubs is defined (_RTE_STACK_LF_STUBS_H_) but
that's an unstable implementation detail. Because of that currently all
lock-free ring creations silently succeed (as long as the stack header
is 16B long) which later leads to push and pop operations being NOPs.
The observable effect is that stack_lf_autotest fails on platforms not
supporting the lock-free. Instead it should just skip the lock-free test
altogether.

This commit adds a new errno value (ENOTSUP) that may be returned by
rte_stack_create() to indicate that a given combination of flags is not
supported on a current platform.
This is detected by checking a compile-time flag in the include logic in
rte_stack_lf.h which may be used by applications to check the lock-free
support at compile time.

Use the added RTE_STACK_LF_SUPPORTED flag to disable the lock-free stack
tests at the compile time.
Perf test doesn't fail because rte_ring_create() succeeds, however
marking this test as skipped gives a better indication of what actually
was tested.

Fixes: 7911ba0473 ("stack: enable lock-free implementation for aarch64")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2021-05-03 18:46:15 +02:00
..
acl lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
bbdev lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
bitratestats lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
bpf lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
cfgfile lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
cmdline lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
compressdev lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
cryptodev lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
distributor lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
eal eal: add timespec_get shim 2021-04-21 23:32:13 +02:00
efd lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ethdev ethdev: add sanity checks in control APIs 2021-04-21 18:36:56 +02:00
eventdev lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
fib lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
flow_classify lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
graph lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
gro lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
gso lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
hash lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ip_frag ip_frag: fix fragmenting IPv4 packet with header option 2021-04-21 16:50:46 +02:00
ipsec lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
jobstats lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
kni lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
kvargs lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
latencystats lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
lpm lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
mbuf mbuf: mark offload flag as deprecated 2021-05-03 16:12:49 +02:00
member lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
mempool lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
meter lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
metrics lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
net lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
node lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
pci lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
pdump lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
pipeline lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
port lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
power lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rawdev lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rcu lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
regexdev lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
reorder lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
rib lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ring lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
sched sched: fix traffic class oversubscription parameter 2021-04-21 16:57:18 +02:00
security lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
stack stack: allow lock-free only on relevant architectures 2021-05-03 18:46:15 +02:00
table lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
telemetry telemetry: fix build on FreeBSD < 12.2 2021-04-21 20:07:59 +02:00
timer lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
vhost lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
meson.build lib: allow disabling optional libraries 2021-04-21 14:17:29 +02:00