common/mlx5: use build configuration dictionary

Message ID 20221107163720.4157535-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series common/mlx5: use build configuration dictionary |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Thomas Monjalon Nov. 7, 2022, 4:37 p.m. UTC
  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@intel.com>
Signed-off-by: Thomas Monjalon <thomas@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(-)
  

Comments

Bruce Richardson Nov. 7, 2022, 5:07 p.m. UTC | #1
On Mon, Nov 07, 2022 at 05:37:20PM +0100, Thomas Monjalon wrote:
> 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@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
David Marchand Nov. 8, 2022, 7:51 a.m. UTC | #2
On Mon, Nov 7, 2022 at 5:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Reviewed-by: David Marchand <david.marchand@redhat.com>
  
David Marchand Nov. 14, 2022, 10:31 a.m. UTC | #3
On Tue, Nov 8, 2022 at 8:51 AM David Marchand <david.marchand@redhat.com> wrote:
>
> On Mon, Nov 7, 2022 at 5:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.
  

Patch

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