From: Lukas Sismis Date: Thu, 25 May 2023 12:00:19 +0000 (+0200) Subject: dpdk: add linker flag for DPDK Bond library X-Git-Tag: suricata-7.0.0-rc2~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fee79ff3c4c7c4b63e816b6cccedf7b5be9a18c7;p=thirdparty%2Fsuricata.git dpdk: add linker flag for DPDK Bond library Header checking (AC_CHECK_HEADER) did not work as DPDK 19.11 included rte_eth_bond.h file even if net/bonding driver was disabled. However, it was still not available in ldconfig configuration. For this reason Bond PMD is checked with ldconfig tool. However when installing the DPDK library manually, the user needs to update the entries in ldconfig to be able to find the Bond PMD. Ticket: #6099 --- diff --git a/configure.ac b/configure.ac index 4d66c55d0a..77a90b88dc 100644 --- a/configure.ac +++ b/configure.ac @@ -1384,6 +1384,7 @@ ]) # DPDK support + enable_dpdk_bond_pmd="no" AC_ARG_ENABLE(dpdk, AS_HELP_STRING([--enable-dpdk], [Enable DPDK support [default=no]]), [enable_dpdk=$enableval],[enable_dpdk=no]) @@ -1415,6 +1416,23 @@ fi CFLAGS="${CFLAGS} `pkg-config --cflags libdpdk`" LIBS="${LIBS} -Wl,-R,`pkg-config --libs-only-L libdpdk | cut -c 3-` -lnuma `pkg-config --libs libdpdk`" + + if test ! -z "$(ldconfig -p | grep librte_net_bond)"; then + AC_DEFINE([HAVE_DPDK_BOND],[1],(DPDK Bond PMD support enabled)) + enable_dpdk_bond_pmd="yes" + LIBS="${LIBS} -lrte_net_bond" # 20.11+ + elif test ! -z "$(ldconfig -p | grep librte_pmd_bond)"; then + AC_DEFINE([HAVE_DPDK_BOND],[1],(DPDK Bond PMD support enabled)) + enable_dpdk_bond_pmd="yes" + LIBS="${LIBS} -lrte_pmd_bond" + else + echo + echo " WARNING: DPDK Bond PMD was not found on your system, " + echo " you will be unable to use DPDK Bond PMD." + echo " You can try to \"sudo ldconfig\" and reconfigure again" + echo " or compile and install DPDK with Bond support enabled." + echo + fi ]) # Netmap support @@ -2629,6 +2647,7 @@ SURICATA_BUILD_CONF="Suricata Configuration: Profiling rules enabled: ${enable_profiling_rules} Plugin support (experimental): ${plugin_support} + DPDK Bond PMD: ${enable_dpdk_bond_pmd} Development settings: Coccinelle / spatch: ${enable_coccinelle}