Skip to content

Commit 0d5aed3

Browse files
committed
fix build with new DPDK 23.11
Since 23.03 rte_thread_setname was deprecated and in 23.11 it is gone. Adapt to the new name `rte_thread_set_name` See [1] for more. [1]: https://doc.dpdk.org/guides/rel_notes/release_23_11.html Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
1 parent 080b1ba commit 0d5aed3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

host/lib/transport/uhd-dpdk/dpdk_io_service.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ int dpdk_io_service::_io_worker(void* arg)
267267

268268
char name[16];
269269
snprintf(name, sizeof(name), "dpdk-io_%hu", (uint16_t)lcore_id);
270+
#if RTE_VER_YEAR >= 23
271+
rte_thread_set_name(rte_thread_self(), name);
272+
#else
270273
rte_thread_setname(pthread_self(), name);
274+
#endif
271275
UHD_LOG_TRACE("DPDK::IO_SERVICE",
272276
"I/O service thread '" << name << "' started on lcore " << lcore_id);
273277

0 commit comments

Comments
 (0)