[PATCH] common/mlx5: use build configuration dictionary
Thomas Monjalon
thomas at monjalon.net
Mon Nov 7 17:37:20 CET 2022
A recent commit added an explicit dependency check on common/mlx5.
For consistency, query dpdk_conf instead of the list of common drivers.
The lists *_drivers should be used only for printing.
Fixes: 3df380f61797 ("common/mlx5: fix disabling build")
Suggested-by: Bruce Richardson <bruce.richardson at intel.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
drivers/compress/mlx5/meson.build | 2 +-
drivers/crypto/mlx5/meson.build | 2 +-
drivers/net/mlx5/meson.build | 2 +-
drivers/regex/mlx5/meson.build | 2 +-
drivers/vdpa/mlx5/meson.build | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build
index 49ce3aff46..df4f79fa7e 100644
--- a/drivers/compress/mlx5/meson.build
+++ b/drivers/compress/mlx5/meson.build
@@ -9,7 +9,7 @@ endif
fmt_name = 'mlx5_compress'
deps += ['common_mlx5', 'eal', 'compressdev']
-if not ('mlx5' in common_drivers)
+if not dpdk_conf.has('RTE_COMMON_MLX5')
# avoid referencing undefined variables from common/mlx5
subdir_done()
endif
diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build
index 7521c4c671..7e32095695 100644
--- a/drivers/crypto/mlx5/meson.build
+++ b/drivers/crypto/mlx5/meson.build
@@ -9,7 +9,7 @@ endif
fmt_name = 'mlx5_crypto'
deps += ['common_mlx5', 'eal', 'cryptodev']
-if not ('mlx5' in common_drivers)
+if not dpdk_conf.has('RTE_COMMON_MLX5')
# avoid referencing undefined variables from common/mlx5
subdir_done()
endif
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index f1aab18f82..abd507bd88 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,7 +9,7 @@ if not (is_linux or is_windows)
endif
deps += ['hash', 'common_mlx5']
-if not ('mlx5' in common_drivers)
+if not dpdk_conf.has('RTE_COMMON_MLX5')
# avoid referencing undefined variables from common/mlx5
subdir_done()
endif
diff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build
index 70edc5b6da..87404101b9 100644
--- a/drivers/regex/mlx5/meson.build
+++ b/drivers/regex/mlx5/meson.build
@@ -8,7 +8,7 @@ if not is_linux
endif
deps += ['common_mlx5', 'eal', 'regexdev']
-if not ('mlx5' in common_drivers)
+if not dpdk_conf.has('RTE_COMMON_MLX5')
# avoid referencing undefined variables from common/mlx5
subdir_done()
endif
diff --git a/drivers/vdpa/mlx5/meson.build b/drivers/vdpa/mlx5/meson.build
index 54a4eac6f4..e224d1bcc9 100644
--- a/drivers/vdpa/mlx5/meson.build
+++ b/drivers/vdpa/mlx5/meson.build
@@ -8,7 +8,7 @@ if not is_linux
endif
deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched']
-if not ('mlx5' in common_drivers)
+if not dpdk_conf.has('RTE_COMMON_MLX5')
# avoid referencing undefined variables from common/mlx5
subdir_done()
endif
--
2.36.1
More information about the dev
mailing list