From: Thomas Monjalon Date: Mon, 8 Jul 2019 07:18:04 +0000 (+0200) Subject: net/mlx: allow build only on Linux X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3dee3f1b52127fac8943cbcb08e11328ef666046;p=dpdk.git net/mlx: allow build only on Linux Currently mlx4/mlx5 support only Linux. Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index 5de04b70bb..028cd97fa5 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -2,6 +2,13 @@ # Copyright 2018 6WIND S.A. # Copyright 2018 Mellanox Technologies, Ltd +if not is_linux + build = false + reason = 'only supported on Linux' + subdir_done() +endif +build = true + pmd_dlopen = (get_option('ibverbs_link') == 'dlopen') LIB_GLUE_BASE = 'librte_pmd_mlx4_glue.so' LIB_GLUE_VERSION = '18.02.0' @@ -13,9 +20,9 @@ if pmd_dlopen '-DMLX4_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION), ] endif + libnames = [ 'mnl', 'mlx4', 'ibverbs' ] libs = [] -build = true foreach libname:libnames lib = dependency('lib' + libname, required:false) if not lib.found() @@ -28,7 +35,7 @@ foreach libname:libnames reason = 'missing dependency, "' + libname + '"' endif endforeach -# Compile PMD + if build allow_experimental_apis = true ext_deps += libs diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index 326d1a369b..3eff22e4df 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -2,6 +2,13 @@ # Copyright 2018 6WIND S.A. # Copyright 2018 Mellanox Technologies, Ltd +if not is_linux + build = false + reason = 'only supported on Linux' + subdir_done() +endif +build = true + pmd_dlopen = (get_option('ibverbs_link') == 'dlopen') LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so' LIB_GLUE_VERSION = '19.05.0' @@ -13,9 +20,9 @@ if pmd_dlopen '-DMLX5_GLUE_VERSION="@0@"'.format(LIB_GLUE_VERSION), ] endif + libnames = [ 'mlx5', 'ibverbs' ] libs = [] -build = true foreach libname:libnames lib = dependency('lib' + libname, required:false) if not lib.found() @@ -28,6 +35,7 @@ foreach libname:libnames reason = 'missing dependency, "' + libname + '"' endif endforeach + if build allow_experimental_apis = true ext_deps += libs