esnet / dpdk-plugin

Other
23 stars 13 forks source link

Compile DPDK in static? #2

Open tbarbette opened 2 years ago

tbarbette commented 2 years ago

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?

grigorescu commented 2 years ago

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

tbarbette commented 2 years ago

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...