Skip to contentSkip to conversation

allow more DPDK libraries to be disabled on build

PATCH Superseded Bruce Richardson 4 participants 21 messages Jan 13, 2022 – Jan 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover allow more DPDK libraries to be disabled on build

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

#1 lore raw

PATCH 1/6 lib: allow recursive disabling of libs in build

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.

---
 lib/meson.build | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)
lib/meson.build +15 -9
index fbaa6ef7c2..af4662e942 100644
@@ -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)
Signature · 1 line
2.32.0
#2 lore raw

PATCH 2/6 app/test: link unit test binary against all available libs

In reply to 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.

---
 app/test/meson.build | 47 +-------------------------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
app/test/meson.build +1 -46
index 344a609a4d..9919de4307 100644
@@ -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
Signature · 1 line
2.32.0
#3 lore raw

Re: [PATCH 2/6] app/test: link unit test binary against all available libs

Quoted 16 lines · 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.

---
 app/test/meson.build | 47 +-------------------------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
app/test/meson.build +0 -0
index 344a609a4d..9919de4307 100644

app/test/meson.build test_sources = files( · line 163

Quoted 7 lines
app/test/meson.build +0 -4
@@ -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

Signature · 1 line
David Marchand
#4 lore raw

Re: [PATCH 2/6] app/test: link unit test binary against all available libs

Quoted 21 lines · David Marchand
Quoted 19 lines · 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.

---
 app/test/meson.build | 47 +-------------------------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
app/test/meson.build +0 -0
index 344a609a4d..9919de4307 100644
@@ -157,39 +157,7 @@ test_sources = files(
         'virtual_pmd.c',
 )
 
Quoted 11 lines

app/test/meson.build test_sources = files( · line 163

Quoted 4 lines
app/test/meson.build +0 -4
-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

#5 lore raw

PATCH 3/6 build: add node library to optional list

In reply to Bruce Richardson

Allow the 'node' library to be disabled in builds

---
 lib/meson.build | 1 +
 1 file changed, 1 insertion(+)
lib/meson.build +1 -0
index af4662e942..dd20fe70a6 100644
@@ -74,6 +74,7 @@ optional_libs = [
         'jobstats',
         'latencystats',
         'metrics',
+        'node',
         'pdump',
         'power',
         'vhost',
Signature · 1 line
2.32.0
#6 lore raw

PATCH 4/6 build: add flow classification library to optional list

In reply to Bruce Richardson

Add the flow_classify library to the list of optional libraries, and ensure tests can build with it disabled.

---
 app/test/meson.build | 7 +++++--
 lib/meson.build      | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
app/test/meson.build +5 -2
index 9919de4307..a92dd0c1f0 100644
@@ -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]]
lib/meson.build +1 -0
index dd20fe70a6..ede5199374 100644
@@ -67,6 +67,7 @@ libraries = [
 
 optional_libs = [
         'bitratestats',
+        'flow_classify',
         'gpudev',
         'gro',
         'gso',
Signature · 1 line
2.32.0
#7 lore raw

PATCH 5/6 build: add "packet framework" libs to optional list

In reply to 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.

---
 app/test/meson.build | 20 +++++++++++++-------
 lib/meson.build      |  3 +++
 2 files changed, 16 insertions(+), 7 deletions(-)
app/test/meson.build +13 -7
index a92dd0c1f0..ba62e5e98c 100644
@@ -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.
lib/meson.build +3 -0
index ede5199374..dcc1b4d835 100644
@@ -77,7 +77,10 @@ optional_libs = [
         'metrics',
         'node',
         'pdump',
+        'pipeline',
+        'port',
         'power',
+        'table',
         'vhost',
 ]
 
Signature · 1 line
2.32.0
#8 lore raw

PATCH 6/6 build: add cfgfile library to optional list

In reply to Bruce Richardson

Allow disabling of the cfgfile library in builds.

---
 lib/meson.build | 1 +
 1 file changed, 1 insertion(+)
lib/meson.build +1 -0
index dcc1b4d835..8e5acd7819 100644
@@ -67,6 +67,7 @@ libraries = [
 
 optional_libs = [
         'bitratestats',
+        'cfgfile',
         'flow_classify',
         'gpudev',
         'gro',
Signature · 1 line
2.32.0
Acked-by on the v1 series
#9 lore raw
In reply to Bruce Richardson
Quoted 13 lines · On Thu, 13 Jan 2022 17:39:12 +0000 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

Quoted 7 lines
 app/test/meson.build | 74 ++++++++++++--------------------------------
 lib/meson.build      | 30 ++++++++++++------
 2 files changed, 40 insertions(+), 64 deletions(-)

--
2.32.0

Acked-by on the v1 series
#10 lore raw
In reply to Bruce Richardson
Quoted 19 lines

From: Bruce Richardson [mailto:[email protected]]
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

Quoted 7 lines
 app/test/meson.build | 74 ++++++++++++--------------------------------
 lib/meson.build      | 30 ++++++++++++------
 2 files changed, 40 insertions(+), 64 deletions(-)

--
2.32.0

Thank you very much, Bruce!

#11 lore raw
In reply to Bruce Richardson
Quoted 14 lines · 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

Quoted 3 lines
 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.

Signature · 1 line
David Marchand
#12 lore raw

v2 cover allow more DPDK libs to be disabled on build

In reply to 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

#13 lore raw

PATCH v2 1/6 lib: allow recursive disabling of libs in build

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.

---
 lib/meson.build | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)
lib/meson.build +15 -9
index fbaa6ef7c2..af4662e942 100644
@@ -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)
Signature · 1 line
2.32.0
#14 lore raw

PATCH v2 2/6 app/test: link unit test binary against all available libs

In reply to 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.

---
 app/test/meson.build | 49 +++-----------------------------------------
 1 file changed, 3 insertions(+), 46 deletions(-)
app/test/meson.build +3 -46
index 344a609a4d..210e03fbff 100644
@@ -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
Signature · 1 line
2.32.0
#15 lore raw

PATCH v2 3/6 build: add node library to optional list

In reply to Bruce Richardson

Allow the 'node' library to be disabled in builds

---
 lib/meson.build | 1 +
 1 file changed, 1 insertion(+)
lib/meson.build +1 -0
index af4662e942..dd20fe70a6 100644
@@ -74,6 +74,7 @@ optional_libs = [
         'jobstats',
         'latencystats',
         'metrics',
+        'node',
         'pdump',
         'power',
         'vhost',
Signature · 1 line
2.32.0
#16 lore raw

PATCH v2 4/6 build: add flow classification library to optional list

In reply to Bruce Richardson

Add the flow_classify library to the list of optional libraries, and ensure tests can build with it disabled.

---
 app/test/meson.build | 7 +++++--
 lib/meson.build      | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
app/test/meson.build +5 -2
index 210e03fbff..a39dd68934 100644
@@ -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]]
lib/meson.build +1 -0
index dd20fe70a6..ede5199374 100644
@@ -67,6 +67,7 @@ libraries = [
 
 optional_libs = [
         'bitratestats',
+        'flow_classify',
         'gpudev',
         'gro',
         'gso',
Signature · 1 line
2.32.0
#17 lore raw

PATCH v2 5/6 build: add "packet framework" libs to optional list

In reply to 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.

---
 app/test/meson.build | 20 +++++++++++++-------
 lib/meson.build      |  3 +++
 2 files changed, 16 insertions(+), 7 deletions(-)
app/test/meson.build +13 -7
index a39dd68934..aac2b98800 100644
@@ -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.
lib/meson.build +3 -0
index ede5199374..dcc1b4d835 100644
@@ -77,7 +77,10 @@ optional_libs = [
         'metrics',
         'node',
         'pdump',
+        'pipeline',
+        'port',
         'power',
+        'table',
         'vhost',
 ]
 
Signature · 1 line
2.32.0
#18 lore raw

PATCH v2 6/6 build: add cfgfile library to optional list

In reply to Bruce Richardson

Allow disabling of the cfgfile library in builds.

---
 lib/meson.build | 1 +
 1 file changed, 1 insertion(+)
lib/meson.build +1 -0
index dcc1b4d835..8e5acd7819 100644
@@ -67,6 +67,7 @@ libraries = [
 
 optional_libs = [
         'bitratestats',
+        'cfgfile',
         'flow_classify',
         'gpudev',
         'gro',
Signature · 1 line
2.32.0
Acked-by on the v2 series
#19 lore raw

Re: [PATCH v2 0/6] allow more DPDK libs to be disabled on build

In reply to Bruce Richardson
Quoted 16 lines · 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

Quoted 4 lines
 app/test/meson.build | 76 ++++++++++++--------------------------------
 lib/meson.build      | 30 +++++++++++------
 2 files changed, 42 insertions(+), 64 deletions(-)

For the series,

Thanks Bruce.

Signature · 1 line
David Marchand
#20 lore raw

Re: [PATCH v2 0/6] allow more DPDK libs to be disabled on build

In reply to Bruce Richardson
Quoted 16 lines · 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

Quoted 4 lines
 app/test/meson.build | 76 ++++++++++++--------------------------------
 lib/meson.build      | 30 +++++++++++------
 2 files changed, 42 insertions(+), 64 deletions(-)

Series applied, thanks Bruce.

Signature · 1 line
David Marchand