Stephen Hemminger
67ae5936c4
eal: fix lcore accessors for non-EAL threads
If rte_lcore_index() is asked to give the index of the current lcore (argument -1) and is called from a non-EAL thread then it would invalid result. The result would come lcore_config[-1].core_index which is some other data in the per-thread area. The resolution is to return -1 which is what rte_lcore_index() returns if handed an invalid lcore. Same issue existed with rte_lcore_to_cpu_id(). Bugzilla ID: 446 Fixes: 26cc3bbe4dc0 ("eal: add lcore accessors") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: David Marchand <david.marchand@redhat.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%