emmericp / MoonGen

MoonGen is a fully scriptable high-speed packet generator built on DPDK and LuaJIT. It can saturate a 10 Gbit/s connection with 64 byte packets on a single CPU core while executing user-provided Lua scripts for each packet. Multi-core support allows for even higher rates. It also features precise and accurate timestamping and rate control.
MIT License
1.05k stars 235 forks source link

A notice for anyone working on dpdk-19.05 branch and with Mellanox NIC #287

Open minhuw opened 4 years ago

minhuw commented 4 years ago

Refer to the guide of DPDK 19.05, mlx5 driver has a dependency on libmnl library, and it will not be embedded in rte_pmd_mlx5.a static library even if option CONFIG_RTE_IBVERBS_LINK_STATIC is set. In order to compile moongen or libmoon with --mlx5 option on dpdk-19.05 branch, it's neccessary to install libmnl mannually (maybe with the help of the system package manager) and link it to libmoon.

My workaround is simply adding a new line in the cmake config of libmoon to link mnl similar with ibverbs.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,7 @@ SET(DPDK_LIBS
 #Add Mellanox libraries if options are specified
 if(USE_MLX5 OR USE_MLX4)
        SET(DPDK_LIBS ${DPDK_LIBS} ibverbs)
+       SET(DPDK_LIBS ${DPDK_LIBS} mnl)
 endif()

Dependency on libmnl is removed on newer DPDK release, thus it's expected to be a temporary issue. As DPDK 19.05 is not a LTS version and is still not supported by the main branch of libmoon, I think a issue may be more suitable then a pull request and hope it help others meeting the same problems.