diff mbox series

[ovs-dev,V4,1/3] acinclude: Include libverbs and libmlx5 when needed

Message ID 20190211113235.31681-2-elibr@mellanox.com
State Accepted
Delegated to: Ian Stokes
Headers show
Series Include libverbs and libmlx4/5 when needed | expand

Commit Message

Eli Britstein Feb. 11, 2019, 11:32 a.m. UTC
DPDK 18.11 uses libverbs and libmlx5 when MLX5 PMD is enabled.

This commit makes OVS to link to libverbs and libmlx5 when MLX5 PMD is
enabled on DPDK.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Asaf Penso <asafp@mellanox.com>
---
 acinclude.m4 | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Flavio Leitner Feb. 18, 2019, 2:27 p.m. UTC | #1
On Mon, Feb 11, 2019 at 01:32:33PM +0200, Eli Britstein wrote:
> DPDK 18.11 uses libverbs and libmlx5 when MLX5 PMD is enabled.
> 
> This commit makes OVS to link to libverbs and libmlx5 when MLX5 PMD is
> enabled on DPDK.
> 
> Signed-off-by: Eli Britstein <elibr@mellanox.com>
> Reviewed-by: Shahaf Shuler <shahafs@mellanox.com>
> Reviewed-by: Asaf Penso <asafp@mellanox.com>
> ---

This adds dependencies when a PMD is enabled and is not using dlopen,
which makes sense. I see no problems with the patchset.

Acked-by: Flavio Leitner <fbl@sysclose.org>
diff mbox series

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index c51af246a..f5a5948fc 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -296,6 +296,28 @@  AC_DEFUN([OVS_CHECK_DPDK], [
       [AC_SEARCH_LIBS([mnl_attr_put],[mnl],[],[AC_MSG_ERROR([unable to find libmnl, install the dependency package])])
        AC_DEFINE([DPDK_MNL], [1], [MLX5 PMD detected in DPDK.])])
 
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [
+          #include <rte_config.h>
+#if defined(RTE_LIBRTE_MLX5_PMD) && !defined(RTE_LIBRTE_MLX5_DLOPEN_DEPS)
+#error
+#endif
+        ], [])
+      ], [],
+      [AC_SEARCH_LIBS([mlx5dv_create_wq],[mlx5],[],[AC_MSG_ERROR([unable to find libmlx5, install the dependency package])])])
+
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [
+          #include <rte_config.h>
+#if defined(RTE_LIBRTE_MLX5_PMD) && !defined(RTE_LIBRTE_MLX5_DLOPEN_DEPS)
+#error
+#endif
+        ], [])
+      ], [],
+      [AC_SEARCH_LIBS([verbs_init_cq],[ibverbs],[],[AC_MSG_ERROR([unable to find libibverbs, install the dependency package])])])
+
     # On some systems we have to add -ldl to link with dpdk
     #
     # This code, at first, tries to link without -ldl (""),