aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2023-12-01 14:18:54 +0100
committerAki Tomita <121511582+atomita-ni@users.noreply.github.com>2024-02-01 10:02:01 -0600
commit85e4b53a0d0715500a74db1f9b9cc234e5c6f4ef (patch)
tree17298bf6835172e3a1dad952dce7bb8c6454f8b3
parentci: add x440 streaming step (diff)
downloaduhd-85e4b53a0d0715500a74db1f9b9cc234e5c6f4ef.tar.xz
uhd-85e4b53a0d0715500a74db1f9b9cc234e5c6f4ef.zip
dpdk: 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>
-rw-r--r--host/lib/transport/uhd-dpdk/dpdk_io_service.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/transport/uhd-dpdk/dpdk_io_service.cpp b/host/lib/transport/uhd-dpdk/dpdk_io_service.cpp
index 4133697ea..89fe29041 100644
--- a/host/lib/transport/uhd-dpdk/dpdk_io_service.cpp
+++ b/host/lib/transport/uhd-dpdk/dpdk_io_service.cpp
@@ -267,7 +267,11 @@ int dpdk_io_service::_io_worker(void* arg)
char name[16];
snprintf(name, sizeof(name), "dpdk-io_%hu", (uint16_t)lcore_id);
+#if RTE_VER_YEAR >= 23
+ rte_thread_set_name(rte_thread_self(), name);
+#else
rte_thread_setname(pthread_self(), name);
+#endif
UHD_LOG_TRACE("DPDK::IO_SERVICE",
"I/O service thread '" << name << "' started on lcore " << lcore_id);