dpdk-plugin icon indicating copy to clipboard operation
dpdk-plugin copied to clipboard

Compile DPDK in static?

Open tbarbette opened this issue 3 years ago • 2 comments

Hi all! Thanks for this superb plugin ! Would it be possible to link to DPDK statically. First, it's supposed to perform better, but then it would also fix some linking issues when using MLX5 driver.

zeek -i dpdk::auto
Found 1 queues
EAL: Detected CPU lcores: 32
EAL: Detected NUMA nodes: 1
EAL: Auto-detected process type: PRIMARY
EAL: Detected shared linkage of DPDK
EAL: /lib/x86_64-linux-gnu/libmlx5.so.1: version `MLX5_OFED' not found (required by /usr/local/lib/x86_64-linux-gnu/librte_common_mlx5.so.22)
EAL: FATAL: Cannot init plugins
EAL: Cannot init plugins
fatal error: Error with EAL initialization

Did you try mlx5 by any chance?

tbarbette avatar Jan 20 '22 16:01 tbarbette

Sure, I don't see why not. I took a stab at this originally, ran into some issues, and haven't circled back.

grigorescu avatar Jan 20 '22 23:01 grigorescu

I'd be happy to help but I don't understand this toolchain :) If you have pointers maybe? I guess that line should change : https://github.com/esnet/dpdk-plugin/blob/0e0a2d2a569cd95e80551fd9956cddbeb3aafecd/CMakeLists.txt#L11 It should be "pkg-config libdpdk --libs" actually to link all libs and with --static for static linking. But this command seems to take lib names, not compile flags...

tbarbette avatar Jan 21 '22 07:01 tbarbette