diff mbox series

[ovs-dev] acinclude: Include libmnl when needed

Message ID 20181214104520.12971-1-tredaelli@redhat.com
State Accepted
Delegated to: Ian Stokes
Headers show
Series [ovs-dev] acinclude: Include libmnl when needed | expand

Commit Message

Timothy Redaelli Dec. 14, 2018, 10:45 a.m. UTC
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@redhat.com>
---
 acinclude.m4 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Stokes, Ian Dec. 17, 2018, 10:45 a.m. UTC | #1
On 12/14/2018 10:45 AM, Timothy Redaelli wrote:
> 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@redhat.com>

Thanks for this Timothy, seems straight forward and it seems to be a 
reported issue already on the discuss list so I've pushed this to master.

Thanks
Ian
diff mbox series

Patch

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 (""),