net/mlx: allow build only on Linux

Message ID 20190708071804.15167-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx: allow build only on Linux |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation fail apply issues

Commit Message

Thomas Monjalon July 8, 2019, 7:18 a.m. UTC
  Currently mlx4/mlx5 support only Linux.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/mlx4/meson.build | 11 +++++++++--
 drivers/net/mlx5/meson.build | 10 +++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)
  

Comments

Bruce Richardson July 8, 2019, 9:16 a.m. UTC | #1
On Mon, Jul 08, 2019 at 09:18:04AM +0200, Thomas Monjalon wrote:
> Currently mlx4/mlx5 support only Linux.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  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 5de04b70b..028cd97fa 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
> +

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Matan Azrad July 8, 2019, 10:08 a.m. UTC | #2
From: Thomas Monjalon <thomas@monjalon.net>
> Currently mlx4/mlx5 support only Linux.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@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 5de04b70b..028cd97fa 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 326d1a369..3eff22e4d 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
> --
> 2.21.0
  
Raslan Darawsheh July 8, 2019, 11:31 a.m. UTC | #3
Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Thomas Monjalon
> Sent: Monday, July 8, 2019 10:18 AM
> To: Matan Azrad <matan@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Yongseok Koh <yskoh@mellanox.com>; Slava
> Ovsiienko <viacheslavo@mellanox.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx: allow build only on Linux
> 
> Currently mlx4/mlx5 support only Linux.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  drivers/net/mlx4/meson.build | 11 +++++++++--
>  drivers/net/mlx5/meson.build | 10 +++++++++-
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 

Patch applied to next-net-mlx,

Kindest regards
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 5de04b70b..028cd97fa 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 326d1a369..3eff22e4d 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