* [PATCH 0/6] allow more DPDK libraries to be disabled on build
@ 2022-01-13 17:39 Bruce Richardson
2022-01-13 17:39 ` [PATCH 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
` (9 more replies)
0 siblings, 10 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
A common request on-list has been to allow more of the DPDK build to be disabled by those who are
doing their own builds and only use a subset of the libraries. To this end, this patchset makes some
infrastructure changes [first two patches] to make it easier to have libraries disabled, and then
adds a six libraries to the "optional" list.
Bruce Richardson (6):
lib: allow recursive disabling of libs in build
app/test: link unit test binary against all available libs
build: add node library to optional list
build: add flow classification library to optional list
build: add "packet framework" libs to optional list
build: add cfgfile library to optional list
app/test/meson.build | 74 ++++++++++++--------------------------------
lib/meson.build | 30 ++++++++++++------
2 files changed, 40 insertions(+), 64 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 1/6] lib: allow recursive disabling of libs in build
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
@ 2022-01-13 17:39 ` Bruce Richardson
2022-01-13 17:39 ` [PATCH 2/6] app/test: link unit test binary against all available libs Bruce Richardson
` (8 subsequent siblings)
9 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Align the code in lib/meson.build with that in drivers/meson.build to
enable recursive disabling of libraries, i.e. if library b depends on
library a, disable library b if a is disabled (either explicitly or
implicitly). This allows libraries to be optional even if other DPDK
libs depend on them, something that was not previously possible.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/meson.build | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/lib/meson.build b/lib/meson.build
index fbaa6ef7c2..af4662e942 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -134,23 +134,29 @@ foreach l:libraries
warning('Library name, "@0@", and directory name, "@1@", do not match'.format(name, l))
endif
- if not build
- dpdk_libs_disabled += name
- set_variable(name.underscorify() + '_disable_reason', reason)
- continue
- endif
-
shared_deps = ext_deps
static_deps = ext_deps
foreach d:deps
+ if not build
+ break
+ endif
if not is_variable('shared_rte_' + d)
- error('Missing internal dependency "@0@" for @1@ [@2@]'
+ build = false
+ reason = 'missing internal dependency, "@0@"'.format(d)
+ message('Disabling @1@ [@2@]: missing internal dependency "@0@"'
.format(d, name, 'lib/' + l))
+ else
+ shared_deps += [get_variable('shared_rte_' + d)]
+ static_deps += [get_variable('static_rte_' + d)]
endif
- shared_deps += [get_variable('shared_rte_' + d)]
- static_deps += [get_variable('static_rte_' + d)]
endforeach
+ if not build
+ dpdk_libs_disabled += name
+ set_variable(name.underscorify() + '_disable_reason', reason)
+ continue
+ endif
+
enabled_libs += name
dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)
install_headers(headers)
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 2/6] app/test: link unit test binary against all available libs
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
2022-01-13 17:39 ` [PATCH 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
@ 2022-01-13 17:39 ` Bruce Richardson
2022-01-19 16:51 ` David Marchand
2022-01-13 17:39 ` [PATCH 3/6] build: add node library to optional list Bruce Richardson
` (7 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Rather than maintaining a list of the libraries the unit tests need, and
having to conditionally include/omit optional libs from the list, we can
just link against all available libraries, simplifying the code
considerably.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 47 +-------------------------------------------
1 file changed, 1 insertion(+), 46 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 344a609a4d..9919de4307 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -157,39 +157,7 @@ test_sources = files(
'virtual_pmd.c',
)
-test_deps = [
- 'acl',
- 'bus_pci',
- 'bus_vdev',
- 'bpf',
- 'cfgfile',
- 'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
- 'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
- 'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
- 'rcu',
- 'reorder',
- 'rib',
- 'ring',
- 'security',
- 'stack',
- 'telemetry',
- 'timer',
-]
+test_deps = enabled_libs
# Each test is marked with flag true/false
# to indicate whether it can run in no-huge mode.
@@ -380,7 +348,6 @@ if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
if dpdk_conf.has('RTE_LIB_METRICS')
- test_deps += 'metrics'
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
@@ -410,17 +377,14 @@ if dpdk_conf.has('RTE_NET_RING')
perf_test_names += 'ring_pmd_perf_autotest'
fast_tests += [['event_eth_tx_adapter_autotest', false]]
if dpdk_conf.has('RTE_LIB_BITRATESTATS')
- test_deps += 'bitratestats'
test_sources += 'test_bitratestats.c'
fast_tests += [['bitratestats_autotest', true]]
endif
if dpdk_conf.has('RTE_LIB_LATENCYSTATS')
- test_deps += 'latencystats'
test_sources += 'test_latencystats.c'
fast_tests += [['latencystats_autotest', true]]
endif
if dpdk_conf.has('RTE_LIB_PDUMP')
- test_deps += 'pdump'
test_sources += 'test_pdump.c'
fast_tests += [['pdump_autotest', true]]
endif
@@ -434,18 +398,10 @@ endif
if dpdk_conf.has('RTE_HAS_LIBPCAP')
ext_deps += pcap_dep
if dpdk_conf.has('RTE_LIB_PCAPNG')
- test_deps += 'pcapng'
test_sources += 'test_pcapng.c'
endif
endif
-if dpdk_conf.has('RTE_LIB_POWER')
- test_deps += 'power'
-endif
-if dpdk_conf.has('RTE_LIB_KNI')
- test_deps += 'kni'
-endif
-
if cc.has_argument('-Wno-format-truncation')
cflags += '-Wno-format-truncation'
endif
@@ -462,7 +418,6 @@ if dpdk_conf.has('RTE_LIB_COMPRESSDEV')
if compress_test_dep.found()
test_dep_objs += compress_test_dep
test_sources += 'test_compressdev.c'
- test_deps += 'compressdev'
fast_tests += [['compressdev_autotest', false]]
endif
endif
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 3/6] build: add node library to optional list
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
2022-01-13 17:39 ` [PATCH 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
2022-01-13 17:39 ` [PATCH 2/6] app/test: link unit test binary against all available libs Bruce Richardson
@ 2022-01-13 17:39 ` Bruce Richardson
2022-01-13 17:39 ` [PATCH 4/6] build: add flow classification " Bruce Richardson
` (6 subsequent siblings)
9 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Allow the 'node' library to be disabled in builds
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/meson.build b/lib/meson.build
index af4662e942..dd20fe70a6 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -74,6 +74,7 @@ optional_libs = [
'jobstats',
'latencystats',
'metrics',
+ 'node',
'pdump',
'power',
'vhost',
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 4/6] build: add flow classification library to optional list
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (2 preceding siblings ...)
2022-01-13 17:39 ` [PATCH 3/6] build: add node library to optional list Bruce Richardson
@ 2022-01-13 17:39 ` Bruce Richardson
2022-01-13 17:39 ` [PATCH 5/6] build: add "packet framework" libs " Bruce Richardson
` (5 subsequent siblings)
9 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Add the flow_classify library to the list of optional libraries, and
ensure tests can build with it disabled.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 7 +++++--
lib/meson.build | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 9919de4307..a92dd0c1f0 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -65,7 +65,6 @@ test_sources = files(
'test_fib6.c',
'test_fib6_perf.c',
'test_func_reentrancy.c',
- 'test_flow_classify.c',
'test_graph.c',
'test_graph_perf.c',
'test_hash.c',
@@ -194,7 +193,6 @@ fast_tests = [
['fib_autotest', true],
['fib6_autotest', true],
['func_reentrancy_autotest', false],
- ['flow_classify_autotest', false],
['hash_autotest', true],
['interrupt_autotest', true],
['ipfrag_autotest', false],
@@ -347,6 +345,11 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
+
+if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')
+ test_sources += 'test_flow_classify.c'
+ fast_tests += [['flow_classify_autotest', false]]
+endif
if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
diff --git a/lib/meson.build b/lib/meson.build
index dd20fe70a6..ede5199374 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -67,6 +67,7 @@ libraries = [
optional_libs = [
'bitratestats',
+ 'flow_classify',
'gpudev',
'gro',
'gso',
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 5/6] build: add "packet framework" libs to optional list
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (3 preceding siblings ...)
2022-01-13 17:39 ` [PATCH 4/6] build: add flow classification " Bruce Richardson
@ 2022-01-13 17:39 ` Bruce Richardson
2022-01-13 17:39 ` [PATCH 6/6] build: add cfgfile library " Bruce Richardson
` (4 subsequent siblings)
9 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Add port, table and pipeline libraries - collectively often known as
the "packet framework" - to the list of optional libraries, and
ensure tests can build with them disabled.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 20 +++++++++++++-------
lib/meson.build | 3 +++
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index a92dd0c1f0..ba62e5e98c 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -135,12 +135,6 @@ test_sources = files(
'test_stack.c',
'test_stack_perf.c',
'test_string_fns.c',
- 'test_table.c',
- 'test_table_acl.c',
- 'test_table_combined.c',
- 'test_table_pipeline.c',
- 'test_table_ports.c',
- 'test_table_tables.c',
'test_tailq.c',
'test_thash.c',
'test_thash_perf.c',
@@ -227,7 +221,6 @@ fast_tests = [
['stack_autotest', false],
['stack_lf_autotest', false],
['string_autotest', true],
- ['table_autotest', true],
['tailq_autotest', true],
['ticketlock_autotest', true],
['timer_autotest', false],
@@ -358,6 +351,19 @@ if dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
+if dpdk_conf.has('RTE_LIB_PIPELINE')
+# pipeline lib depends on port and table libs, so those must be present
+# if pipeline library is.
+ test_sources += [
+ 'test_table.c',
+ 'test_table_acl.c',
+ 'test_table_combined.c',
+ 'test_table_pipeline.c',
+ 'test_table_ports.c',
+ 'test_table_tables.c',
+ ]
+ fast_tests += [['table_autotest', true]]
+endif
# The following linkages of drivers are required because
# they are used via a driver-specific API.
diff --git a/lib/meson.build b/lib/meson.build
index ede5199374..dcc1b4d835 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -77,7 +77,10 @@ optional_libs = [
'metrics',
'node',
'pdump',
+ 'pipeline',
+ 'port',
'power',
+ 'table',
'vhost',
]
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 6/6] build: add cfgfile library to optional list
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (4 preceding siblings ...)
2022-01-13 17:39 ` [PATCH 5/6] build: add "packet framework" libs " Bruce Richardson
@ 2022-01-13 17:39 ` Bruce Richardson
2022-01-13 18:26 ` [PATCH 0/6] allow more DPDK libraries to be disabled on build Stephen Hemminger
` (3 subsequent siblings)
9 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-13 17:39 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
Allow disabling of the cfgfile library in builds.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/meson.build b/lib/meson.build
index dcc1b4d835..8e5acd7819 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -67,6 +67,7 @@ libraries = [
optional_libs = [
'bitratestats',
+ 'cfgfile',
'flow_classify',
'gpudev',
'gro',
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/6] allow more DPDK libraries to be disabled on build
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (5 preceding siblings ...)
2022-01-13 17:39 ` [PATCH 6/6] build: add cfgfile library " Bruce Richardson
@ 2022-01-13 18:26 ` Stephen Hemminger
2022-01-14 8:07 ` Morten Brørup
` (2 subsequent siblings)
9 siblings, 0 replies; 21+ messages in thread
From: Stephen Hemminger @ 2022-01-13 18:26 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Thu, 13 Jan 2022 17:39:12 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:
> A common request on-list has been to allow more of the DPDK build to be disabled by those who are
> doing their own builds and only use a subset of the libraries. To this end, this patchset makes some
> infrastructure changes [first two patches] to make it easier to have libraries disabled, and then
> adds a six libraries to the "optional" list.
>
> Bruce Richardson (6):
> lib: allow recursive disabling of libs in build
> app/test: link unit test binary against all available libs
> build: add node library to optional list
> build: add flow classification library to optional list
> build: add "packet framework" libs to optional list
> build: add cfgfile library to optional list
>
> app/test/meson.build | 74 ++++++++++++--------------------------------
> lib/meson.build | 30 ++++++++++++------
> 2 files changed, 40 insertions(+), 64 deletions(-)
>
> --
> 2.32.0
>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: [PATCH 0/6] allow more DPDK libraries to be disabled on build
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (6 preceding siblings ...)
2022-01-13 18:26 ` [PATCH 0/6] allow more DPDK libraries to be disabled on build Stephen Hemminger
@ 2022-01-14 8:07 ` Morten Brørup
2022-01-19 16:52 ` David Marchand
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
9 siblings, 0 replies; 21+ messages in thread
From: Morten Brørup @ 2022-01-14 8:07 UTC (permalink / raw)
To: Bruce Richardson, dev
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Thursday, 13 January 2022 18.39
>
> A common request on-list has been to allow more of the DPDK build to be
> disabled by those who are
> doing their own builds and only use a subset of the libraries. To this
> end, this patchset makes some
> infrastructure changes [first two patches] to make it easier to have
> libraries disabled, and then
> adds a six libraries to the "optional" list.
>
> Bruce Richardson (6):
> lib: allow recursive disabling of libs in build
> app/test: link unit test binary against all available libs
> build: add node library to optional list
> build: add flow classification library to optional list
> build: add "packet framework" libs to optional list
> build: add cfgfile library to optional list
>
> app/test/meson.build | 74 ++++++++++++--------------------------------
> lib/meson.build | 30 ++++++++++++------
> 2 files changed, 40 insertions(+), 64 deletions(-)
>
> --
> 2.32.0
>
Thank you very much, Bruce!
Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/6] app/test: link unit test binary against all available libs
2022-01-13 17:39 ` [PATCH 2/6] app/test: link unit test binary against all available libs Bruce Richardson
@ 2022-01-19 16:51 ` David Marchand
2022-01-19 17:25 ` Bruce Richardson
0 siblings, 1 reply; 21+ messages in thread
From: David Marchand @ 2022-01-19 16:51 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Thu, Jan 13, 2022 at 6:40 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Rather than maintaining a list of the libraries the unit tests need, and
> having to conditionally include/omit optional libs from the list, we can
> just link against all available libraries, simplifying the code
> considerably.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> app/test/meson.build | 47 +-------------------------------------------
> 1 file changed, 1 insertion(+), 46 deletions(-)
>
> diff --git a/app/test/meson.build b/app/test/meson.build
> index 344a609a4d..9919de4307 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -157,39 +157,7 @@ test_sources = files(
> 'virtual_pmd.c',
> )
>
> -test_deps = [
> - 'acl',
> - 'bus_pci',
> - 'bus_vdev',
bus_pci and bus_vdev are not "libraries", but "drivers" dependencies
and must be kept.
This probably explains an error seen in UNH test report for a job that
disables all but those bus drivers and net/hns3:
http://mails.dpdk.org/archives/test-report/2022-January/251477.html
--
David Marchand
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/6] allow more DPDK libraries to be disabled on build
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (7 preceding siblings ...)
2022-01-14 8:07 ` Morten Brørup
@ 2022-01-19 16:52 ` David Marchand
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
9 siblings, 0 replies; 21+ messages in thread
From: David Marchand @ 2022-01-19 16:52 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Thu, Jan 13, 2022 at 6:40 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> A common request on-list has been to allow more of the DPDK build to be disabled by those who are
> doing their own builds and only use a subset of the libraries. To this end, this patchset makes some
> infrastructure changes [first two patches] to make it easier to have libraries disabled, and then
> adds a six libraries to the "optional" list.
>
> Bruce Richardson (6):
> lib: allow recursive disabling of libs in build
> app/test: link unit test binary against all available libs
> build: add node library to optional list
> build: add flow classification library to optional list
> build: add "packet framework" libs to optional list
> build: add cfgfile library to optional list
>
> app/test/meson.build | 74 ++++++++++++--------------------------------
> lib/meson.build | 30 ++++++++++++------
> 2 files changed, 40 insertions(+), 64 deletions(-)
Except an issue in patch 2, this series looks good to me.
Thanks Bruce.
--
David Marchand
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 2/6] app/test: link unit test binary against all available libs
2022-01-19 16:51 ` David Marchand
@ 2022-01-19 17:25 ` Bruce Richardson
0 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 17:25 UTC (permalink / raw)
To: David Marchand; +Cc: dev
On Wed, Jan 19, 2022 at 05:51:20PM +0100, David Marchand wrote:
> On Thu, Jan 13, 2022 at 6:40 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Rather than maintaining a list of the libraries the unit tests need, and
> > having to conditionally include/omit optional libs from the list, we can
> > just link against all available libraries, simplifying the code
> > considerably.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > app/test/meson.build | 47 +-------------------------------------------
> > 1 file changed, 1 insertion(+), 46 deletions(-)
> >
> > diff --git a/app/test/meson.build b/app/test/meson.build
> > index 344a609a4d..9919de4307 100644
> > --- a/app/test/meson.build
> > +++ b/app/test/meson.build
> > @@ -157,39 +157,7 @@ test_sources = files(
> > 'virtual_pmd.c',
> > )
> >
> > -test_deps = [
> > - 'acl',
> > - 'bus_pci',
> > - 'bus_vdev',
>
> bus_pci and bus_vdev are not "libraries", but "drivers" dependencies
> and must be kept.
> This probably explains an error seen in UNH test report for a job that
> disables all but those bus drivers and net/hns3:
> http://mails.dpdk.org/archives/test-report/2022-January/251477.html
>
Thanks for flagging this, I'll update the set.
/Bruce
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 0/6] allow more DPDK libs to be disabled on build
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
` (8 preceding siblings ...)
2022-01-19 16:52 ` David Marchand
@ 2022-01-19 18:09 ` Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
` (7 more replies)
9 siblings, 8 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:09 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson
*A common request on-list has been to allow more of the DPDK build to be disabled by those who are
doing their own builds and only use a subset of the libraries. To this end, this patchset makes some
infrastructure changes [first two patches] to make it easier to have libraries disabled, and then
adds a six libraries to the "optional" list.
V2: fix missing PCI and vdev bus driver dependencies in patch 2.
Bruce Richardson (6):
lib: allow recursive disabling of libs in build
app/test: link unit test binary against all available libs
build: add node library to optional list
build: add flow classification library to optional list
build: add "packet framework" libs to optional list
build: add cfgfile library to optional list
app/test/meson.build | 76 ++++++++++++--------------------------------
lib/meson.build | 30 +++++++++++------
2 files changed, 42 insertions(+), 64 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 1/6] lib: allow recursive disabling of libs in build
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
@ 2022-01-19 18:09 ` Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 2/6] app/test: link unit test binary against all available libs Bruce Richardson
` (6 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:09 UTC (permalink / raw)
To: dev
Cc: david.marchand, Bruce Richardson, Stephen Hemminger, Morten Brørup
Align the code in lib/meson.build with that in drivers/meson.build to
enable recursive disabling of libraries, i.e. if library b depends on
library a, disable library b if a is disabled (either explicitly or
implicitly). This allows libraries to be optional even if other DPDK
libs depend on them, something that was not previously possible.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/meson.build | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/lib/meson.build b/lib/meson.build
index fbaa6ef7c2..af4662e942 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -134,23 +134,29 @@ foreach l:libraries
warning('Library name, "@0@", and directory name, "@1@", do not match'.format(name, l))
endif
- if not build
- dpdk_libs_disabled += name
- set_variable(name.underscorify() + '_disable_reason', reason)
- continue
- endif
-
shared_deps = ext_deps
static_deps = ext_deps
foreach d:deps
+ if not build
+ break
+ endif
if not is_variable('shared_rte_' + d)
- error('Missing internal dependency "@0@" for @1@ [@2@]'
+ build = false
+ reason = 'missing internal dependency, "@0@"'.format(d)
+ message('Disabling @1@ [@2@]: missing internal dependency "@0@"'
.format(d, name, 'lib/' + l))
+ else
+ shared_deps += [get_variable('shared_rte_' + d)]
+ static_deps += [get_variable('static_rte_' + d)]
endif
- shared_deps += [get_variable('shared_rte_' + d)]
- static_deps += [get_variable('static_rte_' + d)]
endforeach
+ if not build
+ dpdk_libs_disabled += name
+ set_variable(name.underscorify() + '_disable_reason', reason)
+ continue
+ endif
+
enabled_libs += name
dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)
install_headers(headers)
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 2/6] app/test: link unit test binary against all available libs
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
@ 2022-01-19 18:09 ` Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 3/6] build: add node library to optional list Bruce Richardson
` (5 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:09 UTC (permalink / raw)
To: dev
Cc: david.marchand, Bruce Richardson, Stephen Hemminger, Morten Brørup
Rather than maintaining a list of the libraries the unit tests need, and
having to conditionally include/omit optional libs from the list, we can
just link against all available libraries, simplifying the code
considerably.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
app/test/meson.build | 49 +++-----------------------------------------
1 file changed, 3 insertions(+), 46 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 344a609a4d..210e03fbff 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -157,39 +157,9 @@ test_sources = files(
'virtual_pmd.c',
)
-test_deps = [
- 'acl',
- 'bus_pci',
- 'bus_vdev',
- 'bpf',
- 'cfgfile',
- 'cmdline',
- 'cryptodev',
- 'distributor',
- 'dmadev',
- 'efd',
- 'ethdev',
- 'eventdev',
- 'fib',
- 'flow_classify',
- 'graph',
- 'hash',
- 'ipsec',
- 'lpm',
- 'member',
- 'node',
- 'pipeline',
- 'port',
- 'rawdev',
- 'rcu',
- 'reorder',
- 'rib',
- 'ring',
- 'security',
- 'stack',
- 'telemetry',
- 'timer',
-]
+test_deps = enabled_libs
+# as well as libs, the pci and vdev bus drivers are needed for a lot of tests
+test_deps += ['bus_pci', 'bus_vdev']
# Each test is marked with flag true/false
# to indicate whether it can run in no-huge mode.
@@ -380,7 +350,6 @@ if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
if dpdk_conf.has('RTE_LIB_METRICS')
- test_deps += 'metrics'
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
endif
@@ -410,17 +379,14 @@ if dpdk_conf.has('RTE_NET_RING')
perf_test_names += 'ring_pmd_perf_autotest'
fast_tests += [['event_eth_tx_adapter_autotest', false]]
if dpdk_conf.has('RTE_LIB_BITRATESTATS')
- test_deps += 'bitratestats'
test_sources += 'test_bitratestats.c'
fast_tests += [['bitratestats_autotest', true]]
endif
if dpdk_conf.has('RTE_LIB_LATENCYSTATS')
- test_deps += 'latencystats'
test_sources += 'test_latencystats.c'
fast_tests += [['latencystats_autotest', true]]
endif
if dpdk_conf.has('RTE_LIB_PDUMP')
- test_deps += 'pdump'
test_sources += 'test_pdump.c'
fast_tests += [['pdump_autotest', true]]
endif
@@ -434,18 +400,10 @@ endif
if dpdk_conf.has('RTE_HAS_LIBPCAP')
ext_deps += pcap_dep
if dpdk_conf.has('RTE_LIB_PCAPNG')
- test_deps += 'pcapng'
test_sources += 'test_pcapng.c'
endif
endif
-if dpdk_conf.has('RTE_LIB_POWER')
- test_deps += 'power'
-endif
-if dpdk_conf.has('RTE_LIB_KNI')
- test_deps += 'kni'
-endif
-
if cc.has_argument('-Wno-format-truncation')
cflags += '-Wno-format-truncation'
endif
@@ -462,7 +420,6 @@ if dpdk_conf.has('RTE_LIB_COMPRESSDEV')
if compress_test_dep.found()
test_dep_objs += compress_test_dep
test_sources += 'test_compressdev.c'
- test_deps += 'compressdev'
fast_tests += [['compressdev_autotest', false]]
endif
endif
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 3/6] build: add node library to optional list
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 2/6] app/test: link unit test binary against all available libs Bruce Richardson
@ 2022-01-19 18:09 ` Bruce Richardson
2022-01-19 18:10 ` [PATCH v2 4/6] build: add flow classification " Bruce Richardson
` (4 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:09 UTC (permalink / raw)
To: dev
Cc: david.marchand, Bruce Richardson, Stephen Hemminger, Morten Brørup
Allow the 'node' library to be disabled in builds
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/meson.build b/lib/meson.build
index af4662e942..dd20fe70a6 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -74,6 +74,7 @@ optional_libs = [
'jobstats',
'latencystats',
'metrics',
+ 'node',
'pdump',
'power',
'vhost',
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 4/6] build: add flow classification library to optional list
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
` (2 preceding siblings ...)
2022-01-19 18:09 ` [PATCH v2 3/6] build: add node library to optional list Bruce Richardson
@ 2022-01-19 18:10 ` Bruce Richardson
2022-01-19 18:10 ` [PATCH v2 5/6] build: add "packet framework" libs " Bruce Richardson
` (3 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:10 UTC (permalink / raw)
To: dev
Cc: david.marchand, Bruce Richardson, Stephen Hemminger, Morten Brørup
Add the flow_classify library to the list of optional libraries, and
ensure tests can build with it disabled.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
app/test/meson.build | 7 +++++--
lib/meson.build | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 210e03fbff..a39dd68934 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -65,7 +65,6 @@ test_sources = files(
'test_fib6.c',
'test_fib6_perf.c',
'test_func_reentrancy.c',
- 'test_flow_classify.c',
'test_graph.c',
'test_graph_perf.c',
'test_hash.c',
@@ -196,7 +195,6 @@ fast_tests = [
['fib_autotest', true],
['fib6_autotest', true],
['func_reentrancy_autotest', false],
- ['flow_classify_autotest', false],
['hash_autotest', true],
['interrupt_autotest', true],
['ipfrag_autotest', false],
@@ -349,6 +347,11 @@ endif
if dpdk_conf.has('RTE_EVENT_SKELETON')
test_deps += 'event_skeleton'
endif
+
+if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')
+ test_sources += 'test_flow_classify.c'
+ fast_tests += [['flow_classify_autotest', false]]
+endif
if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
fast_tests += [['metrics_autotest', true]]
diff --git a/lib/meson.build b/lib/meson.build
index dd20fe70a6..ede5199374 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -67,6 +67,7 @@ libraries = [
optional_libs = [
'bitratestats',
+ 'flow_classify',
'gpudev',
'gro',
'gso',
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 5/6] build: add "packet framework" libs to optional list
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
` (3 preceding siblings ...)
2022-01-19 18:10 ` [PATCH v2 4/6] build: add flow classification " Bruce Richardson
@ 2022-01-19 18:10 ` Bruce Richardson
2022-01-19 18:10 ` [PATCH v2 6/6] build: add cfgfile library " Bruce Richardson
` (2 subsequent siblings)
7 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:10 UTC (permalink / raw)
To: dev
Cc: david.marchand, Bruce Richardson, Stephen Hemminger, Morten Brørup
Add port, table and pipeline libraries - collectively often known as
the "packet framework" - to the list of optional libraries, and
ensure tests can build with them disabled.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
app/test/meson.build | 20 +++++++++++++-------
lib/meson.build | 3 +++
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index a39dd68934..aac2b98800 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -135,12 +135,6 @@ test_sources = files(
'test_stack.c',
'test_stack_perf.c',
'test_string_fns.c',
- 'test_table.c',
- 'test_table_acl.c',
- 'test_table_combined.c',
- 'test_table_pipeline.c',
- 'test_table_ports.c',
- 'test_table_tables.c',
'test_tailq.c',
'test_thash.c',
'test_thash_perf.c',
@@ -229,7 +223,6 @@ fast_tests = [
['stack_autotest', false],
['stack_lf_autotest', false],
['string_autotest', true],
- ['table_autotest', true],
['tailq_autotest', true],
['ticketlock_autotest', true],
['timer_autotest', false],
@@ -360,6 +353,19 @@ if dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
endif
+if dpdk_conf.has('RTE_LIB_PIPELINE')
+# pipeline lib depends on port and table libs, so those must be present
+# if pipeline library is.
+ test_sources += [
+ 'test_table.c',
+ 'test_table_acl.c',
+ 'test_table_combined.c',
+ 'test_table_pipeline.c',
+ 'test_table_ports.c',
+ 'test_table_tables.c',
+ ]
+ fast_tests += [['table_autotest', true]]
+endif
# The following linkages of drivers are required because
# they are used via a driver-specific API.
diff --git a/lib/meson.build b/lib/meson.build
index ede5199374..dcc1b4d835 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -77,7 +77,10 @@ optional_libs = [
'metrics',
'node',
'pdump',
+ 'pipeline',
+ 'port',
'power',
+ 'table',
'vhost',
]
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 6/6] build: add cfgfile library to optional list
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
` (4 preceding siblings ...)
2022-01-19 18:10 ` [PATCH v2 5/6] build: add "packet framework" libs " Bruce Richardson
@ 2022-01-19 18:10 ` Bruce Richardson
2022-01-20 10:53 ` [PATCH v2 0/6] allow more DPDK libs to be disabled on build David Marchand
2022-01-21 13:04 ` David Marchand
7 siblings, 0 replies; 21+ messages in thread
From: Bruce Richardson @ 2022-01-19 18:10 UTC (permalink / raw)
To: dev
Cc: david.marchand, Bruce Richardson, Stephen Hemminger, Morten Brørup
Allow disabling of the cfgfile library in builds.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/meson.build b/lib/meson.build
index dcc1b4d835..8e5acd7819 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -67,6 +67,7 @@ libraries = [
optional_libs = [
'bitratestats',
+ 'cfgfile',
'flow_classify',
'gpudev',
'gro',
--
2.32.0
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 0/6] allow more DPDK libs to be disabled on build
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
` (5 preceding siblings ...)
2022-01-19 18:10 ` [PATCH v2 6/6] build: add cfgfile library " Bruce Richardson
@ 2022-01-20 10:53 ` David Marchand
2022-01-21 13:04 ` David Marchand
7 siblings, 0 replies; 21+ messages in thread
From: David Marchand @ 2022-01-20 10:53 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
On Wed, Jan 19, 2022 at 7:31 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> *A common request on-list has been to allow more of the DPDK build to be disabled by those who are
> doing their own builds and only use a subset of the libraries. To this end, this patchset makes some
> infrastructure changes [first two patches] to make it easier to have libraries disabled, and then
> adds a six libraries to the "optional" list.
>
> V2: fix missing PCI and vdev bus driver dependencies in patch 2.
>
> Bruce Richardson (6):
> lib: allow recursive disabling of libs in build
> app/test: link unit test binary against all available libs
> build: add node library to optional list
> build: add flow classification library to optional list
> build: add "packet framework" libs to optional list
> build: add cfgfile library to optional list
>
> app/test/meson.build | 76 ++++++++++++--------------------------------
> lib/meson.build | 30 +++++++++++------
> 2 files changed, 42 insertions(+), 64 deletions(-)
>
For the series,
Acked-by: David Marchand <david.marchand@redhat.com>
Thanks Bruce.
--
David Marchand
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 0/6] allow more DPDK libs to be disabled on build
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
` (6 preceding siblings ...)
2022-01-20 10:53 ` [PATCH v2 0/6] allow more DPDK libs to be disabled on build David Marchand
@ 2022-01-21 13:04 ` David Marchand
7 siblings, 0 replies; 21+ messages in thread
From: David Marchand @ 2022-01-21 13:04 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Stephen Hemminger, Morten Brørup
On Wed, Jan 19, 2022 at 7:31 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> *A common request on-list has been to allow more of the DPDK build to be disabled by those who are
> doing their own builds and only use a subset of the libraries. To this end, this patchset makes some
> infrastructure changes [first two patches] to make it easier to have libraries disabled, and then
> adds a six libraries to the "optional" list.
>
> V2: fix missing PCI and vdev bus driver dependencies in patch 2.
>
> Bruce Richardson (6):
> lib: allow recursive disabling of libs in build
> app/test: link unit test binary against all available libs
> build: add node library to optional list
> build: add flow classification library to optional list
> build: add "packet framework" libs to optional list
> build: add cfgfile library to optional list
>
> app/test/meson.build | 76 ++++++++++++--------------------------------
> lib/meson.build | 30 +++++++++++------
> 2 files changed, 42 insertions(+), 64 deletions(-)
>
Series applied, thanks Bruce.
--
David Marchand
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-01-21 13:05 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson
2022-01-13 17:39 ` [PATCH 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
2022-01-13 17:39 ` [PATCH 2/6] app/test: link unit test binary against all available libs Bruce Richardson
2022-01-19 16:51 ` David Marchand
2022-01-19 17:25 ` Bruce Richardson
2022-01-13 17:39 ` [PATCH 3/6] build: add node library to optional list Bruce Richardson
2022-01-13 17:39 ` [PATCH 4/6] build: add flow classification " Bruce Richardson
2022-01-13 17:39 ` [PATCH 5/6] build: add "packet framework" libs " Bruce Richardson
2022-01-13 17:39 ` [PATCH 6/6] build: add cfgfile library " Bruce Richardson
2022-01-13 18:26 ` [PATCH 0/6] allow more DPDK libraries to be disabled on build Stephen Hemminger
2022-01-14 8:07 ` Morten Brørup
2022-01-19 16:52 ` David Marchand
2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 1/6] lib: allow recursive disabling of libs in build Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 2/6] app/test: link unit test binary against all available libs Bruce Richardson
2022-01-19 18:09 ` [PATCH v2 3/6] build: add node library to optional list Bruce Richardson
2022-01-19 18:10 ` [PATCH v2 4/6] build: add flow classification " Bruce Richardson
2022-01-19 18:10 ` [PATCH v2 5/6] build: add "packet framework" libs " Bruce Richardson
2022-01-19 18:10 ` [PATCH v2 6/6] build: add cfgfile library " Bruce Richardson
2022-01-20 10:53 ` [PATCH v2 0/6] allow more DPDK libs to be disabled on build David Marchand
2022-01-21 13:04 ` David Marchand
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).