in dpdk 17.05 struct lcore_config is public and pthread_t can get by lcore_config[lcore_id].thread_id in 18.11 struct lcore_config is private, how can I get pthread_t for lcore_id?
Problem - I can't set thread name with pthread_setname_np(<pthread_here>, "my_thread_name");
rte_gettid()
returns int
but I need pthread_t
in DPDK
rte_lcore.h
the APIrte_thread_setname
is responsible for setting alternate name rather than DPDK assigned name. In Linux DPDK internally invokespthread_setname_np
.DPDK version: dpdk-stable-18.11.10 [edit-1] as per the DPDK code base setname if you have glbc > 2.12 glibc version: Ubuntu GLIBC 2.30-0ubuntu2.2
Code modified in C file:
CFLAGS added to Makefile:
or build using
EXTRA_CFLAGS=-DALLOW_EXPERIMENTAL_API make
After invoking