[PATCH 1/7] build: make most device classes optional

Bruce Richardson bruce.richardson at intel.com
Thu Jun 22 15:48:34 CEST 2023


Apart from ethdev and cryptodev, which have lots of components and tests
which depend on them, we can make the device class libraries optional
without too much work.

This patch marks:
* bbdev,
* compressdev,
* dmadev,
* eventdev,
* mldev,
* rawdev,
* regexdev
optional, and ensures that DPDK - including tests - can be built with
these components disabled.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 app/test/meson.build | 33 +++++++++++++++++++++------------
 lib/meson.build      |  7 +++++++
 2 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index d0fabcbb8b..780005f320 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -41,19 +41,12 @@ test_sources = files(
         'test_devargs.c',
         'test_distributor.c',
         'test_distributor_perf.c',
-        'test_dmadev.c',
-        'test_dmadev_api.c',
         'test_eal_flags.c',
         'test_eal_fs.c',
         'test_efd.c',
         'test_efd_perf.c',
         'test_errno.c',
         'test_ethdev_link.c',
-        'test_event_crypto_adapter.c',
-        'test_event_eth_rx_adapter.c',
-        'test_event_ring.c',
-        'test_event_timer_adapter.c',
-        'test_eventdev.c',
         'test_external_mem.c',
         'test_fbarray.c',
         'test_fib.c',
@@ -105,7 +98,6 @@ test_sources = files(
         'test_power_intel_uncore.c',
         'test_prefetch.c',
         'test_rand_perf.c',
-        'test_rawdev.c',
         'test_rcu_qsbr.c',
         'test_rcu_qsbr_perf.c',
         'test_reciprocal_division.c',
@@ -129,7 +121,6 @@ test_sources = files(
         'test_sched.c',
         'test_security.c',
         'test_security_inline_macsec.c',
-        'test_security_inline_proto.c',
         'test_seqlock.c',
         'test_service_cores.c',
         'test_spinlock.c',
@@ -188,7 +179,6 @@ fast_tests = [
         ['eal_fs_autotest', true, true],
         ['errno_autotest', true, true],
         ['ethdev_link_status', true, true],
-        ['event_ring_autotest', true, true],
         ['fib_autotest', true, true],
         ['fib6_autotest', true, true],
         ['func_reentrancy_autotest', false, true],
@@ -234,7 +224,6 @@ fast_tests = [
         ['version_autotest', true, true],
         ['crc_autotest', true, true],
         ['distributor_autotest', false, true],
-        ['eventdev_common_autotest', true, true],
         ['fbarray_autotest', true, true],
         ['hash_readwrite_func_autotest', false, true],
         ['ipsec_autotest', true, true],
@@ -321,7 +310,6 @@ driver_test_names = [
         'cryptodev_sw_snow3g_autotest',
         'cryptodev_sw_zuc_autotest',
         'cryptodev_uadk_autotest',
-        'dmadev_autotest',
 ]
 
 dump_test_names = []
@@ -359,6 +347,25 @@ if dpdk_conf.has('RTE_EVENT_SKELETON')
     test_deps += 'event_skeleton'
 endif
 
+if dpdk_conf.has('RTE_LIB_DMADEV')
+    test_sources += ['test_dmadev.c', 'test_dmadev_api.c']
+    driver_test_names += 'dmadev_autotest'
+endif
+if dpdk_conf.has('RTE_LIB_EVENTDEV')
+    test_sources += [
+        'test_event_eth_rx_adapter.c',
+        'test_event_ring.c',
+        'test_event_timer_adapter.c',
+        'test_eventdev.c',
+    ]
+    fast_tests += [
+        ['event_ring_autotest', true, true],
+        ['eventdev_common_autotest', true, true],
+    ]
+    if dpdk_conf.has('RTE_LIB_CRYPTODEV')
+        test_sources += 'test_event_crypto_adapter.c'
+    endif
+endif
 if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')
     test_sources += 'test_flow_classify.c'
     fast_tests += [['flow_classify_autotest', false, true]]
@@ -403,6 +410,7 @@ if dpdk_conf.has('RTE_LIB_EVENTDEV') and dpdk_conf.has('RTE_NET_RING')
     test_sources += 'test_pmd_ring.c'
     test_sources += 'test_event_eth_tx_adapter.c'
     test_sources += 'sample_packet_forward.c'
+    test_sources += 'test_security_inline_proto.c'
     fast_tests += [['ring_pmd_autotest', true, true]]
     perf_test_names += 'ring_pmd_perf_autotest'
     fast_tests += [['event_eth_tx_adapter_autotest', false, true]]
@@ -425,6 +433,7 @@ if dpdk_conf.has('RTE_NET_NULL')
     fast_tests += [['vdev_autotest', true, true]]
 endif
 if dpdk_conf.has('RTE_RAW_SKELETON')
+    test_sources += 'test_rawdev.c'
     test_deps += 'raw_skeleton'
     fast_tests += [['rawdev_autotest', true, true]]
 endif
diff --git a/lib/meson.build b/lib/meson.build
index 9677239236..679a81f62f 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -68,8 +68,12 @@ libraries = [
 ]
 
 optional_libs = [
+        'bbdev',
         'bitratestats',
         'cfgfile',
+        'compressdev',
+        'dmadev',
+        'eventdev',
         'flow_classify',
         'gpudev',
         'gro',
@@ -78,11 +82,14 @@ optional_libs = [
         'jobstats',
         'latencystats',
         'metrics',
+        'mldev',
         'node',
         'pdump',
         'pipeline',
         'port',
         'power',
+        'rawdev',
+        'regexdev',
         'table',
         'vhost',
 ]
-- 
2.39.2



More information about the dev mailing list