[PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency
Thomas Monjalon
thomas at monjalon.net
Sun Oct 30 01:17:10 CEST 2022
If the dependency common/mlx5 is explicitly disabled,
but net/mlx5 is not explictly disabled,
Meson will read the full recipe of net/mlx5
and will fail when accessing a variable from common/mlx5:
drivers/net/mlx5/meson.build:76:4: ERROR: Unknown variable "mlx5_config".
The solution is to stop parsing net/mlx5 if common/mlx5 is disabled.
The deps array must be defined before stopping, in order to automatically
disable the build of net/mlx5 and print the reason.
Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")
Reported-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
drivers/net/mlx5/meson.build | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index ff84448186..9a8eb0bc19 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,6 +9,10 @@ if not (is_linux or is_windows)
endif
deps += ['hash', 'common_mlx5']
+if not ('mlx5' in common_drivers)
+ # avoid referencing undefined variables from common/mlx5
+ subdir_done()
+endif
headers = files('rte_pmd_mlx5.h')
sources = files(
'mlx5.c',
--
2.36.1
More information about the dev
mailing list