DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] build: allow to conditionally build apps
@ 2022-10-12 14:47 Markus Theil
  2022-10-12 14:47 ` [PATCH 2/2] build: export dpdk_includes for subproject usage Markus Theil
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Markus Theil @ 2022-10-12 14:47 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Markus Theil

Makes apps configureable from meson, like already
possible for drivers.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 app/meson.build   | 17 ++++++++++++-----
 meson_options.txt |  4 ++++
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 93d8c15032..4d9c8ee814 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+enabled_apps = get_option('enable_apps')
+disabled_apps = get_option('disable_apps')
+
 apps = [
         'dumpcap',
         'pdump',
@@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
 endif
 
 foreach app:apps
-    build = true
+    build = enabled_apps == '' or enabled_apps.contains(app)
+    # let disabled_apps override enabled_apps
+    if disabled_apps != ''
+        build = build and not disabled_apps.contains(app)
+    endif
     name = app
     sources = []
     includes = []
@@ -41,6 +48,10 @@ foreach app:apps
     ext_deps = []
     deps = []
 
+    if not build
+        continue
+    endif
+
     subdir(name)
 
     if build
@@ -56,10 +67,6 @@ foreach app:apps
         endforeach
     endif
 
-    if not build
-        continue
-    endif
-
     link_libs = []
     if get_option('default_library') == 'static'
         link_libs = dpdk_static_libraries + dpdk_drivers
diff --git a/meson_options.txt b/meson_options.txt
index 0574dd0fff..9f032d454d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,6 +6,8 @@ option('cpu_instruction_set', type: 'string', value: 'auto',
 	description: 'Set the target machine ISA (instruction set architecture). Will be set according to the platform option by default.')
 option('developer_mode', type: 'feature', description:
        'turn on additional build checks relevant for DPDK developers')
+option('disable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to explicitly disable.')
 option('disable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to explicitly disable.')
 option('disable_libs', type: 'string', value: 'kni', description:
@@ -14,6 +16,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', d
        'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
 option('enable_docs', type: 'boolean', value: false, description:
        'build documentation')
+option('enable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to build. If unspecified, build all apps.')
 option('enable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to build. If unspecified, build all drivers.')
 option('enable_driver_sdk', type: 'boolean', value: false, description:
-- 
2.38.0


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

* [PATCH 2/2] build: export dpdk_includes for subproject usage.
  2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
@ 2022-10-12 14:47 ` Markus Theil
  2022-10-12 15:21   ` Bruce Richardson
  2022-10-12 15:19 ` [PATCH 1/2] build: allow to conditionally build apps Bruce Richardson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-12 14:47 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Thorben Roemer

From: Thorben Roemer <thorben.roemer@secunet.com>

In order to perform things like LTO more easily in
our DPDK applications, we use DPDK as a meson subproject.
Also export includes in order to be usable in this context.

Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
---
 drivers/meson.build | 1 +
 lib/meson.build     | 1 +
 meson.build         | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/meson.build b/drivers/meson.build
index 216971f4e2..d19b47df12 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -95,6 +95,7 @@ foreach subpath:subdirs
         objs = []
         cflags = default_cflags
         includes = [include_directories(drv_path)]
+        dpdk_includes += [include_directories(drv_path)]
         # set up internal deps. Drivers can append/override as necessary
         deps = std_deps
         # ext_deps: Stores external library dependency got
diff --git a/lib/meson.build b/lib/meson.build
index f858844fa2..85113d0b47 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -190,6 +190,7 @@ foreach l:libraries
 
     libname = 'rte_' + name
     includes += include_directories(l)
+    dpdk_includes += include_directories(l)
 
     if developer_mode and is_windows and use_function_versioning
         message('@0@: Function versioning is not supported by Windows.'.format(name))
diff --git a/meson.build b/meson.build
index 1d35a255c3..d1cf039297 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,7 @@ cc = meson.get_compiler('c')
 dpdk_source_root = meson.current_source_dir()
 dpdk_build_root = meson.current_build_dir()
 dpdk_conf = configuration_data()
+dpdk_includes = []
 dpdk_libraries = []
 dpdk_static_libraries = []
 dpdk_shared_lib_deps = []
-- 
2.38.0


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

* Re: [PATCH 1/2] build: allow to conditionally build apps
  2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
  2022-10-12 14:47 ` [PATCH 2/2] build: export dpdk_includes for subproject usage Markus Theil
@ 2022-10-12 15:19 ` Bruce Richardson
  2022-10-13 15:11   ` Markus Theil
  2022-10-13 15:31 ` [PATCH v2 " Markus Theil
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Bruce Richardson @ 2022-10-12 15:19 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev

On Wed, Oct 12, 2022 at 04:47:03PM +0200, Markus Theil wrote:
> Makes apps configureable from meson, like already
> possible for drivers.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
>  app/meson.build   | 17 ++++++++++++-----
>  meson_options.txt |  4 ++++
>  2 files changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/app/meson.build b/app/meson.build
> index 93d8c15032..4d9c8ee814 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -1,6 +1,9 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
>  
> +enabled_apps = get_option('enable_apps')
> +disabled_apps = get_option('disable_apps')
> +
>  apps = [
>          'dumpcap',
>          'pdump',
> @@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
>  endif
>  
>  foreach app:apps
> -    build = true
> +    build = enabled_apps == '' or enabled_apps.contains(app)
> +    # let disabled_apps override enabled_apps
> +    if disabled_apps != ''
> +        build = build and not disabled_apps.contains(app)
> +    endif
>      name = app
>      sources = []
>      includes = []
> @@ -41,6 +48,10 @@ foreach app:apps
>      ext_deps = []
>      deps = []
>  
> +    if not build
> +        continue
> +    endif
> +
>      subdir(name)
>  
>      if build
> @@ -56,10 +67,6 @@ foreach app:apps
>          endforeach
>      endif
>  
> -    if not build
> -        continue
> -    endif
> -

Does this block not still need to be kept? Is it possible that build could
be set to false in the subdir or other logic?

/Bruce

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

* Re: [PATCH 2/2] build: export dpdk_includes for subproject usage.
  2022-10-12 14:47 ` [PATCH 2/2] build: export dpdk_includes for subproject usage Markus Theil
@ 2022-10-12 15:21   ` Bruce Richardson
  2022-10-13 15:12     ` Markus Theil
  0 siblings, 1 reply; 22+ messages in thread
From: Bruce Richardson @ 2022-10-12 15:21 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev, Thorben Roemer

On Wed, Oct 12, 2022 at 04:47:04PM +0200, Markus Theil wrote:
> From: Thorben Roemer <thorben.roemer@secunet.com>
> 
> In order to perform things like LTO more easily in
> our DPDK applications, we use DPDK as a meson subproject.
> Also export includes in order to be usable in this context.
> 
> Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
> ---
>  drivers/meson.build | 1 +
>  lib/meson.build     | 1 +
>  meson.build         | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/drivers/meson.build b/drivers/meson.build
> index 216971f4e2..d19b47df12 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -95,6 +95,7 @@ foreach subpath:subdirs
>          objs = []
>          cflags = default_cflags
>          includes = [include_directories(drv_path)]
> +        dpdk_includes += [include_directories(drv_path)]

I am not sure that by default we should include all the driver directories.
At most, we should only include those drivers which have header files to be
made public. I think initially though we should only export library paths.

/Bruce


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

* Re: [PATCH 1/2] build: allow to conditionally build apps
  2022-10-12 15:19 ` [PATCH 1/2] build: allow to conditionally build apps Bruce Richardson
@ 2022-10-13 15:11   ` Markus Theil
  2022-10-13 16:36     ` Bruce Richardson
  0 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-13 15:11 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On 10/12/22 17:19, Bruce Richardson wrote:
> On Wed, Oct 12, 2022 at 04:47:03PM +0200, Markus Theil wrote:
>> Makes apps configureable from meson, like already
>> possible for drivers.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>> ---
>>   app/meson.build   | 17 ++++++++++++-----
>>   meson_options.txt |  4 ++++
>>   2 files changed, 16 insertions(+), 5 deletions(-)
>>
>> diff --git a/app/meson.build b/app/meson.build
>> index 93d8c15032..4d9c8ee814 100644
>> --- a/app/meson.build
>> +++ b/app/meson.build
>> @@ -1,6 +1,9 @@
>>   # SPDX-License-Identifier: BSD-3-Clause
>>   # Copyright(c) 2017-2019 Intel Corporation
>>   
>> +enabled_apps = get_option('enable_apps')
>> +disabled_apps = get_option('disable_apps')
>> +
>>   apps = [
>>           'dumpcap',
>>           'pdump',
>> @@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
>>   endif
>>   
>>   foreach app:apps
>> -    build = true
>> +    build = enabled_apps == '' or enabled_apps.contains(app)
>> +    # let disabled_apps override enabled_apps
>> +    if disabled_apps != ''
>> +        build = build and not disabled_apps.contains(app)
>> +    endif
>>       name = app
>>       sources = []
>>       includes = []
>> @@ -41,6 +48,10 @@ foreach app:apps
>>       ext_deps = []
>>       deps = []
>>   
>> +    if not build
>> +        continue
>> +    endif
>> +
>>       subdir(name)
>>   
>>       if build
>> @@ -56,10 +67,6 @@ foreach app:apps
>>           endforeach
>>       endif
>>   
>> -    if not build
>> -        continue
>> -    endif
>> -
> Does this block not still need to be kept? Is it possible that build could
> be set to false in the subdir or other logic?
I will move the block to its old position in the next revision. Thanks 
for the hint.
> /Bruce

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

* Re: [PATCH 2/2] build: export dpdk_includes for subproject usage.
  2022-10-12 15:21   ` Bruce Richardson
@ 2022-10-13 15:12     ` Markus Theil
  0 siblings, 0 replies; 22+ messages in thread
From: Markus Theil @ 2022-10-13 15:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Thorben Roemer

On 10/12/22 17:21, Bruce Richardson wrote:
> On Wed, Oct 12, 2022 at 04:47:04PM +0200, Markus Theil wrote:
>> From: Thorben Roemer <thorben.roemer@secunet.com>
>>
>> In order to perform things like LTO more easily in
>> our DPDK applications, we use DPDK as a meson subproject.
>> Also export includes in order to be usable in this context.
>>
>> Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
>> ---
>>   drivers/meson.build | 1 +
>>   lib/meson.build     | 1 +
>>   meson.build         | 1 +
>>   3 files changed, 3 insertions(+)
>>
>> diff --git a/drivers/meson.build b/drivers/meson.build
>> index 216971f4e2..d19b47df12 100644
>> --- a/drivers/meson.build
>> +++ b/drivers/meson.build
>> @@ -95,6 +95,7 @@ foreach subpath:subdirs
>>           objs = []
>>           cflags = default_cflags
>>           includes = [include_directories(drv_path)]
>> +        dpdk_includes += [include_directories(drv_path)]
> I am not sure that by default we should include all the driver directories.
> At most, we should only include those drivers which have header files to be
> made public. I think initially though we should only export library paths.
I tried to only include libraries. At least for our DPDK-based 
application, the bonding and i40e includes are needed. I therefore tried 
to include all drivers exporting symbols to the dpdk_includes list in 
the following revision.
> /Bruce
>

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

* [PATCH v2 1/2] build: allow to conditionally build apps
  2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
  2022-10-12 14:47 ` [PATCH 2/2] build: export dpdk_includes for subproject usage Markus Theil
  2022-10-12 15:19 ` [PATCH 1/2] build: allow to conditionally build apps Bruce Richardson
@ 2022-10-13 15:31 ` Markus Theil
  2022-10-13 15:31   ` [PATCH v2 2/2] build: export dpdk_includes for subproject usage Markus Theil
  2022-10-13 15:35 ` [PATCH v3 1/2] build: allow to conditionally build apps Markus Theil
  2022-10-13 15:35 ` [PATCH v3 2/2] build: export dpdk_includes for subproject usage Markus Theil
  4 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-13 15:31 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Markus Theil

Makes apps configurable from meson, like already
possible for drivers.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 app/meson.build   | 9 ++++++++-
 meson_options.txt | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/app/meson.build b/app/meson.build
index 93d8c15032..24096e8108 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+enabled_apps = get_option('enable_apps')
+disabled_apps = get_option('disable_apps')
+
 apps = [
         'dumpcap',
         'pdump',
@@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
 endif
 
 foreach app:apps
-    build = true
+    build = enabled_apps == '' or enabled_apps.contains(app)
+    # let disabled_apps override enabled_apps
+    if disabled_apps != ''
+        build = build and not disabled_apps.contains(app)
+    endif
     name = app
     sources = []
     includes = []
diff --git a/meson_options.txt b/meson_options.txt
index 0574dd0fff..9f032d454d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,6 +6,8 @@ option('cpu_instruction_set', type: 'string', value: 'auto',
 	description: 'Set the target machine ISA (instruction set architecture). Will be set according to the platform option by default.')
 option('developer_mode', type: 'feature', description:
        'turn on additional build checks relevant for DPDK developers')
+option('disable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to explicitly disable.')
 option('disable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to explicitly disable.')
 option('disable_libs', type: 'string', value: 'kni', description:
@@ -14,6 +16,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', d
        'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
 option('enable_docs', type: 'boolean', value: false, description:
        'build documentation')
+option('enable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to build. If unspecified, build all apps.')
 option('enable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to build. If unspecified, build all drivers.')
 option('enable_driver_sdk', type: 'boolean', value: false, description:
-- 
2.38.0


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

* [PATCH v2 2/2] build: export dpdk_includes for subproject usage.
  2022-10-13 15:31 ` [PATCH v2 " Markus Theil
@ 2022-10-13 15:31   ` Markus Theil
  2022-10-13 15:41     ` Stephen Hemminger
  0 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-13 15:31 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Thorben Roemer

From: Thorben Roemer <thorben.roemer@secunet.com>

In order to perform things like LTO more easily in
our DPDK applications, we use DPDK as a meson subproject.
Also export includes in order to be usable in this context.

Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
---
 lib/meson.build | 1 +
 meson.build     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index f858844fa2..85113d0b47 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -190,6 +190,7 @@ foreach l:libraries
 
     libname = 'rte_' + name
     includes += include_directories(l)
+    dpdk_includes += include_directories(l)
 
     if developer_mode and is_windows and use_function_versioning
         message('@0@: Function versioning is not supported by Windows.'.format(name))
diff --git a/meson.build b/meson.build
index 1d35a255c3..d1cf039297 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,7 @@ cc = meson.get_compiler('c')
 dpdk_source_root = meson.current_source_dir()
 dpdk_build_root = meson.current_build_dir()
 dpdk_conf = configuration_data()
+dpdk_includes = []
 dpdk_libraries = []
 dpdk_static_libraries = []
 dpdk_shared_lib_deps = []
-- 
2.38.0


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

* [PATCH v3 1/2] build: allow to conditionally build apps
  2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
                   ` (2 preceding siblings ...)
  2022-10-13 15:31 ` [PATCH v2 " Markus Theil
@ 2022-10-13 15:35 ` Markus Theil
  2022-10-14  7:51   ` [PATCH v4 " Markus Theil
  2022-10-13 15:35 ` [PATCH v3 2/2] build: export dpdk_includes for subproject usage Markus Theil
  4 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-13 15:35 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Markus Theil

Makes apps configurable from meson, like already
possible for drivers.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 app/meson.build   | 9 ++++++++-
 meson_options.txt | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/app/meson.build b/app/meson.build
index 93d8c15032..24096e8108 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+enabled_apps = get_option('enable_apps')
+disabled_apps = get_option('disable_apps')
+
 apps = [
         'dumpcap',
         'pdump',
@@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
 endif
 
 foreach app:apps
-    build = true
+    build = enabled_apps == '' or enabled_apps.contains(app)
+    # let disabled_apps override enabled_apps
+    if disabled_apps != ''
+        build = build and not disabled_apps.contains(app)
+    endif
     name = app
     sources = []
     includes = []
diff --git a/meson_options.txt b/meson_options.txt
index 0574dd0fff..9f032d454d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,6 +6,8 @@ option('cpu_instruction_set', type: 'string', value: 'auto',
 	description: 'Set the target machine ISA (instruction set architecture). Will be set according to the platform option by default.')
 option('developer_mode', type: 'feature', description:
        'turn on additional build checks relevant for DPDK developers')
+option('disable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to explicitly disable.')
 option('disable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to explicitly disable.')
 option('disable_libs', type: 'string', value: 'kni', description:
@@ -14,6 +16,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', d
        'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
 option('enable_docs', type: 'boolean', value: false, description:
        'build documentation')
+option('enable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to build. If unspecified, build all apps.')
 option('enable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to build. If unspecified, build all drivers.')
 option('enable_driver_sdk', type: 'boolean', value: false, description:
-- 
2.38.0


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

* [PATCH v3 2/2] build: export dpdk_includes for subproject usage.
  2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
                   ` (3 preceding siblings ...)
  2022-10-13 15:35 ` [PATCH v3 1/2] build: allow to conditionally build apps Markus Theil
@ 2022-10-13 15:35 ` Markus Theil
  2022-10-13 16:38   ` Bruce Richardson
  4 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-13 15:35 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Thorben Roemer

From: Thorben Roemer <thorben.roemer@secunet.com>

In order to perform things like LTO more easily in
our DPDK applications, we use DPDK as a meson subproject.
Also export includes in order to be usable in this context.

Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
---
 drivers/baseband/fpga_5gnr_fec/meson.build | 2 ++
 drivers/dma/dpaa2/meson.build              | 2 ++
 drivers/event/dlb2/meson.build             | 2 ++
 drivers/mempool/dpaa2/meson.build          | 2 ++
 drivers/net/atlantic/meson.build           | 2 ++
 drivers/net/bnxt/meson.build               | 2 ++
 drivers/net/bonding/meson.build            | 2 ++
 drivers/net/cnxk/meson.build               | 2 ++
 drivers/net/dpaa/meson.build               | 2 ++
 drivers/net/dpaa2/meson.build              | 2 ++
 drivers/net/i40e/meson.build               | 2 ++
 drivers/net/iavf/meson.build               | 2 ++
 drivers/net/ixgbe/meson.build              | 2 ++
 drivers/net/memif/meson.build              | 2 ++
 drivers/net/mlx5/meson.build               | 2 ++
 drivers/net/ring/meson.build               | 2 ++
 drivers/net/softnic/meson.build            | 2 ++
 drivers/net/vhost/meson.build              | 2 ++
 drivers/raw/cnxk_bphy/meson.build          | 2 ++
 drivers/raw/cnxk_gpio/meson.build          | 2 ++
 drivers/raw/dpaa2_cmdif/meson.build        | 2 ++
 drivers/raw/ifpga/meson.build              | 2 ++
 drivers/raw/ntb/meson.build                | 2 ++
 lib/meson.build                            | 1 +
 meson.build                                | 1 +
 25 files changed, 48 insertions(+)

diff --git a/drivers/baseband/fpga_5gnr_fec/meson.build b/drivers/baseband/fpga_5gnr_fec/meson.build
index 745cd271f2..b2b218e9f9 100644
--- a/drivers/baseband/fpga_5gnr_fec/meson.build
+++ b/drivers/baseband/fpga_5gnr_fec/meson.build
@@ -6,3 +6,5 @@ deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
 sources = files('rte_fpga_5gnr_fec.c')
 
 headers = files('rte_pmd_fpga_5gnr_fec.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/dma/dpaa2/meson.build b/drivers/dma/dpaa2/meson.build
index a99151e2a5..672f820f16 100644
--- a/drivers/dma/dpaa2/meson.build
+++ b/drivers/dma/dpaa2/meson.build
@@ -16,3 +16,5 @@ if cc.has_argument('-Wno-pointer-arith')
 endif
 
 headers = files('rte_pmd_dpaa2_qdma.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build
index 20ef159ab3..aeffc5d4da 100644
--- a/drivers/event/dlb2/meson.build
+++ b/drivers/event/dlb2/meson.build
@@ -65,3 +65,5 @@ endif
 headers = files('rte_pmd_dlb2.h')
 
 deps += ['mbuf', 'mempool', 'ring', 'pci', 'bus_pci']
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/mempool/dpaa2/meson.build b/drivers/mempool/dpaa2/meson.build
index 3d16d44158..559d36d9a8 100644
--- a/drivers/mempool/dpaa2/meson.build
+++ b/drivers/mempool/dpaa2/meson.build
@@ -10,3 +10,5 @@ deps += ['bus_fslmc']
 sources = files('dpaa2_hw_mempool.c')
 
 headers = files('rte_dpaa2_mempool.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/atlantic/meson.build b/drivers/net/atlantic/meson.build
index bf5e47eaaf..6a6d176b45 100644
--- a/drivers/net/atlantic/meson.build
+++ b/drivers/net/atlantic/meson.build
@@ -17,3 +17,5 @@ sources = files(
         'hw_atl/hw_atl_utils.c',
         'rte_pmd_atlantic.c',
 )
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 09d494e90f..af9a58ac9e 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -68,3 +68,5 @@ if arch_subdir == 'x86'
 elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
     sources += files('bnxt_rxtx_vec_neon.c')
 endif
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build
index 29022712cb..41b0903374 100644
--- a/drivers/net/bonding/meson.build
+++ b/drivers/net/bonding/meson.build
@@ -23,3 +23,5 @@ deps += ['ip_frag']
 
 headers = files('rte_eth_bond.h', 'rte_eth_bond_8023ad.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build
index 5efb2000cf..d43f0b53d1 100644
--- a/drivers/net/cnxk/meson.build
+++ b/drivers/net/cnxk/meson.build
@@ -195,3 +195,5 @@ endforeach
 
 headers = files('rte_pmd_cnxk.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/dpaa/meson.build b/drivers/net/dpaa/meson.build
index 42e1f8c2e2..6927c3644c 100644
--- a/drivers/net/dpaa/meson.build
+++ b/drivers/net/dpaa/meson.build
@@ -21,3 +21,5 @@ if cc.has_argument('-Wno-pointer-arith')
 endif
 
 headers = files('rte_pmd_dpaa.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
index 51598c048c..d5f71deb29 100644
--- a/drivers/net/dpaa2/meson.build
+++ b/drivers/net/dpaa2/meson.build
@@ -27,3 +27,5 @@ sources = files(
 includes += include_directories('base', 'mc')
 
 headers = files('rte_pmd_dpaa2.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index e00c1a9ef9..1f64814608 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -92,3 +92,5 @@ elif arch_subdir == 'arm'
 endif
 
 headers = files('rte_pmd_i40e.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build
index 6df771f917..d27809059a 100644
--- a/drivers/net/iavf/meson.build
+++ b/drivers/net/iavf/meson.build
@@ -71,3 +71,5 @@ elif arch_subdir == 'arm'
 endif
 
 headers = files('rte_pmd_iavf.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/ixgbe/meson.build b/drivers/net/ixgbe/meson.build
index a18908ef7c..c2552276d5 100644
--- a/drivers/net/ixgbe/meson.build
+++ b/drivers/net/ixgbe/meson.build
@@ -36,3 +36,5 @@ endif
 includes += include_directories('base')
 
 headers = files('rte_pmd_ixgbe.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build
index 28416a982f..4cbe50fb2a 100644
--- a/drivers/net/memif/meson.build
+++ b/drivers/net/memif/meson.build
@@ -13,3 +13,5 @@ sources = files(
 
 deps += ['hash']
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 6a84d96380..9ecdcfda44 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -72,3 +72,5 @@ endif
 testpmd_sources += files('mlx5_testpmd.c')
 
 subdir(exec_env)
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build
index 72792e26b0..567857dcd8 100644
--- a/drivers/net/ring/meson.build
+++ b/drivers/net/ring/meson.build
@@ -10,3 +10,5 @@ endif
 sources = files('rte_eth_ring.c')
 headers = files('rte_eth_ring.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/softnic/meson.build b/drivers/net/softnic/meson.build
index 5dfbd16c77..451d70cddd 100644
--- a/drivers/net/softnic/meson.build
+++ b/drivers/net/softnic/meson.build
@@ -16,3 +16,5 @@ sources = files(
         'rte_eth_softnic_thread.c',
 )
 deps += ['pipeline', 'port', 'table']
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/net/vhost/meson.build b/drivers/net/vhost/meson.build
index f481a3a4b8..6023bcb179 100644
--- a/drivers/net/vhost/meson.build
+++ b/drivers/net/vhost/meson.build
@@ -10,3 +10,5 @@ endif
 deps += 'vhost'
 sources = files('rte_eth_vhost.c')
 headers = files('rte_eth_vhost.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/cnxk_bphy/meson.build b/drivers/raw/cnxk_bphy/meson.build
index ffb0ee6b7e..591a24321b 100644
--- a/drivers/raw/cnxk_bphy/meson.build
+++ b/drivers/raw/cnxk_bphy/meson.build
@@ -11,3 +11,5 @@ sources = files(
 )
 headers = files('rte_pmd_bphy.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/cnxk_gpio/meson.build b/drivers/raw/cnxk_gpio/meson.build
index f52a7be9eb..2139e21621 100644
--- a/drivers/raw/cnxk_gpio/meson.build
+++ b/drivers/raw/cnxk_gpio/meson.build
@@ -10,3 +10,5 @@ sources = files(
 )
 headers = files('rte_pmd_cnxk_gpio.h')
 pmd_supports_disable_iova_as_pa = true
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/dpaa2_cmdif/meson.build b/drivers/raw/dpaa2_cmdif/meson.build
index 3b1d3371b2..c01f4ceefd 100644
--- a/drivers/raw/dpaa2_cmdif/meson.build
+++ b/drivers/raw/dpaa2_cmdif/meson.build
@@ -5,3 +5,5 @@ deps += ['rawdev', 'mempool_dpaa2', 'bus_vdev']
 sources = files('dpaa2_cmdif.c')
 
 headers = files('rte_pmd_dpaa2_cmdif.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
index cc30dc8be7..28ec996bba 100644
--- a/drivers/raw/ifpga/meson.build
+++ b/drivers/raw/ifpga/meson.build
@@ -22,3 +22,5 @@ includes += include_directories('../../net/ipn3ke')
 includes += include_directories('../../net/i40e')
 
 headers = files('rte_pmd_ifpga.h')
+
+dpdk_includes += include_directories('.')
diff --git a/drivers/raw/ntb/meson.build b/drivers/raw/ntb/meson.build
index 9096f2b25a..b5a7693f60 100644
--- a/drivers/raw/ntb/meson.build
+++ b/drivers/raw/ntb/meson.build
@@ -5,3 +5,5 @@ deps += ['rawdev', 'mbuf', 'mempool', 'pci', 'bus_pci']
 sources = files('ntb.c',
                 'ntb_hw_intel.c')
 headers = files('rte_pmd_ntb.h')
+
+dpdk_includes += include_directories('.')
diff --git a/lib/meson.build b/lib/meson.build
index f858844fa2..85113d0b47 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -190,6 +190,7 @@ foreach l:libraries
 
     libname = 'rte_' + name
     includes += include_directories(l)
+    dpdk_includes += include_directories(l)
 
     if developer_mode and is_windows and use_function_versioning
         message('@0@: Function versioning is not supported by Windows.'.format(name))
diff --git a/meson.build b/meson.build
index 1d35a255c3..d1cf039297 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,7 @@ cc = meson.get_compiler('c')
 dpdk_source_root = meson.current_source_dir()
 dpdk_build_root = meson.current_build_dir()
 dpdk_conf = configuration_data()
+dpdk_includes = []
 dpdk_libraries = []
 dpdk_static_libraries = []
 dpdk_shared_lib_deps = []
-- 
2.38.0


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

* Re: [PATCH v2 2/2] build: export dpdk_includes for subproject usage.
  2022-10-13 15:31   ` [PATCH v2 2/2] build: export dpdk_includes for subproject usage Markus Theil
@ 2022-10-13 15:41     ` Stephen Hemminger
  0 siblings, 0 replies; 22+ messages in thread
From: Stephen Hemminger @ 2022-10-13 15:41 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev, Bruce Richardson, Thorben Roemer

On Thu, 13 Oct 2022 17:31:35 +0200
Markus Theil <markus.theil@tu-ilmenau.de> wrote:

> From: Thorben Roemer <thorben.roemer@secunet.com>
> 
> In order to perform things like LTO more easily in
> our DPDK applications, we use DPDK as a meson subproject.
> Also export includes in order to be usable in this context.
> 
> Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>

There was a PR to do the subproject already, but it seems to not
have been merged.

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

* Re: [PATCH 1/2] build: allow to conditionally build apps
  2022-10-13 15:11   ` Markus Theil
@ 2022-10-13 16:36     ` Bruce Richardson
  0 siblings, 0 replies; 22+ messages in thread
From: Bruce Richardson @ 2022-10-13 16:36 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev

On Thu, Oct 13, 2022 at 05:11:38PM +0200, Markus Theil wrote:
> On 10/12/22 17:19, Bruce Richardson wrote:
> > On Wed, Oct 12, 2022 at 04:47:03PM +0200, Markus Theil wrote:
> > > Makes apps configureable from meson, like already
> > > possible for drivers.
> > > 
> > > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> > > ---
> > >   app/meson.build   | 17 ++++++++++++-----
> > >   meson_options.txt |  4 ++++
> > >   2 files changed, 16 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/app/meson.build b/app/meson.build
> > > index 93d8c15032..4d9c8ee814 100644
> > > --- a/app/meson.build
> > > +++ b/app/meson.build
> > > @@ -1,6 +1,9 @@
> > >   # SPDX-License-Identifier: BSD-3-Clause
> > >   # Copyright(c) 2017-2019 Intel Corporation
> > > +enabled_apps = get_option('enable_apps')
> > > +disabled_apps = get_option('disable_apps')
> > > +
> > >   apps = [
> > >           'dumpcap',
> > >           'pdump',
> > > @@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
> > >   endif
> > >   foreach app:apps
> > > -    build = true
> > > +    build = enabled_apps == '' or enabled_apps.contains(app)
> > > +    # let disabled_apps override enabled_apps
> > > +    if disabled_apps != ''
> > > +        build = build and not disabled_apps.contains(app)
> > > +    endif
> > >       name = app
> > >       sources = []
> > >       includes = []
> > > @@ -41,6 +48,10 @@ foreach app:apps
> > >       ext_deps = []
> > >       deps = []
> > > +    if not build
> > > +        continue
> > > +    endif
> > > +
> > >       subdir(name)
> > >       if build
> > > @@ -56,10 +67,6 @@ foreach app:apps
> > >           endforeach
> > >       endif
> > > -    if not build
> > > -        continue
> > > -    endif
> > > -
> > Does this block not still need to be kept? Is it possible that build could
> > be set to false in the subdir or other logic?
> I will move the block to its old position in the next revision. Thanks for
> the hint.

Not sure you need to undo the move, you might just need two copies of the
check. If an app is explicitly disabled, you may want to skip the
"subdir()" call, so having two "if not build" checks would make sense.

/Bruce

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

* Re: [PATCH v3 2/2] build: export dpdk_includes for subproject usage.
  2022-10-13 15:35 ` [PATCH v3 2/2] build: export dpdk_includes for subproject usage Markus Theil
@ 2022-10-13 16:38   ` Bruce Richardson
  2022-10-14  7:56     ` Markus Theil
  0 siblings, 1 reply; 22+ messages in thread
From: Bruce Richardson @ 2022-10-13 16:38 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev, Thorben Roemer

On Thu, Oct 13, 2022 at 05:35:39PM +0200, Markus Theil wrote:
> From: Thorben Roemer <thorben.roemer@secunet.com>
> 
> In order to perform things like LTO more easily in
> our DPDK applications, we use DPDK as a meson subproject.
> Also export includes in order to be usable in this context.
> 
> Signed-off-by: Thorben Roemer <thorben.roemer@secunet.com>
> ---
>  drivers/baseband/fpga_5gnr_fec/meson.build | 2 ++
>  drivers/dma/dpaa2/meson.build              | 2 ++
>  drivers/event/dlb2/meson.build             | 2 ++
>  drivers/mempool/dpaa2/meson.build          | 2 ++
>  drivers/net/atlantic/meson.build           | 2 ++
>  drivers/net/bnxt/meson.build               | 2 ++
>  drivers/net/bonding/meson.build            | 2 ++
>  drivers/net/cnxk/meson.build               | 2 ++
>  drivers/net/dpaa/meson.build               | 2 ++
>  drivers/net/dpaa2/meson.build              | 2 ++
>  drivers/net/i40e/meson.build               | 2 ++
>  drivers/net/iavf/meson.build               | 2 ++
>  drivers/net/ixgbe/meson.build              | 2 ++
>  drivers/net/memif/meson.build              | 2 ++
>  drivers/net/mlx5/meson.build               | 2 ++
>  drivers/net/ring/meson.build               | 2 ++
>  drivers/net/softnic/meson.build            | 2 ++
>  drivers/net/vhost/meson.build              | 2 ++
>  drivers/raw/cnxk_bphy/meson.build          | 2 ++
>  drivers/raw/cnxk_gpio/meson.build          | 2 ++
>  drivers/raw/dpaa2_cmdif/meson.build        | 2 ++
>  drivers/raw/ifpga/meson.build              | 2 ++
>  drivers/raw/ntb/meson.build                | 2 ++
>  lib/meson.build                            | 1 +
>  meson.build                                | 1 +
>  25 files changed, 48 insertions(+)
> 

Rather than changing all these meson.build files, I think we should be able
to check in drivers/meson.build if the "headers" array is empty. If not,
then add the include path, otherwise skip it.

/Bruce

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

* [PATCH v4 1/2] build: allow to conditionally build apps
  2022-10-13 15:35 ` [PATCH v3 1/2] build: allow to conditionally build apps Markus Theil
@ 2022-10-14  7:51   ` Markus Theil
  2022-10-14  7:51     ` [PATCH v4 2/2] build: export dpdk_includes for subproject usage Markus Theil
                       ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Markus Theil @ 2022-10-14  7:51 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Markus Theil

Makes apps configurable from meson, like already
possible for drivers.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 app/meson.build   | 13 ++++++++++++-
 meson_options.txt |  4 ++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/app/meson.build b/app/meson.build
index 93d8c15032..96b9a78d3a 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+enabled_apps = get_option('enable_apps')
+disabled_apps = get_option('disable_apps')
+
 apps = [
         'dumpcap',
         'pdump',
@@ -27,7 +30,11 @@ if get_option('default_library') == 'static' and not is_windows
 endif
 
 foreach app:apps
-    build = true
+    build = enabled_apps == '' or enabled_apps.contains(app)
+    # let disabled_apps override enabled_apps
+    if disabled_apps != ''
+        build = build and not disabled_apps.contains(app)
+    endif
     name = app
     sources = []
     includes = []
@@ -41,6 +48,10 @@ foreach app:apps
     ext_deps = []
     deps = []
 
+    if not build
+        continue
+    endif
+
     subdir(name)
 
     if build
diff --git a/meson_options.txt b/meson_options.txt
index 0574dd0fff..9f032d454d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,6 +6,8 @@ option('cpu_instruction_set', type: 'string', value: 'auto',
 	description: 'Set the target machine ISA (instruction set architecture). Will be set according to the platform option by default.')
 option('developer_mode', type: 'feature', description:
        'turn on additional build checks relevant for DPDK developers')
+option('disable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to explicitly disable.')
 option('disable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to explicitly disable.')
 option('disable_libs', type: 'string', value: 'kni', description:
@@ -14,6 +16,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', d
        'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
 option('enable_docs', type: 'boolean', value: false, description:
        'build documentation')
+option('enable_apps', type: 'string', value: '', description:
+       'Comma-separated list of apps to build. If unspecified, build all apps.')
 option('enable_drivers', type: 'string', value: '', description:
        'Comma-separated list of drivers to build. If unspecified, build all drivers.')
 option('enable_driver_sdk', type: 'boolean', value: false, description:
-- 
2.38.0


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

* [PATCH v4 2/2] build: export dpdk_includes for subproject usage
  2022-10-14  7:51   ` [PATCH v4 " Markus Theil
@ 2022-10-14  7:51     ` Markus Theil
  2022-10-14  8:45       ` Bruce Richardson
  2022-10-14  8:44     ` [PATCH v4 1/2] build: allow to conditionally build apps Bruce Richardson
  2022-10-27 13:13     ` David Marchand
  2 siblings, 1 reply; 22+ messages in thread
From: Markus Theil @ 2022-10-14  7:51 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Markus Theil

In order to perform things like LTO more easily in
our DPDK applications, we use DPDK as a meson subproject.
Also export includes in order to be usable in this context.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/meson.build | 4 ++++
 lib/meson.build     | 1 +
 meson.build         | 1 +
 3 files changed, 6 insertions(+)

diff --git a/drivers/meson.build b/drivers/meson.build
index 216971f4e2..15ac600768 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -174,6 +174,10 @@ foreach subpath:subdirs
             install_headers(driver_sdk_headers)
         endif
 
+        if headers.length() > 0
+            dpdk_includes += include_directories(drv_path)
+        endif
+
         # generate pmdinfo sources by building a temporary
         # lib and then running pmdinfogen on the contents of
         # that lib. The final lib reuses the object files and
diff --git a/lib/meson.build b/lib/meson.build
index f858844fa2..85113d0b47 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -190,6 +190,7 @@ foreach l:libraries
 
     libname = 'rte_' + name
     includes += include_directories(l)
+    dpdk_includes += include_directories(l)
 
     if developer_mode and is_windows and use_function_versioning
         message('@0@: Function versioning is not supported by Windows.'.format(name))
diff --git a/meson.build b/meson.build
index 1d35a255c3..d1cf039297 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,7 @@ cc = meson.get_compiler('c')
 dpdk_source_root = meson.current_source_dir()
 dpdk_build_root = meson.current_build_dir()
 dpdk_conf = configuration_data()
+dpdk_includes = []
 dpdk_libraries = []
 dpdk_static_libraries = []
 dpdk_shared_lib_deps = []
-- 
2.38.0


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

* Re: [PATCH v3 2/2] build: export dpdk_includes for subproject usage.
  2022-10-13 16:38   ` Bruce Richardson
@ 2022-10-14  7:56     ` Markus Theil
  0 siblings, 0 replies; 22+ messages in thread
From: Markus Theil @ 2022-10-14  7:56 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Thorben Roemer

On 10/13/22 18:38, Bruce Richardson wrote:
> Rather than changing all these meson.build files, I think we should be able
> to check in drivers/meson.build if the "headers" array is empty. If not,
> then add the include path, otherwise skip it.
Thanks for the feedback. Changed in v4.
> /Bruce

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

* Re: [PATCH v4 1/2] build: allow to conditionally build apps
  2022-10-14  7:51   ` [PATCH v4 " Markus Theil
  2022-10-14  7:51     ` [PATCH v4 2/2] build: export dpdk_includes for subproject usage Markus Theil
@ 2022-10-14  8:44     ` Bruce Richardson
  2022-10-28 12:31       ` David Marchand
  2022-10-27 13:13     ` David Marchand
  2 siblings, 1 reply; 22+ messages in thread
From: Bruce Richardson @ 2022-10-14  8:44 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev

On Fri, Oct 14, 2022 at 09:51:17AM +0200, Markus Theil wrote:
> Makes apps configurable from meson, like already
> possible for drivers.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---

Seems reasonable enough.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [PATCH v4 2/2] build: export dpdk_includes for subproject usage
  2022-10-14  7:51     ` [PATCH v4 2/2] build: export dpdk_includes for subproject usage Markus Theil
@ 2022-10-14  8:45       ` Bruce Richardson
  0 siblings, 0 replies; 22+ messages in thread
From: Bruce Richardson @ 2022-10-14  8:45 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev

On Fri, Oct 14, 2022 at 09:51:18AM +0200, Markus Theil wrote:
> In order to perform things like LTO more easily in
> our DPDK applications, we use DPDK as a meson subproject.
> Also export includes in order to be usable in this context.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [PATCH v4 1/2] build: allow to conditionally build apps
  2022-10-14  7:51   ` [PATCH v4 " Markus Theil
  2022-10-14  7:51     ` [PATCH v4 2/2] build: export dpdk_includes for subproject usage Markus Theil
  2022-10-14  8:44     ` [PATCH v4 1/2] build: allow to conditionally build apps Bruce Richardson
@ 2022-10-27 13:13     ` David Marchand
  2022-10-27 14:22       ` David Marchand
  2 siblings, 1 reply; 22+ messages in thread
From: David Marchand @ 2022-10-27 13:13 UTC (permalink / raw)
  To: Markus Theil, Bruce Richardson; +Cc: dev

On Fri, Oct 14, 2022 at 9:51 AM Markus Theil <markus.theil@tu-ilmenau.de> wrote:
>
> Makes apps configurable from meson, like already
> possible for drivers.
>
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>

With these new options, it's hard to tell which and why some
application is built (or not).
Can we have an output similar to libraries and drivers (see toplevel
meson.build) ?


-- 
David Marchand


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

* Re: [PATCH v4 1/2] build: allow to conditionally build apps
  2022-10-27 13:13     ` David Marchand
@ 2022-10-27 14:22       ` David Marchand
  2022-10-28  6:43         ` Markus Theil
  0 siblings, 1 reply; 22+ messages in thread
From: David Marchand @ 2022-10-27 14:22 UTC (permalink / raw)
  To: Markus Theil, Bruce Richardson; +Cc: dev

On Thu, Oct 27, 2022 at 3:13 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Oct 14, 2022 at 9:51 AM Markus Theil <markus.theil@tu-ilmenau.de> wrote:
> >
> > Makes apps configurable from meson, like already
> > possible for drivers.
> >
> > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>
> With these new options, it's hard to tell which and why some
> application is built (or not).
> Can we have an output similar to libraries and drivers (see toplevel
> meson.build) ?

WDYT of followup patch: https://github.com/david-marchand/dpdk/commit/apps


-- 
David Marchand


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

* Re: [PATCH v4 1/2] build: allow to conditionally build apps
  2022-10-27 14:22       ` David Marchand
@ 2022-10-28  6:43         ` Markus Theil
  0 siblings, 0 replies; 22+ messages in thread
From: Markus Theil @ 2022-10-28  6:43 UTC (permalink / raw)
  To: David Marchand, Bruce Richardson; +Cc: dev

On 10/27/22 16:22, David Marchand wrote:
> On Thu, Oct 27, 2022 at 3:13 PM David Marchand
> <david.marchand@redhat.com> wrote:
>> On Fri, Oct 14, 2022 at 9:51 AM Markus Theil <markus.theil@tu-ilmenau.de> wrote:
>>> Makes apps configurable from meson, like already
>>> possible for drivers.
>>>
>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>> With these new options, it's hard to tell which and why some
>> application is built (or not).
>> Can we have an output similar to libraries and drivers (see toplevel
>> meson.build) ?
> WDYT of followup patch: https://github.com/david-marchand/dpdk/commit/apps
>
>
LGTM

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

* Re: [PATCH v4 1/2] build: allow to conditionally build apps
  2022-10-14  8:44     ` [PATCH v4 1/2] build: allow to conditionally build apps Bruce Richardson
@ 2022-10-28 12:31       ` David Marchand
  0 siblings, 0 replies; 22+ messages in thread
From: David Marchand @ 2022-10-28 12:31 UTC (permalink / raw)
  To: Markus Theil, Bruce Richardson; +Cc: dev

On Fri, Oct 14, 2022 at 10:45 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Fri, Oct 14, 2022 at 09:51:17AM +0200, Markus Theil wrote:
> > Makes apps configurable from meson, like already
> > possible for drivers.
> >
> > Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Series applied, thanks.
I'll send the followup patch I suggested, please (formally) review it.


-- 
David Marchand


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

end of thread, other threads:[~2022-10-28 12:32 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 14:47 [PATCH 1/2] build: allow to conditionally build apps Markus Theil
2022-10-12 14:47 ` [PATCH 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-12 15:21   ` Bruce Richardson
2022-10-13 15:12     ` Markus Theil
2022-10-12 15:19 ` [PATCH 1/2] build: allow to conditionally build apps Bruce Richardson
2022-10-13 15:11   ` Markus Theil
2022-10-13 16:36     ` Bruce Richardson
2022-10-13 15:31 ` [PATCH v2 " Markus Theil
2022-10-13 15:31   ` [PATCH v2 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-13 15:41     ` Stephen Hemminger
2022-10-13 15:35 ` [PATCH v3 1/2] build: allow to conditionally build apps Markus Theil
2022-10-14  7:51   ` [PATCH v4 " Markus Theil
2022-10-14  7:51     ` [PATCH v4 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-14  8:45       ` Bruce Richardson
2022-10-14  8:44     ` [PATCH v4 1/2] build: allow to conditionally build apps Bruce Richardson
2022-10-28 12:31       ` David Marchand
2022-10-27 13:13     ` David Marchand
2022-10-27 14:22       ` David Marchand
2022-10-28  6:43         ` Markus Theil
2022-10-13 15:35 ` [PATCH v3 2/2] build: export dpdk_includes for subproject usage Markus Theil
2022-10-13 16:38   ` Bruce Richardson
2022-10-14  7:56     ` Markus Theil

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