eal: register non-EAL threads as lcores
authorDavid Marchand <david.marchand@redhat.com>
Mon, 6 Jul 2020 20:52:30 +0000 (22:52 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 8 Jul 2020 12:41:05 +0000 (14:41 +0200)
commit5c307ba2a5b14abb70dcc80a1283ba5a128262d9
treeae376f8b0bdb55de89dd3ffc43a1e0ad00447f0f
parenta837d5c5986d01bbeecdaae1b8ab248611dafcdd
eal: register non-EAL threads as lcores

DPDK allows calling some part of its API from a non-EAL thread but this
has some limitations.
OVS (and other applications) has its own thread management but still
want to avoid such limitations by hacking RTE_PER_LCORE(_lcore_id) and
faking EAL threads potentially unknown of some DPDK component.

Introduce a new API to register non-EAL thread and associate them to a
free lcore with a new NON_EAL role.
This role denotes lcores that do not run DPDK mainloop and as such
prevents use of rte_eal_wait_lcore() and consorts.

Multiprocess is not supported as the need for cohabitation with this new
feature is unclear at the moment.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
20 files changed:
MAINTAINERS
app/test/Makefile
app/test/autotest_data.py
app/test/meson.build
app/test/test_lcores.c [new file with mode: 0644]
doc/guides/howto/debug_troubleshoot.rst
doc/guides/prog_guide/env_abstraction_layer.rst
doc/guides/prog_guide/mempool_lib.rst
doc/guides/rel_notes/release_20_08.rst
lib/librte_eal/common/eal_common_lcore.c
lib/librte_eal/common/eal_common_proc.c
lib/librte_eal/common/eal_common_thread.c
lib/librte_eal/common/eal_memcfg.h
lib/librte_eal/common/eal_private.h
lib/librte_eal/freebsd/eal.c
lib/librte_eal/include/rte_lcore.h
lib/librte_eal/linux/eal.c
lib/librte_eal/rte_eal_version.map
lib/librte_eal/windows/eal.c
lib/librte_mempool/rte_mempool.h