[dpdk-stable] [18.11 7/7] net/mlx: allow build only on Linux
Kevin Traynor
ktraynor at redhat.com
Thu Jan 9 14:34:33 CET 2020
From: Thomas Monjalon <thomas at monjalon.net>
[ upstream commit 3dee3f1b52127fac8943cbcb08e11328ef666046 ]
Currently mlx4/mlx5 support only Linux.
Fixes: 39a7ab1c14e2 ("net/mlx4: remove dependency on libmnl in meson")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
drivers/net/mlx4/meson.build | 11 +++++++++--
drivers/net/mlx5/meson.build | 10 +++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 4145f5db3..ebad30a04 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -3,4 +3,11 @@
# Copyright 2018 Mellanox Technologies, Ltd
+if host_machine.system() != 'linux'
+ build = false
+ reason = 'only supported on Linux'
+ subdir_done()
+endif
+build = true
+
pmd_dlopen = get_option('enable_driver_mlx_glue')
LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so'
@@ -14,9 +21,9 @@ if pmd_dlopen
]
endif
+
libs = [
cc.find_library('mlx4', required:false),
cc.find_library('ibverbs', required:false),
]
-build = true
foreach lib:libs
if not lib.found()
@@ -24,5 +31,5 @@ foreach lib:libs
endif
endforeach
-# Compile PMD
+
if build
allow_experimental_apis = true
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 81965bddc..87b267a25 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -3,4 +3,11 @@
# Copyright 2018 Mellanox Technologies, Ltd
+if host_machine.system() != 'linux'
+ build = false
+ reason = 'only supported on Linux'
+ subdir_done()
+endif
+build = true
+
pmd_dlopen = get_option('enable_driver_mlx_glue')
LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'
@@ -14,4 +21,5 @@ if pmd_dlopen
]
endif
+
libs = [
cc.find_library('mnl', required:false),
@@ -19,5 +27,4 @@ libs = [
cc.find_library('ibverbs', required:false),
]
-build = true
foreach lib:libs
if not lib.found()
@@ -25,4 +32,5 @@ foreach lib:libs
endif
endforeach
+
if build
allow_experimental_apis = true
--
2.21.1
More information about the stable
mailing list