[2/5] eal: set lcore config thread for lcore main
Checks
Commit Message
Set the lcore_config[].thread_id for lcore_main during initialization.
This allows the new rte_lcore_{set,get}_name() APIs to work with
lcore_main consistent with other worker lcores.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/eal/common/eal_common_thread.c | 3 +++
1 file changed, 3 insertions(+)
@@ -151,6 +151,9 @@ unsigned rte_socket_id(void)
/* acquire system unique id */
rte_gettid();
+ if (lcore_id == rte_get_main_lcore())
+ lcore_config[lcore_id].thread_id =
+ (pthread_t)(rte_thread_self()).opaque_id;
thread_update_affinity(cpuset);