DPDK patches and discussions
 help / color / mirror / Atom feed
* DPDK main build is broken for me in net/mlx5 if I disable common/mlx5
@ 2022-10-29  9:05 Andrew Rybchenko
  2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Andrew Rybchenko @ 2022-10-29  9:05 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: dev, Thomas Monjalon, David Marchand

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

Hi,

DPDK main build is broken for me in net/mlx5 if I disable common/mlx5

../src/drivers/net/mlx5/meson.build:76:4: ERROR: Unknown variable 
"mlx5_config".

It worked for me before and net/mlx5 is not built since common driver is 
missing.

Andrew.

[-- Attachment #2: Type: text/html, Size: 508 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 0/2] fix build disabling common/mlx5
  2022-10-29  9:05 DPDK main build is broken for me in net/mlx5 if I disable common/mlx5 Andrew Rybchenko
@ 2022-10-29 23:17 ` Thomas Monjalon
  2022-10-29 23:17   ` [PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency Thomas Monjalon
                     ` (2 more replies)
  2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
  2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
  2 siblings, 3 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-29 23:17 UTC (permalink / raw)
  To: dev; +Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, avid.marchand

Andrew reported a build failure when disabling mlx5 common driver.
It is a blocker for -rc2 release.

While fixing the use of a variable across mlx5 drivers in first patch,
the consistency of its use is improved in a second patch.

Thomas Monjalon (2):
  net/mlx5: fix disabling common/mlx5 dependency
  common/mlx5: move Meson config initialization and check

 drivers/common/mlx5/linux/meson.build   | 2 --
 drivers/common/mlx5/meson.build         | 2 ++
 drivers/common/mlx5/windows/meson.build | 4 ----
 drivers/net/mlx5/hws/meson.build        | 4 ++++
 drivers/net/mlx5/meson.build            | 8 +++++---
 5 files changed, 11 insertions(+), 9 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency
  2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
@ 2022-10-29 23:17   ` Thomas Monjalon
  2022-10-29 23:17   ` [PATCH 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
  2022-10-30  7:34   ` [PATCH 0/2] fix build disabling common/mlx5 Andrew Rybchenko
  2 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-29 23:17 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, avid.marchand,
	Matan Azrad, Viacheslav Ovsiienko

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@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 2/2] common/mlx5: move Meson config initialization and check
  2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
  2022-10-29 23:17   ` [PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency Thomas Monjalon
@ 2022-10-29 23:17   ` Thomas Monjalon
  2022-10-30  7:34   ` [PATCH 0/2] fix build disabling common/mlx5 Andrew Rybchenko
  2 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-29 23:17 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, avid.marchand,
	Matan Azrad, Viacheslav Ovsiienko

The variable mlx5_config may be used by other mlx5 drivers
and should be always initialized.
By moving its initialization (with configuration file generation),
it is made consistent for Linux and Windows builds.

And the check of mlx5_config in net/mlx5 is moved at the top of
net/mlx5/hws/meson.build so HWS requirements are in the right context.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/common/mlx5/linux/meson.build   | 2 --
 drivers/common/mlx5/meson.build         | 2 ++
 drivers/common/mlx5/windows/meson.build | 4 ----
 drivers/net/mlx5/hws/meson.build        | 4 ++++
 drivers/net/mlx5/meson.build            | 4 +---
 5 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 84e2a1ad8c..2b57b299bd 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -8,7 +8,6 @@ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
 LIB_GLUE_BASE = 'librte_common_mlx5_glue.so'
 LIB_GLUE_VERSION = abi_version
 LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-mlx5_config = configuration_data()
 if dlopen_ibverbs
     dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
     cflags += [
@@ -232,7 +231,6 @@ foreach arg:has_member_args
     file_prefix = '#include <' + arg[1] + '>'
     mlx5_config.set(arg[0], cc.has_member(arg[2], arg[3], prefix : file_prefix, dependencies: libs))
 endforeach
-configure_file(output : 'mlx5_autoconf.h', configuration : mlx5_config)
 
 # Build Glue Library
 if dlopen_ibverbs
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index 6ddbde7e8f..d7ca21d2cf 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -37,4 +37,6 @@ else
     cflags += [ '-UPEDANTIC' ]
 endif
 
+mlx5_config = configuration_data()
 subdir(exec_env)
+configure_file(output : 'mlx5_autoconf.h', configuration : mlx5_config)
diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build
index edbbaa9ae1..cc486014a8 100644
--- a/drivers/common/mlx5/windows/meson.build
+++ b/drivers/common/mlx5/windows/meson.build
@@ -39,7 +39,3 @@ if get_option('buildtype').contains('debug')
 else
     cflags += [ '-UPEDANTIC' ]
 endif
-
-# Generate an empty mlx5_autoconf.h file for compatibility with Linux
-config = configuration_data()
-configure_file(output : 'mlx5_autoconf.h', configuration : config)
diff --git a/drivers/net/mlx5/hws/meson.build b/drivers/net/mlx5/hws/meson.build
index d2bb864fd2..38776d5163 100644
--- a/drivers/net/mlx5/hws/meson.build
+++ b/drivers/net/mlx5/hws/meson.build
@@ -1,6 +1,10 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2022 NVIDIA Corporation & Affiliates
 
+if not (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
+    subdir_done()
+endif
+
 includes += include_directories('.')
 sources += files(
         'mlx5dr_context.c',
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 9a8eb0bc19..66b23f5584 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -77,6 +77,4 @@ testpmd_sources += files('mlx5_testpmd.c')
 
 subdir(exec_env)
 
-if (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
-    subdir('hws')
-endif
+subdir('hws')
-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 0/2] fix build disabling common/mlx5
  2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
  2022-10-29 23:17   ` [PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency Thomas Monjalon
  2022-10-29 23:17   ` [PATCH 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
@ 2022-10-30  7:34   ` Andrew Rybchenko
  2 siblings, 0 replies; 25+ messages in thread
From: Andrew Rybchenko @ 2022-10-30  7:34 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: valex, ferruh.yigit, rasland, avid.marchand

On 10/30/22 02:17, Thomas Monjalon wrote:
> Andrew reported a build failure when disabling mlx5 common driver.
> It is a blocker for -rc2 release.
> 
> While fixing the use of a variable across mlx5 drivers in first patch,
> the consistency of its use is improved in a second patch.
> 
> Thomas Monjalon (2):
>    net/mlx5: fix disabling common/mlx5 dependency
>    common/mlx5: move Meson config initialization and check
> 
>   drivers/common/mlx5/linux/meson.build   | 2 --
>   drivers/common/mlx5/meson.build         | 2 ++
>   drivers/common/mlx5/windows/meson.build | 4 ----
>   drivers/net/mlx5/hws/meson.build        | 4 ++++
>   drivers/net/mlx5/meson.build            | 8 +++++---
>   5 files changed, 11 insertions(+), 9 deletions(-)
> 

Many thanks, it solves my build problem:

Series-tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 0/2] fix build disabling common/mlx5
  2022-10-29  9:05 DPDK main build is broken for me in net/mlx5 if I disable common/mlx5 Andrew Rybchenko
  2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
@ 2022-10-30  8:27 ` Thomas Monjalon
  2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
                     ` (2 more replies)
  2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
  2 siblings, 3 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30  8:27 UTC (permalink / raw)
  To: dev; +Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand

Andrew reported a build failure when disabling mlx5 common driver.
It is a blocker for -rc2 release.

While fixing the use of a variable across mlx5 drivers in first patch,
the consistency of its use is improved in a second patch.

v2: apply the same protection to other mlx5 drivers

Thomas Monjalon (2):
  common/mlx5: fix build disabling
  common/mlx5: move Meson config initialization and check

 drivers/common/mlx5/linux/meson.build   | 2 --
 drivers/common/mlx5/meson.build         | 2 ++
 drivers/common/mlx5/windows/meson.build | 4 ----
 drivers/compress/mlx5/meson.build       | 5 +++++
 drivers/crypto/mlx5/meson.build         | 5 +++++
 drivers/net/mlx5/hws/meson.build        | 4 ++++
 drivers/net/mlx5/meson.build            | 9 ++++++---
 drivers/regex/mlx5/meson.build          | 5 +++++
 drivers/vdpa/mlx5/meson.build           | 5 +++++
 9 files changed, 32 insertions(+), 9 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 1/2] common/mlx5: fix build disabling
  2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
@ 2022-10-30  8:27   ` Thomas Monjalon
  2022-10-30  9:16     ` Matan Azrad
  2022-11-02 12:10     ` Bruce Richardson
  2022-10-30  8:27   ` [PATCH v2 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
  2022-10-30  9:14   ` [PATCH v2 0/2] fix build disabling common/mlx5 David Marchand
  2 siblings, 2 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30  8:27 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand,
	Matan Azrad, Fan Zhang, Ashish Gupta, Viacheslav Ovsiienko,
	Ori Kam

If the dependency common/mlx5 is explicitly disabled,
but net/mlx5 is not explicitly 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.

The same protection is applied to other mlx5 drivers,
so it will allow using the variable mlx5_config in future.

Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/compress/mlx5/meson.build | 5 +++++
 drivers/crypto/mlx5/meson.build   | 5 +++++
 drivers/net/mlx5/meson.build      | 5 +++++
 drivers/regex/mlx5/meson.build    | 5 +++++
 drivers/vdpa/mlx5/meson.build     | 5 +++++
 5 files changed, 25 insertions(+)

diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build
index 7aac329986..49ce3aff46 100644
--- a/drivers/compress/mlx5/meson.build
+++ b/drivers/compress/mlx5/meson.build
@@ -9,6 +9,11 @@ endif
 
 fmt_name = 'mlx5_compress'
 deps += ['common_mlx5', 'eal', 'compressdev']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_compress.c',
 )
diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build
index 9d9c9c00bc..7521c4c671 100644
--- a/drivers/crypto/mlx5/meson.build
+++ b/drivers/crypto/mlx5/meson.build
@@ -9,6 +9,11 @@ endif
 
 fmt_name = 'mlx5_crypto'
 deps += ['common_mlx5', 'eal', 'cryptodev']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_crypto.c',
         'mlx5_crypto_dek.c',
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index ff84448186..fa15158039 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,6 +9,11 @@ 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',
diff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build
index e553dcb83d..70edc5b6da 100644
--- a/drivers/regex/mlx5/meson.build
+++ b/drivers/regex/mlx5/meson.build
@@ -8,6 +8,11 @@ if not is_linux
 endif
 
 deps += ['common_mlx5', 'eal', 'regexdev']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_regex.c',
         'mlx5_rxp.c',
diff --git a/drivers/vdpa/mlx5/meson.build b/drivers/vdpa/mlx5/meson.build
index 9d8dbb1a82..54a4eac6f4 100644
--- a/drivers/vdpa/mlx5/meson.build
+++ b/drivers/vdpa/mlx5/meson.build
@@ -8,6 +8,11 @@ if not is_linux
 endif
 
 deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_vdpa.c',
         'mlx5_vdpa_mem.c',
-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v2 2/2] common/mlx5: move Meson config initialization and check
  2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
  2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
@ 2022-10-30  8:27   ` Thomas Monjalon
  2022-10-30  9:16     ` Matan Azrad
  2022-10-30  9:14   ` [PATCH v2 0/2] fix build disabling common/mlx5 David Marchand
  2 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30  8:27 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand,
	Matan Azrad, Viacheslav Ovsiienko

The variable mlx5_config may be used by other mlx5 drivers
and should be always initialized.
By moving its initialization (with configuration file generation),
it is made consistent for Linux and Windows builds.

And the check of mlx5_config in net/mlx5 is moved at the top of
net/mlx5/hws/meson.build so HWS requirements are in the right context.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/mlx5/linux/meson.build   | 2 --
 drivers/common/mlx5/meson.build         | 2 ++
 drivers/common/mlx5/windows/meson.build | 4 ----
 drivers/net/mlx5/hws/meson.build        | 4 ++++
 drivers/net/mlx5/meson.build            | 4 +---
 5 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 84e2a1ad8c..2b57b299bd 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -8,7 +8,6 @@ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
 LIB_GLUE_BASE = 'librte_common_mlx5_glue.so'
 LIB_GLUE_VERSION = abi_version
 LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-mlx5_config = configuration_data()
 if dlopen_ibverbs
     dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
     cflags += [
@@ -232,7 +231,6 @@ foreach arg:has_member_args
     file_prefix = '#include <' + arg[1] + '>'
     mlx5_config.set(arg[0], cc.has_member(arg[2], arg[3], prefix : file_prefix, dependencies: libs))
 endforeach
-configure_file(output : 'mlx5_autoconf.h', configuration : mlx5_config)
 
 # Build Glue Library
 if dlopen_ibverbs
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index 6ddbde7e8f..d7ca21d2cf 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -37,4 +37,6 @@ else
     cflags += [ '-UPEDANTIC' ]
 endif
 
+mlx5_config = configuration_data()
 subdir(exec_env)
+configure_file(output : 'mlx5_autoconf.h', configuration : mlx5_config)
diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build
index edbbaa9ae1..cc486014a8 100644
--- a/drivers/common/mlx5/windows/meson.build
+++ b/drivers/common/mlx5/windows/meson.build
@@ -39,7 +39,3 @@ if get_option('buildtype').contains('debug')
 else
     cflags += [ '-UPEDANTIC' ]
 endif
-
-# Generate an empty mlx5_autoconf.h file for compatibility with Linux
-config = configuration_data()
-configure_file(output : 'mlx5_autoconf.h', configuration : config)
diff --git a/drivers/net/mlx5/hws/meson.build b/drivers/net/mlx5/hws/meson.build
index d2bb864fd2..38776d5163 100644
--- a/drivers/net/mlx5/hws/meson.build
+++ b/drivers/net/mlx5/hws/meson.build
@@ -1,6 +1,10 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2022 NVIDIA Corporation & Affiliates
 
+if not (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
+    subdir_done()
+endif
+
 includes += include_directories('.')
 sources += files(
         'mlx5dr_context.c',
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index fa15158039..f1aab18f82 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -78,6 +78,4 @@ testpmd_sources += files('mlx5_testpmd.c')
 
 subdir(exec_env)
 
-if (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
-    subdir('hws')
-endif
+subdir('hws')
-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 0/2] fix build disabling common/mlx5
  2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
  2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
  2022-10-30  8:27   ` [PATCH v2 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
@ 2022-10-30  9:14   ` David Marchand
  2 siblings, 0 replies; 25+ messages in thread
From: David Marchand @ 2022-10-30  9:14 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, valex, ferruh.yigit, andrew.rybchenko, rasland

On Sun, Oct 30, 2022 at 9:27 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> Andrew reported a build failure when disabling mlx5 common driver.
> It is a blocker for -rc2 release.
>
> While fixing the use of a variable across mlx5 drivers in first patch,
> the consistency of its use is improved in a second patch.
>
> v2: apply the same protection to other mlx5 drivers
>
> Thomas Monjalon (2):
>   common/mlx5: fix build disabling
>   common/mlx5: move Meson config initialization and check
>
>  drivers/common/mlx5/linux/meson.build   | 2 --
>  drivers/common/mlx5/meson.build         | 2 ++
>  drivers/common/mlx5/windows/meson.build | 4 ----
>  drivers/compress/mlx5/meson.build       | 5 +++++
>  drivers/crypto/mlx5/meson.build         | 5 +++++
>  drivers/net/mlx5/hws/meson.build        | 4 ++++
>  drivers/net/mlx5/meson.build            | 9 ++++++---
>  drivers/regex/mlx5/meson.build          | 5 +++++
>  drivers/vdpa/mlx5/meson.build           | 5 +++++
>  9 files changed, 32 insertions(+), 9 deletions(-)

For the series,
Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH v2 1/2] common/mlx5: fix build disabling
  2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
@ 2022-10-30  9:16     ` Matan Azrad
  2022-11-02 12:10     ` Bruce Richardson
  1 sibling, 0 replies; 25+ messages in thread
From: Matan Azrad @ 2022-10-30  9:16 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon (EXTERNAL), dev
  Cc: Alex Vesker, ferruh.yigit, andrew.rybchenko, Raslan Darawsheh,
	david.marchand, Fan Zhang, Ashish Gupta, Slava Ovsiienko,
	Ori Kam



> If the dependency common/mlx5 is explicitly disabled, but net/mlx5 is not
> explicitly 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.
> 
> The same protection is applied to other mlx5 drivers, so it will allow using the
> variable mlx5_config in future.
> 
> Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")
> 
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Matan Azrad <matan@nvidia.com>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH v2 2/2] common/mlx5: move Meson config initialization and check
  2022-10-30  8:27   ` [PATCH v2 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
@ 2022-10-30  9:16     ` Matan Azrad
  0 siblings, 0 replies; 25+ messages in thread
From: Matan Azrad @ 2022-10-30  9:16 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon (EXTERNAL), dev
  Cc: Alex Vesker, ferruh.yigit, andrew.rybchenko, Raslan Darawsheh,
	david.marchand, Slava Ovsiienko


> The variable mlx5_config may be used by other mlx5 drivers and should be
> always initialized.
> By moving its initialization (with configuration file generation), it is made
> consistent for Linux and Windows builds.
> 
> And the check of mlx5_config in net/mlx5 is moved at the top of
> net/mlx5/hws/meson.build so HWS requirements are in the right context.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Matan Azrad <matan@nvidia.com>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v3 0/2] fix build disabling common/mlx5
  2022-10-29  9:05 DPDK main build is broken for me in net/mlx5 if I disable common/mlx5 Andrew Rybchenko
  2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
  2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
@ 2022-10-30 11:08 ` Thomas Monjalon
  2022-10-30 11:08   ` [PATCH v3 1/2] common/mlx5: fix build disabling Thomas Monjalon
                     ` (2 more replies)
  2 siblings, 3 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30 11:08 UTC (permalink / raw)
  To: dev; +Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand

Andrew reported a build failure when disabling mlx5 common driver.
It is a blocker for -rc2 release.

While fixing the use of a variable across mlx5 drivers in first patch,
the consistency of its use is improved in a second patch.

v2: apply the same protection to other mlx5 drivers
v3: fix ibverbs_link=dlopen (include directory was missing)

Thomas Monjalon (2):
  common/mlx5: fix build disabling
  common/mlx5: move build config initialization and check

 drivers/common/mlx5/linux/meson.build   | 3 +--
 drivers/common/mlx5/meson.build         | 2 ++
 drivers/common/mlx5/windows/meson.build | 4 ----
 drivers/compress/mlx5/meson.build       | 5 +++++
 drivers/crypto/mlx5/meson.build         | 5 +++++
 drivers/net/mlx5/hws/meson.build        | 4 ++++
 drivers/net/mlx5/meson.build            | 9 ++++++---
 drivers/regex/mlx5/meson.build          | 5 +++++
 drivers/vdpa/mlx5/meson.build           | 5 +++++
 9 files changed, 33 insertions(+), 9 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v3 1/2] common/mlx5: fix build disabling
  2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
@ 2022-10-30 11:08   ` Thomas Monjalon
  2022-10-30 13:33     ` Alex Vesker
  2022-10-30 11:08   ` [PATCH v3 2/2] common/mlx5: move build config initialization and check Thomas Monjalon
  2022-10-30 15:12   ` [PATCH v3 0/2] fix build disabling common/mlx5 Thomas Monjalon
  2 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30 11:08 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand,
	Matan Azrad, Fan Zhang, Ashish Gupta, Viacheslav Ovsiienko,
	Ori Kam

If the dependency common/mlx5 is explicitly disabled,
but net/mlx5 is not explicitly 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.

The same protection is applied to other mlx5 drivers,
so it will allow using the variable mlx5_config in future.

Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/compress/mlx5/meson.build | 5 +++++
 drivers/crypto/mlx5/meson.build   | 5 +++++
 drivers/net/mlx5/meson.build      | 5 +++++
 drivers/regex/mlx5/meson.build    | 5 +++++
 drivers/vdpa/mlx5/meson.build     | 5 +++++
 5 files changed, 25 insertions(+)

diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build
index 7aac329986..49ce3aff46 100644
--- a/drivers/compress/mlx5/meson.build
+++ b/drivers/compress/mlx5/meson.build
@@ -9,6 +9,11 @@ endif
 
 fmt_name = 'mlx5_compress'
 deps += ['common_mlx5', 'eal', 'compressdev']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_compress.c',
 )
diff --git a/drivers/crypto/mlx5/meson.build b/drivers/crypto/mlx5/meson.build
index 9d9c9c00bc..7521c4c671 100644
--- a/drivers/crypto/mlx5/meson.build
+++ b/drivers/crypto/mlx5/meson.build
@@ -9,6 +9,11 @@ endif
 
 fmt_name = 'mlx5_crypto'
 deps += ['common_mlx5', 'eal', 'cryptodev']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_crypto.c',
         'mlx5_crypto_dek.c',
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index ff84448186..fa15158039 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,6 +9,11 @@ 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',
diff --git a/drivers/regex/mlx5/meson.build b/drivers/regex/mlx5/meson.build
index e553dcb83d..70edc5b6da 100644
--- a/drivers/regex/mlx5/meson.build
+++ b/drivers/regex/mlx5/meson.build
@@ -8,6 +8,11 @@ if not is_linux
 endif
 
 deps += ['common_mlx5', 'eal', 'regexdev']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_regex.c',
         'mlx5_rxp.c',
diff --git a/drivers/vdpa/mlx5/meson.build b/drivers/vdpa/mlx5/meson.build
index 9d8dbb1a82..54a4eac6f4 100644
--- a/drivers/vdpa/mlx5/meson.build
+++ b/drivers/vdpa/mlx5/meson.build
@@ -8,6 +8,11 @@ if not is_linux
 endif
 
 deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched']
+if not ('mlx5' in common_drivers)
+    # avoid referencing undefined variables from common/mlx5
+    subdir_done()
+endif
+
 sources = files(
         'mlx5_vdpa.c',
         'mlx5_vdpa_mem.c',
-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH v3 2/2] common/mlx5: move build config initialization and check
  2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
  2022-10-30 11:08   ` [PATCH v3 1/2] common/mlx5: fix build disabling Thomas Monjalon
@ 2022-10-30 11:08   ` Thomas Monjalon
  2022-10-30 13:34     ` Alex Vesker
  2022-10-30 15:12   ` [PATCH v3 0/2] fix build disabling common/mlx5 Thomas Monjalon
  2 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30 11:08 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand,
	Matan Azrad, Viacheslav Ovsiienko

The variable mlx5_config may be used by other mlx5 drivers
and should be always initialized.
By moving its initialization (with configuration file generation),
it is made consistent for Linux and Windows builds.

And the check of mlx5_config in net/mlx5 is moved at the top of
net/mlx5/hws/meson.build so HWS requirements are in the right context.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/linux/meson.build   | 3 +--
 drivers/common/mlx5/meson.build         | 2 ++
 drivers/common/mlx5/windows/meson.build | 4 ----
 drivers/net/mlx5/hws/meson.build        | 4 ++++
 drivers/net/mlx5/meson.build            | 4 +---
 5 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 84e2a1ad8c..7e1575efc8 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -8,7 +8,6 @@ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
 LIB_GLUE_BASE = 'librte_common_mlx5_glue.so'
 LIB_GLUE_VERSION = abi_version
 LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION
-mlx5_config = configuration_data()
 if dlopen_ibverbs
     dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
     cflags += [
@@ -232,7 +231,6 @@ foreach arg:has_member_args
     file_prefix = '#include <' + arg[1] + '>'
     mlx5_config.set(arg[0], cc.has_member(arg[2], arg[3], prefix : file_prefix, dependencies: libs))
 endforeach
-configure_file(output : 'mlx5_autoconf.h', configuration : mlx5_config)
 
 # Build Glue Library
 if dlopen_ibverbs
@@ -243,6 +241,7 @@ if dlopen_ibverbs
     dlopen_install_dir = [ eal_pmd_path + '-glue' ]
     dlopen_includes = [global_inc]
     dlopen_includes += include_directories('../../../../lib/eal/include/generic')
+    dlopen_includes += include_directories('..')
     shared_lib = shared_library(
             dlopen_lib_name,
             dlopen_sources,
diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
index 6ddbde7e8f..60ccd95cbc 100644
--- a/drivers/common/mlx5/meson.build
+++ b/drivers/common/mlx5/meson.build
@@ -37,4 +37,6 @@ else
     cflags += [ '-UPEDANTIC' ]
 endif
 
+mlx5_config = configuration_data()
 subdir(exec_env)
+configure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config)
diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build
index edbbaa9ae1..cc486014a8 100644
--- a/drivers/common/mlx5/windows/meson.build
+++ b/drivers/common/mlx5/windows/meson.build
@@ -39,7 +39,3 @@ if get_option('buildtype').contains('debug')
 else
     cflags += [ '-UPEDANTIC' ]
 endif
-
-# Generate an empty mlx5_autoconf.h file for compatibility with Linux
-config = configuration_data()
-configure_file(output : 'mlx5_autoconf.h', configuration : config)
diff --git a/drivers/net/mlx5/hws/meson.build b/drivers/net/mlx5/hws/meson.build
index d2bb864fd2..38776d5163 100644
--- a/drivers/net/mlx5/hws/meson.build
+++ b/drivers/net/mlx5/hws/meson.build
@@ -1,6 +1,10 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright (c) 2022 NVIDIA Corporation & Affiliates
 
+if not (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
+    subdir_done()
+endif
+
 includes += include_directories('.')
 sources += files(
         'mlx5dr_context.c',
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index fa15158039..f1aab18f82 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -78,6 +78,4 @@ testpmd_sources += files('mlx5_testpmd.c')
 
 subdir(exec_env)
 
-if (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
-    subdir('hws')
-endif
+subdir('hws')
-- 
2.36.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH v3 1/2] common/mlx5: fix build disabling
  2022-10-30 11:08   ` [PATCH v3 1/2] common/mlx5: fix build disabling Thomas Monjalon
@ 2022-10-30 13:33     ` Alex Vesker
  0 siblings, 0 replies; 25+ messages in thread
From: Alex Vesker @ 2022-10-30 13:33 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon (EXTERNAL), dev
  Cc: ferruh.yigit, andrew.rybchenko, Raslan Darawsheh, david.marchand,
	Matan Azrad, Fan Zhang, Ashish Gupta, Slava Ovsiienko, Ori Kam



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, October 30, 2022 1:08 PM
> To: dev@dpdk.org
> Cc: Alex Vesker <valex@nvidia.com>; ferruh.yigit@amd.com;
> andrew.rybchenko@oktetlabs.ru; Raslan Darawsheh <rasland@nvidia.com>;
> david.marchand@redhat.com; Matan Azrad <matan@nvidia.com>; Fan
> Zhang <royzhang1980@gmail.com>; Ashish Gupta
> <ashish.gupta@marvell.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;
> Ori Kam <orika@nvidia.com>
> Subject: [PATCH v3 1/2] common/mlx5: fix build disabling
> 
> If the dependency common/mlx5 is explicitly disabled, but net/mlx5 is not
> explicitly 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.
> 
> The same protection is applied to other mlx5 drivers, so it will allow using the
> variable mlx5_config in future.
> 
> Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")
> 
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/compress/mlx5/meson.build | 5 +++++
>  drivers/crypto/mlx5/meson.build   | 5 +++++
>  drivers/net/mlx5/meson.build      | 5 +++++
>  drivers/regex/mlx5/meson.build    | 5 +++++
>  drivers/vdpa/mlx5/meson.build     | 5 +++++
>  5 files changed, 25 insertions(+)
> 
> diff --git a/drivers/compress/mlx5/meson.build
> b/drivers/compress/mlx5/meson.build
> index 7aac329986..49ce3aff46 100644
> --- a/drivers/compress/mlx5/meson.build
> +++ b/drivers/compress/mlx5/meson.build
> @@ -9,6 +9,11 @@ endif
> 
>  fmt_name = 'mlx5_compress'
>  deps += ['common_mlx5', 'eal', 'compressdev']
> +if not ('mlx5' in common_drivers)
> +    # avoid referencing undefined variables from common/mlx5
> +    subdir_done()
> +endif
> +
>  sources = files(
>          'mlx5_compress.c',
>  )
> diff --git a/drivers/crypto/mlx5/meson.build
> b/drivers/crypto/mlx5/meson.build index 9d9c9c00bc..7521c4c671 100644
> --- a/drivers/crypto/mlx5/meson.build
> +++ b/drivers/crypto/mlx5/meson.build
> @@ -9,6 +9,11 @@ endif
> 
>  fmt_name = 'mlx5_crypto'
>  deps += ['common_mlx5', 'eal', 'cryptodev']
> +if not ('mlx5' in common_drivers)
> +    # avoid referencing undefined variables from common/mlx5
> +    subdir_done()
> +endif
> +
>  sources = files(
>          'mlx5_crypto.c',
>          'mlx5_crypto_dek.c',
> diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
> index ff84448186..fa15158039 100644
> --- a/drivers/net/mlx5/meson.build
> +++ b/drivers/net/mlx5/meson.build
> @@ -9,6 +9,11 @@ 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',
> diff --git a/drivers/regex/mlx5/meson.build
> b/drivers/regex/mlx5/meson.build index e553dcb83d..70edc5b6da 100644
> --- a/drivers/regex/mlx5/meson.build
> +++ b/drivers/regex/mlx5/meson.build
> @@ -8,6 +8,11 @@ if not is_linux
>  endif
> 
>  deps += ['common_mlx5', 'eal', 'regexdev']
> +if not ('mlx5' in common_drivers)
> +    # avoid referencing undefined variables from common/mlx5
> +    subdir_done()
> +endif
> +
>  sources = files(
>          'mlx5_regex.c',
>          'mlx5_rxp.c',
> diff --git a/drivers/vdpa/mlx5/meson.build
> b/drivers/vdpa/mlx5/meson.build index 9d8dbb1a82..54a4eac6f4 100644
> --- a/drivers/vdpa/mlx5/meson.build
> +++ b/drivers/vdpa/mlx5/meson.build
> @@ -8,6 +8,11 @@ if not is_linux
>  endif
> 
>  deps += ['hash', 'common_mlx5', 'vhost', 'pci', 'eal', 'sched']
> +if not ('mlx5' in common_drivers)
> +    # avoid referencing undefined variables from common/mlx5
> +    subdir_done()
> +endif
> +
>  sources = files(
>          'mlx5_vdpa.c',
>          'mlx5_vdpa_mem.c',
> --
> 2.36.1

Acked-by: Alex Vesker <valex@nvidia.com>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [PATCH v3 2/2] common/mlx5: move build config initialization and check
  2022-10-30 11:08   ` [PATCH v3 2/2] common/mlx5: move build config initialization and check Thomas Monjalon
@ 2022-10-30 13:34     ` Alex Vesker
  0 siblings, 0 replies; 25+ messages in thread
From: Alex Vesker @ 2022-10-30 13:34 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon (EXTERNAL), dev
  Cc: ferruh.yigit, andrew.rybchenko, Raslan Darawsheh, david.marchand,
	Matan Azrad, Slava Ovsiienko



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, October 30, 2022 1:08 PM
> To: dev@dpdk.org
> Cc: Alex Vesker <valex@nvidia.com>; ferruh.yigit@amd.com;
> andrew.rybchenko@oktetlabs.ru; Raslan Darawsheh <rasland@nvidia.com>;
> david.marchand@redhat.com; Matan Azrad <matan@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH v3 2/2] common/mlx5: move build config initialization and
> check
> 
> The variable mlx5_config may be used by other mlx5 drivers and should be
> always initialized.
> By moving its initialization (with configuration file generation), it is made
> consistent for Linux and Windows builds.
> 
> And the check of mlx5_config in net/mlx5 is moved at the top of
> net/mlx5/hws/meson.build so HWS requirements are in the right context.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/common/mlx5/linux/meson.build   | 3 +--
>  drivers/common/mlx5/meson.build         | 2 ++
>  drivers/common/mlx5/windows/meson.build | 4 ----
>  drivers/net/mlx5/hws/meson.build        | 4 ++++
>  drivers/net/mlx5/meson.build            | 4 +---
>  5 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/common/mlx5/linux/meson.build
> b/drivers/common/mlx5/linux/meson.build
> index 84e2a1ad8c..7e1575efc8 100644
> --- a/drivers/common/mlx5/linux/meson.build
> +++ b/drivers/common/mlx5/linux/meson.build
> @@ -8,7 +8,6 @@ dlopen_ibverbs = (get_option('ibverbs_link') == 'dlopen')
> LIB_GLUE_BASE = 'librte_common_mlx5_glue.so'
>  LIB_GLUE_VERSION = abi_version
>  LIB_GLUE = LIB_GLUE_BASE + '.' + LIB_GLUE_VERSION -mlx5_config =
> configuration_data()  if dlopen_ibverbs
>      dpdk_conf.set('RTE_IBVERBS_LINK_DLOPEN', 1)
>      cflags += [
> @@ -232,7 +231,6 @@ foreach arg:has_member_args
>      file_prefix = '#include <' + arg[1] + '>'
>      mlx5_config.set(arg[0], cc.has_member(arg[2], arg[3], prefix : file_prefix,
> dependencies: libs))  endforeach -configure_file(output : 'mlx5_autoconf.h',
> configuration : mlx5_config)
> 
>  # Build Glue Library
>  if dlopen_ibverbs
> @@ -243,6 +241,7 @@ if dlopen_ibverbs
>      dlopen_install_dir = [ eal_pmd_path + '-glue' ]
>      dlopen_includes = [global_inc]
>      dlopen_includes += include_directories('../../../../lib/eal/include/generic')
> +    dlopen_includes += include_directories('..')
>      shared_lib = shared_library(
>              dlopen_lib_name,
>              dlopen_sources,
> diff --git a/drivers/common/mlx5/meson.build
> b/drivers/common/mlx5/meson.build index 6ddbde7e8f..60ccd95cbc
> 100644
> --- a/drivers/common/mlx5/meson.build
> +++ b/drivers/common/mlx5/meson.build
> @@ -37,4 +37,6 @@ else
>      cflags += [ '-UPEDANTIC' ]
>  endif
> 
> +mlx5_config = configuration_data()
>  subdir(exec_env)
> +configure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config)
> diff --git a/drivers/common/mlx5/windows/meson.build
> b/drivers/common/mlx5/windows/meson.build
> index edbbaa9ae1..cc486014a8 100644
> --- a/drivers/common/mlx5/windows/meson.build
> +++ b/drivers/common/mlx5/windows/meson.build
> @@ -39,7 +39,3 @@ if get_option('buildtype').contains('debug')
>  else
>      cflags += [ '-UPEDANTIC' ]
>  endif
> -
> -# Generate an empty mlx5_autoconf.h file for compatibility with Linux -
> config = configuration_data() -configure_file(output : 'mlx5_autoconf.h',
> configuration : config) diff --git a/drivers/net/mlx5/hws/meson.build
> b/drivers/net/mlx5/hws/meson.build
> index d2bb864fd2..38776d5163 100644
> --- a/drivers/net/mlx5/hws/meson.build
> +++ b/drivers/net/mlx5/hws/meson.build
> @@ -1,6 +1,10 @@
>  # SPDX-License-Identifier: BSD-3-Clause  # Copyright (c) 2022 NVIDIA
> Corporation & Affiliates
> 
> +if not (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
> +    subdir_done()
> +endif
> +
>  includes += include_directories('.')
>  sources += files(
>          'mlx5dr_context.c',
> diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
> index fa15158039..f1aab18f82 100644
> --- a/drivers/net/mlx5/meson.build
> +++ b/drivers/net/mlx5/meson.build
> @@ -78,6 +78,4 @@ testpmd_sources += files('mlx5_testpmd.c')
> 
>  subdir(exec_env)
> 
> -if (is_linux and mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
> -    subdir('hws')
> -endif
> +subdir('hws')
> --
> 2.36.1

Acked-by: Alex Vesker <valex@nvidia.com>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v3 0/2] fix build disabling common/mlx5
  2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
  2022-10-30 11:08   ` [PATCH v3 1/2] common/mlx5: fix build disabling Thomas Monjalon
  2022-10-30 11:08   ` [PATCH v3 2/2] common/mlx5: move build config initialization and check Thomas Monjalon
@ 2022-10-30 15:12   ` Thomas Monjalon
  2 siblings, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-10-30 15:12 UTC (permalink / raw)
  To: dev
  Cc: valex, ferruh.yigit, andrew.rybchenko, rasland, david.marchand,
	aaron.conole

30/10/2022 12:08, Thomas Monjalon:
> Andrew reported a build failure when disabling mlx5 common driver.
> It is a blocker for -rc2 release.
> 
> While fixing the use of a variable across mlx5 drivers in first patch,
> the consistency of its use is improved in a second patch.
> 
> v2: apply the same protection to other mlx5 drivers
> v3: fix ibverbs_link=dlopen (include directory was missing)
> 
> Thomas Monjalon (2):
>   common/mlx5: fix build disabling
>   common/mlx5: move build config initialization and check

Applied

There is a CI error with Fedora 35 but it seems unrelated.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 1/2] common/mlx5: fix build disabling
  2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
  2022-10-30  9:16     ` Matan Azrad
@ 2022-11-02 12:10     ` Bruce Richardson
  2022-11-02 12:29       ` Thomas Monjalon
  1 sibling, 1 reply; 25+ messages in thread
From: Bruce Richardson @ 2022-11-02 12:10 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, valex, ferruh.yigit, andrew.rybchenko, rasland,
	david.marchand, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam

On Sun, Oct 30, 2022 at 09:27:21AM +0100, Thomas Monjalon wrote:
> If the dependency common/mlx5 is explicitly disabled,
> but net/mlx5 is not explicitly 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.
> 
> The same protection is applied to other mlx5 drivers,
> so it will allow using the variable mlx5_config in future.
> 
> Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")
> 
> Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> ---
>  drivers/compress/mlx5/meson.build | 5 +++++
>  drivers/crypto/mlx5/meson.build   | 5 +++++
>  drivers/net/mlx5/meson.build      | 5 +++++
>  drivers/regex/mlx5/meson.build    | 5 +++++
>  drivers/vdpa/mlx5/meson.build     | 5 +++++
>  5 files changed, 25 insertions(+)
> 
> diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build
> index 7aac329986..49ce3aff46 100644
> --- a/drivers/compress/mlx5/meson.build
> +++ b/drivers/compress/mlx5/meson.build
> @@ -9,6 +9,11 @@ endif
>  
>  fmt_name = 'mlx5_compress'
>  deps += ['common_mlx5', 'eal', 'compressdev']
> +if not ('mlx5' in common_drivers)

While this is fine as-is, I think the more usual way for checking the
presence of a component in DPDK is to check dpdk_conf. In this case the
check would be "if not dpdk_conf.has('RTE_COMMON_MLX5')". You may want to
consider using that for consistency.

/Bruce

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 1/2] common/mlx5: fix build disabling
  2022-11-02 12:10     ` Bruce Richardson
@ 2022-11-02 12:29       ` Thomas Monjalon
  2022-11-02 13:14         ` Bruce Richardson
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Monjalon @ 2022-11-02 12:29 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, valex, ferruh.yigit, andrew.rybchenko, rasland,
	david.marchand, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam

02/11/2022 13:10, Bruce Richardson:
> On Sun, Oct 30, 2022 at 09:27:21AM +0100, Thomas Monjalon wrote:
> > If the dependency common/mlx5 is explicitly disabled,
> > but net/mlx5 is not explicitly 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.
> > 
> > The same protection is applied to other mlx5 drivers,
> > so it will allow using the variable mlx5_config in future.
> > 
> > Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")
> > 
> > Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> > ---
> >  drivers/compress/mlx5/meson.build | 5 +++++
> >  drivers/crypto/mlx5/meson.build   | 5 +++++
> >  drivers/net/mlx5/meson.build      | 5 +++++
> >  drivers/regex/mlx5/meson.build    | 5 +++++
> >  drivers/vdpa/mlx5/meson.build     | 5 +++++
> >  5 files changed, 25 insertions(+)
> > 
> > diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build
> > index 7aac329986..49ce3aff46 100644
> > --- a/drivers/compress/mlx5/meson.build
> > +++ b/drivers/compress/mlx5/meson.build
> > @@ -9,6 +9,11 @@ endif
> >  
> >  fmt_name = 'mlx5_compress'
> >  deps += ['common_mlx5', 'eal', 'compressdev']
> > +if not ('mlx5' in common_drivers)
> 
> While this is fine as-is, I think the more usual way for checking the
> presence of a component in DPDK is to check dpdk_conf. In this case the
> check would be "if not dpdk_conf.has('RTE_COMMON_MLX5')". You may want to
> consider using that for consistency.

Yes, I've forgotten this:

	lib_name = '_'.join(['rte', class, name])
	dpdk_conf.set(lib_name.to_upper(), 1)

Then what is the usage of this?

	set_variable(class + '_drivers', enabled_drivers)




^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 1/2] common/mlx5: fix build disabling
  2022-11-02 12:29       ` Thomas Monjalon
@ 2022-11-02 13:14         ` Bruce Richardson
  2022-11-02 13:17           ` Thomas Monjalon
  2022-11-07 16:37           ` [PATCH] common/mlx5: use build configuration dictionary Thomas Monjalon
  0 siblings, 2 replies; 25+ messages in thread
From: Bruce Richardson @ 2022-11-02 13:14 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, valex, ferruh.yigit, andrew.rybchenko, rasland,
	david.marchand, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam

On Wed, Nov 02, 2022 at 01:29:49PM +0100, Thomas Monjalon wrote:
> 02/11/2022 13:10, Bruce Richardson:
> > On Sun, Oct 30, 2022 at 09:27:21AM +0100, Thomas Monjalon wrote:
> > > If the dependency common/mlx5 is explicitly disabled,
> > > but net/mlx5 is not explicitly 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.
> > > 
> > > The same protection is applied to other mlx5 drivers,
> > > so it will allow using the variable mlx5_config in future.
> > > 
> > > Fixes: 22681deead3e ("net/mlx5/hws: enable hardware steering")
> > > 
> > > Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > Tested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> > > ---
> > >  drivers/compress/mlx5/meson.build | 5 +++++
> > >  drivers/crypto/mlx5/meson.build   | 5 +++++
> > >  drivers/net/mlx5/meson.build      | 5 +++++
> > >  drivers/regex/mlx5/meson.build    | 5 +++++
> > >  drivers/vdpa/mlx5/meson.build     | 5 +++++
> > >  5 files changed, 25 insertions(+)
> > > 
> > > diff --git a/drivers/compress/mlx5/meson.build b/drivers/compress/mlx5/meson.build
> > > index 7aac329986..49ce3aff46 100644
> > > --- a/drivers/compress/mlx5/meson.build
> > > +++ b/drivers/compress/mlx5/meson.build
> > > @@ -9,6 +9,11 @@ endif
> > >  
> > >  fmt_name = 'mlx5_compress'
> > >  deps += ['common_mlx5', 'eal', 'compressdev']
> > > +if not ('mlx5' in common_drivers)
> > 
> > While this is fine as-is, I think the more usual way for checking the
> > presence of a component in DPDK is to check dpdk_conf. In this case the
> > check would be "if not dpdk_conf.has('RTE_COMMON_MLX5')". You may want to
> > consider using that for consistency.
> 
> Yes, I've forgotten this:
> 
> 	lib_name = '_'.join(['rte', class, name])
> 	dpdk_conf.set(lib_name.to_upper(), 1)
> 
> Then what is the usage of this?
> 
> 	set_variable(class + '_drivers', enabled_drivers)
> 
That is used for the summary printout at the end, so we can list the
drivers enabled.

The approach using the common_drivers works fine for this patch, so let's
keep it, since it's merged. I was just pointing out the other approach for
consistency sake.

/Bruce

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH v2 1/2] common/mlx5: fix build disabling
  2022-11-02 13:14         ` Bruce Richardson
@ 2022-11-02 13:17           ` Thomas Monjalon
  2022-11-07 16:37           ` [PATCH] common/mlx5: use build configuration dictionary Thomas Monjalon
  1 sibling, 0 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-11-02 13:17 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, valex, ferruh.yigit, andrew.rybchenko, rasland,
	david.marchand, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam

02/11/2022 14:14, Bruce Richardson:
> On Wed, Nov 02, 2022 at 01:29:49PM +0100, Thomas Monjalon wrote:
> > 02/11/2022 13:10, Bruce Richardson:
> > > On Sun, Oct 30, 2022 at 09:27:21AM +0100, Thomas Monjalon wrote:
> > > > +if not ('mlx5' in common_drivers)
> > > 
> > > While this is fine as-is, I think the more usual way for checking the
> > > presence of a component in DPDK is to check dpdk_conf. In this case the
> > > check would be "if not dpdk_conf.has('RTE_COMMON_MLX5')". You may want to
> > > consider using that for consistency.
> > 
> > Yes, I've forgotten this:
> > 
> > 	lib_name = '_'.join(['rte', class, name])
> > 	dpdk_conf.set(lib_name.to_upper(), 1)
> > 
> > Then what is the usage of this?
> > 
> > 	set_variable(class + '_drivers', enabled_drivers)
> > 
> That is used for the summary printout at the end, so we can list the
> drivers enabled.
> 
> The approach using the common_drivers works fine for this patch, so let's
> keep it, since it's merged. I was just pointing out the other approach for
> consistency sake.

I can send a patch for consistency.




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH] common/mlx5: use build configuration dictionary
  2022-11-02 13:14         ` Bruce Richardson
  2022-11-02 13:17           ` Thomas Monjalon
@ 2022-11-07 16:37           ` Thomas Monjalon
  2022-11-07 17:07             ` Bruce Richardson
  2022-11-08  7:51             ` David Marchand
  1 sibling, 2 replies; 25+ messages in thread
From: Thomas Monjalon @ 2022-11-07 16:37 UTC (permalink / raw)
  To: dev
  Cc: Bruce Richardson, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam, Alex Vesker, David Marchand

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

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] common/mlx5: use build configuration dictionary
  2022-11-07 16:37           ` [PATCH] common/mlx5: use build configuration dictionary Thomas Monjalon
@ 2022-11-07 17:07             ` Bruce Richardson
  2022-11-08  7:51             ` David Marchand
  1 sibling, 0 replies; 25+ messages in thread
From: Bruce Richardson @ 2022-11-07 17:07 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Matan Azrad, Fan Zhang, Ashish Gupta, Viacheslav Ovsiienko,
	Ori Kam, Alex Vesker, David Marchand

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>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] common/mlx5: use build configuration dictionary
  2022-11-07 16:37           ` [PATCH] common/mlx5: use build configuration dictionary Thomas Monjalon
  2022-11-07 17:07             ` Bruce Richardson
@ 2022-11-08  7:51             ` David Marchand
  2022-11-14 10:31               ` David Marchand
  1 sibling, 1 reply; 25+ messages in thread
From: David Marchand @ 2022-11-08  7:51 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Bruce Richardson, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam, Alex Vesker

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] common/mlx5: use build configuration dictionary
  2022-11-08  7:51             ` David Marchand
@ 2022-11-14 10:31               ` David Marchand
  0 siblings, 0 replies; 25+ messages in thread
From: David Marchand @ 2022-11-14 10:31 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Bruce Richardson, Matan Azrad, Fan Zhang, Ashish Gupta,
	Viacheslav Ovsiienko, Ori Kam, Alex Vesker

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.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-11-14 10:31 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-29  9:05 DPDK main build is broken for me in net/mlx5 if I disable common/mlx5 Andrew Rybchenko
2022-10-29 23:17 ` [PATCH 0/2] fix build disabling common/mlx5 Thomas Monjalon
2022-10-29 23:17   ` [PATCH 1/2] net/mlx5: fix disabling common/mlx5 dependency Thomas Monjalon
2022-10-29 23:17   ` [PATCH 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
2022-10-30  7:34   ` [PATCH 0/2] fix build disabling common/mlx5 Andrew Rybchenko
2022-10-30  8:27 ` [PATCH v2 " Thomas Monjalon
2022-10-30  8:27   ` [PATCH v2 1/2] common/mlx5: fix build disabling Thomas Monjalon
2022-10-30  9:16     ` Matan Azrad
2022-11-02 12:10     ` Bruce Richardson
2022-11-02 12:29       ` Thomas Monjalon
2022-11-02 13:14         ` Bruce Richardson
2022-11-02 13:17           ` Thomas Monjalon
2022-11-07 16:37           ` [PATCH] common/mlx5: use build configuration dictionary Thomas Monjalon
2022-11-07 17:07             ` Bruce Richardson
2022-11-08  7:51             ` David Marchand
2022-11-14 10:31               ` David Marchand
2022-10-30  8:27   ` [PATCH v2 2/2] common/mlx5: move Meson config initialization and check Thomas Monjalon
2022-10-30  9:16     ` Matan Azrad
2022-10-30  9:14   ` [PATCH v2 0/2] fix build disabling common/mlx5 David Marchand
2022-10-30 11:08 ` [PATCH v3 " Thomas Monjalon
2022-10-30 11:08   ` [PATCH v3 1/2] common/mlx5: fix build disabling Thomas Monjalon
2022-10-30 13:33     ` Alex Vesker
2022-10-30 11:08   ` [PATCH v3 2/2] common/mlx5: move build config initialization and check Thomas Monjalon
2022-10-30 13:34     ` Alex Vesker
2022-10-30 15:12   ` [PATCH v3 0/2] fix build disabling common/mlx5 Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).