eal: initialize lcore and socket id
authorCunming Liang <cunming.liang@intel.com>
Tue, 17 Feb 2015 02:08:11 +0000 (10:08 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Feb 2015 19:22:39 +0000 (20:22 +0100)
commit3e10f2368a902e32685e116dcda7ce074829cd5c
tree6132433b1f711c3be527fc681e2aace9a911ed6b
parentb94580d6887eab82629cc6b4319a664ddd0de2fb
eal: initialize lcore and socket id

Set _lcore_id and _socket_id to (-1) by default.
For those non EAL thread, _lcore_id shall always be LCORE_ID_ANY.
The libraries using _lcore_id as index need to take care.
_socket_id always be SOCKET_ID_ANY until the thread changes the affinity
by rte_thread_set_affinity().

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_eal/bsdapp/eal/eal_thread.c
lib/librte_eal/common/include/rte_lcore.h
lib/librte_eal/linuxapp/eal/eal_thread.c