[ovs-dev] [PATCH] acinclude: Include libmnl when needed

Timothy Redaelli tredaelli at redhat.com
Fri Dec 14 10:45:20 UTC 2018


DPDK 18.11 uses libmnl when MLX5 PMD is enabled.

This commit makes OVS to link to libmnl when MLX5 PMD is enabled on
DPDK.

Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
---
 acinclude.m4 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index 6a02f6527..b4dfce371 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -287,6 +287,19 @@ AC_DEFUN([OVS_CHECK_DPDK], [
        [AC_DEFINE([DPDK_PDUMP], [1], [DPDK pdump enabled in OVS.])])
      ])
 
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [
+          #include <rte_config.h>
+#if RTE_LIBRTE_MLX5_PMD
+#error
+#endif
+        ], [])
+      ], [],
+      [AC_SEARCH_LIBS([mnl_attr_put],[mnl],[],[AC_MSG_ERROR([unable to find libmnl, install the dependency package])])
+       DPDK_EXTRA_LIB="-lmnl"
+       AC_DEFINE([DPDK_MNL], [1], [MLX5 PMD detected in DPDK.])])
+
     # On some systems we have to add -ldl to link with dpdk
     #
     # This code, at first, tries to link without -ldl (""),
-- 
2.19.1



More information about the dev mailing list