Skip to contentSkip to conversation

net/mlx: allow build only on Linux

PATCH In review Thomas Monjalon 4 participants 4 messages Jul 8, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx: allow build only on Linux

Currently mlx4/mlx5 support only Linux.

---
 drivers/net/mlx4/meson.build | 11 +++++++++--
 drivers/net/mlx5/meson.build | 10 +++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)
drivers/net/mlx4/meson.build +9 -2
index 5de04b70b..028cd97fa 100644
@@ -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
drivers/net/mlx5/meson.build +9 -1
index 326d1a369..3eff22e4d 100644
@@ -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
Signature · 1 line
2.21.0
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Thomas Monjalon

Currently mlx4/mlx5 support only Linux.

---
 drivers/net/mlx4/meson.build | 11 +++++++++--
 drivers/net/mlx5/meson.build | 10 +++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)
drivers/net/mlx4/meson.build +0 -0
index 5de04b70b..028cd97fa 100644

drivers/net/mlx4/meson.build line 11

Quoted 10 lines
drivers/net/mlx4/meson.build +7 -0
@@ -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 on v1 1/1
#2 lore raw
In reply to Thomas Monjalon

From: Thomas Monjalon <[email protected]>

Quoted 3 lines

Currently mlx4/mlx5 support only Linux.

Quoted 81 lines
 drivers/net/mlx4/meson.build | 11 +++++++++--
drivers/net/mlx5/meson.build | 10 +++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)
drivers/net/mlx4/meson.build +7 -0
index 5de04b70b..028cd97fa 100644
@@ -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'

drivers/net/mlx4/meson.build +1 -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

drivers/net/mlx4/meson.build +1 -1
 	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
drivers/net/mlx5/meson.build +7 -0
index 326d1a369..3eff22e4d 100644
@@ -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'

drivers/net/mlx5/meson.build +1 -1
@@ -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)
drivers/net/mlx5/meson.build +1 -1
 	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

#3 lore raw
In reply to Thomas Monjalon

Hi,

Quoted 9 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Thomas Monjalon
Sent: Monday, July 8, 2019 10:18 AM
To: Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Yongseok Koh <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]
Subject: [dpdk-dev] [PATCH] net/mlx: allow build only on Linux

Quoted 8 lines

Currently mlx4/mlx5 support only Linux.

---
 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