dpdk-fm10k/lib/librte_eal/linux
David Marchand 7d1af09e98 eal/linux: truncate thread name
pthread_setname_np refuses names larger than 16 bytes (\0 included).
Rather than return an error, truncate the name to this limit in the
rte_thread_setname helper.

Caught with ixgbe which creates control thread with name
"ixgbe-link-handler":

Configuring Port 0 (socket 0)
EAL: Cannot set name for ctrl thread
...
EAL: Cannot set name for ctrl thread

Port 0: link state change event
...
EAL: Cannot set name for ctrl thread

Port 0: link state change event

Note: before this change, the thread would keep its original name, which
meant in my test for the ixgbe handler either "dpdk-testpmd" or
"eal-intr-thread".

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2020-07-11 15:03:47 +02:00
..
include eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
eal.c eal: add lcore iterators 2020-07-08 14:41:06 +02:00
eal_alarm.c trace: add alarm tracepoints 2020-04-23 15:39:47 +02:00
eal_cpuflags.c eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
eal_debug.c eal: move OS common debug functions to single file 2020-06-24 11:02:29 +02:00
eal_dev.c eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
eal_hugepage_info.c eal: move OS common config objects 2020-06-30 00:02:53 +02:00
eal_interrupts.c eal/linux: use C11 atomics for interrupt status 2020-07-09 18:53:40 +02:00
eal_lcore.c eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
eal_log.c replace unused attributes 2020-04-16 18:30:58 +02:00
eal_memalloc.c eal: move OS common config objects 2020-06-30 00:02:53 +02:00
eal_memory.c eal: move OS common config objects 2020-06-30 00:02:53 +02:00
eal_thread.c eal/linux: truncate thread name 2020-07-11 15:03:47 +02:00
eal_timer.c eal: move OS common config objects 2020-06-30 00:02:53 +02:00
eal_vfio.c vfio: support VF token 2020-07-07 14:06:49 +02:00
eal_vfio.h eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
eal_vfio_mp_sync.c eal: move OS-specific sub-directories 2020-03-31 13:08:55 +02:00
Makefile eal: move OS common config objects 2020-06-30 00:02:53 +02:00
meson.build eal: add telemetry as dependency 2020-05-11 00:37:16 +02:00