aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2018-08-23 17:13:15 -0700
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-15 17:14:57 -0800
commit17d18793b97e325cd03834a14153df2e39dbb253 (patch)
tree6833486bab4f4cc0d4440b8b024be6ff2648b23c /host/tests/CMakeLists.txt
parentd2adc9bfdf72d1830d748c411ac9b2b43ebe740b (diff)
downloaduhd-17d18793b97e325cd03834a14153df2e39dbb253.tar.gz
uhd-17d18793b97e325cd03834a14153df2e39dbb253.tar.bz2
uhd-17d18793b97e325cd03834a14153df2e39dbb253.zip
tests: Add unit test for DPDK transport
This commit adds a loopback benchmark for a PC with 2 DPDK-compatible NIC ports that are connected together via a cable. It sends messages with embedded sequence numbers (outgoing and last-seen) for maintaining a flow control window of packets in flight. It tracks the number of bytes sent/received and reports the time the test took and average throughput.
Diffstat (limited to 'host/tests/CMakeLists.txt')
-rw-r--r--host/tests/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt
index 1711d0ab2..9eb48eedb 100644
--- a/host/tests/CMakeLists.txt
+++ b/host/tests/CMakeLists.txt
@@ -106,6 +106,20 @@ foreach(benchmark_source ${benchmark_sources})
endforeach(benchmark_source)
# Other tests that don't directly link with libuhd: (TODO find a nicer way to do this)
+if(ENABLE_DPDK)
+ include_directories(${CMAKE_BINARY_DIR}/lib/transport/)
+ include_directories(${CMAKE_SOURCE_DIR}/lib/transport/)
+ find_package(DPDK)
+ include_directories(${DPDK_INCLUDE_DIR})
+ add_executable(dpdk_test
+ dpdk_test.cpp
+ ${CMAKE_SOURCE_DIR}/lib/transport/dpdk_zero_copy.cpp
+ )
+ target_link_libraries(dpdk_test uhd ${Boost_LIBRARIES} ${DPDK_LIBRARIES})
+ # For the DPDK test, don't automatically run (requires specific config)
+ UHD_INSTALL(TARGETS dpdk_test RUNTIME DESTINATION ${PKG_LIB_DIR}/tests COMPONENT tests)
+ENDIF(ENABLE_DPDK)
+
include_directories(${CMAKE_BINARY_DIR}/lib/rfnoc/nocscript/)
include_directories(${CMAKE_SOURCE_DIR}/lib/rfnoc/nocscript/)
add_executable(nocscript_expr_test