]> git.droids-corp.org - dpdk.git/commit
eal: cleanup lcore ID hand-over
authorDavid Marchand <david.marchand@redhat.com>
Tue, 5 Apr 2022 16:34:46 +0000 (18:34 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 14 Apr 2022 11:59:50 +0000 (13:59 +0200)
commit449e7dbc7b0c530354bd430950e456c4a1e0f7e4
treed8e0dff7a033f058a5cad37fc360fe4831ed2b83
parent26e426d064abbeb74b839dcc2e288eaf70c8223e
eal: cleanup lcore ID hand-over

So far, a worker thread has been using its thread_id to discover which
lcore has been assigned to it.

On the other hand, as noted by Tyler, the pthread API does not strictly
guarantee that a new thread won't start running eal_thread_loop before
pthread_create writes to &lcore_config[xx].thread_id.

Though all OS implementations supported in DPDK (recently) ensure this
property, it is more robust to have the main thread directly pass
the worker thread lcore.

Signed-off-by: David Marchand <david.marchand@redhat.com>
lib/eal/common/eal_thread.h
lib/eal/freebsd/eal.c
lib/eal/freebsd/eal_thread.c
lib/eal/linux/eal.c
lib/eal/linux/eal_thread.c
lib/eal/windows/eal.c
lib/eal/windows/eal_thread.c
lib/eal/windows/eal_windows.h