From 17d18793b97e325cd03834a14153df2e39dbb253 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Thu, 23 Aug 2018 17:13:15 -0700 Subject: 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. --- host/tests/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'host/tests/CMakeLists.txt') 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 -- cgit v1.2.3