diff options
| author | 童宗振 <[email protected]> | 2024-07-23 09:27:30 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-07-23 09:27:30 +0000 |
| commit | bdfd6cc86c7db57e3bd1968aca081f972e962d3d (patch) | |
| tree | eb2869319fd841ad7888fe80cc3eb70ae91f4ad6 /infra | |
| parent | f1a1d7fa5ff754e7b7df774852a25ef10e2a013c (diff) | |
Updata dpdk to 23
Diffstat (limited to 'infra')
| -rw-r--r-- | infra/CMakeLists.txt | 16 | ||||
| -rw-r--r-- | infra/include/common.h | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/infra/CMakeLists.txt b/infra/CMakeLists.txt index 79a3368..1674b97 100644 --- a/infra/CMakeLists.txt +++ b/infra/CMakeLists.txt @@ -13,36 +13,36 @@ target_link_libraries(infra rt libevent-static libevent-static-pthreads pthread target_include_directories(infra INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include/") add_executable(TestPacketParser test/TestPacketParser.cc) -target_link_libraries(TestPacketParser gtest_main infra z elf ibverbs mlx5 libevent-static libdpdk ${SYSTEMD_LIBRARIES}) +target_link_libraries(TestPacketParser gtest_main infra z elf ibverbs libevent-static libdpdk ${SYSTEMD_LIBRARIES}) target_include_directories(TestPacketParser PRIVATE include) add_executable(TestDistributer test/TestDistributer.cc) target_compile_definitions(TestDistributer PRIVATE -DTEST_PCAP_FILE_PREFIX=\"${CMAKE_CURRENT_SOURCE_DIR}/test/\") -target_link_libraries(TestDistributer gtest_main infra z elf ibverbs mlx5 libevent-static ${SYSTEMD_LIBRARIES} ${PCAP_LIBRARY} libdpdk) +target_link_libraries(TestDistributer gtest_main infra z elf ibverbs libevent-static ${SYSTEMD_LIBRARIES} ${PCAP_LIBRARY} libdpdk) target_include_directories(TestDistributer PRIVATE include) add_executable(TestVNode test/TestVNode.cc) -target_link_libraries(TestVNode infra z elf ibverbs mlx5 gtest ${SYSTEMD_LIBRARIES} libdpdk) +target_link_libraries(TestVNode infra z elf ibverbs gtest ${SYSTEMD_LIBRARIES} libdpdk) target_include_directories(TestVNode PRIVATE include) add_executable(TestPktClassifierEngine test/TestPktClassifierEngine.cc) -target_link_libraries(TestPktClassifierEngine infra z elf ibverbs mlx5 gtest ${SYSTEMD_LIBRARIES} libdpdk) +target_link_libraries(TestPktClassifierEngine infra z elf ibverbs gtest ${SYSTEMD_LIBRARIES} libdpdk) target_include_directories(TestPktClassifierEngine PRIVATE include) add_executable(TestSidList test/TestSidList.cc) -target_link_libraries(TestSidList infra z elf ibverbs mlx5 gtest_main ${SYSTEMD_LIBRARIES} libdpdk) +target_link_libraries(TestSidList infra z elf ibverbs gtest_main ${SYSTEMD_LIBRARIES} libdpdk) target_include_directories(TestSidList PRIVATE include) add_executable(TestLinkDb test/TestLinkDb.cc) -target_link_libraries(TestLinkDb infra z elf ibverbs mlx5 gtest_main ${SYSTEMD_LIBRARIES} libdpdk) +target_link_libraries(TestLinkDb infra z elf ibverbs gtest_main ${SYSTEMD_LIBRARIES} libdpdk) target_include_directories(TestLinkDb PRIVATE include) add_executable(TestPortAdapterMapping test/TestPortAdapterMapping.cc) -target_link_libraries(TestPortAdapterMapping infra z elf ibverbs mlx5 gtest_main ${SYSTEMD_LIBRARIES} libdpdk) +target_link_libraries(TestPortAdapterMapping infra z elf ibverbs gtest_main ${SYSTEMD_LIBRARIES} libdpdk) target_include_directories(TestPortAdapterMapping PRIVATE include) add_executable(TestDataPathTrace test/TestDataPathTrace.cc) -target_link_libraries(TestDataPathTrace gtest_main infra z elf ibverbs mlx5 libdpdk ${SYSTEMD_LIBRARIES}) +target_link_libraries(TestDataPathTrace gtest_main infra z elf ibverbs libdpdk ${SYSTEMD_LIBRARIES}) target_include_directories(TestDataPathTrace PRIVATE include) add_test(TestPacketParser TestPacketParser) diff --git a/infra/include/common.h b/infra/include/common.h index 2a0c919..881ee2d 100644 --- a/infra/include/common.h +++ b/infra/include/common.h @@ -6,6 +6,7 @@ extern "C" #include <assert.h> #include <ctype.h> #include <fcntl.h> +#include <pthread.h> #include <rte_branch_prediction.h> #include <rte_common.h> #include <rte_log.h> @@ -99,7 +100,7 @@ typedef uint32_t hash_t; (type *)((char *)__mptr - offsetof(type, member)); \ }) #else -#define container_of(ptr, type, member) ((type *)((char *)(ptr)-offsetof(type, member))) +#define container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member))) #endif #endif |
