expand list of optional libraries
Subsystems (2)
cover expand list of optional libraries
DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
Bruce Richardson (7):
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation libary optional
build: make reorder library optional
app/test/meson.build | 81 +++++++++++++++++++++++++++----------------- lib/meson.build | 13 +++++++ 2 files changed, 63 insertions(+), 31 deletions(-)
--
2.39.2
PATCH 1/7 build: make most device classes optional
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.
--- app/test/meson.build | 33 +++++++++++++++++++++------------ lib/meson.build | 7 +++++++ 2 files changed, 28 insertions(+), 12 deletions(-)
app/test/meson.build +21 -12
@@ -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
lib/meson.build +7 -0
@@ -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', ]
Signature · 1 line
2.39.2
PATCH 2/7 build: make membership library optional
In reply to Bruce Richardson--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -78,8 +78,6 @@ test_sources = files( 'test_malloc.c', 'test_malloc_perf.c', 'test_mbuf.c', - 'test_member.c', - 'test_member_perf.c', 'test_memcpy.c', 'test_memcpy_perf.c', 'test_memory.c',
@@ -229,7 +227,6 @@ fast_tests = [ ['ipsec_autotest', true, true], ['kni_autotest', false, true], ['kvargs_autotest', true, true], - ['member_autotest', true, true], ['power_cpufreq_autotest', false, true], ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true],
@@ -267,7 +264,6 @@ perf_test_names = [ 'timer_racecond_autotest', 'efd_autotest', 'hash_functions_autotest', - 'member_perf_autotest', 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest',
@@ -374,6 +370,11 @@ if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]] endif +if dpdk_conf.has('RTE_LIB_MEMBER') + test_sources += ['test_member.c', 'test_member_perf.c'] + fast_tests += [['member_autotest', true, true]] + perf_test_names += 'member_perf_autotest' +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -81,6 +81,7 @@ optional_libs = [ 'kni', 'jobstats', 'latencystats', + 'member', 'metrics', 'mldev', 'node',
Signature · 1 line
2.39.2
PATCH 3/7 build: make bpf library optional
In reply to Bruce Richardson--- app/test/meson.build | 10 +++++++--- lib/meson.build | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
app/test/meson.build +7 -3
@@ -15,7 +15,6 @@ test_sources = files( 'test_barrier.c', 'test_bitops.c', 'test_bitmap.c', - 'test_bpf.c', 'test_byteorder.c', 'test_cksum.c', 'test_cksum_perf.c',
@@ -152,8 +151,6 @@ fast_tests = [ ['acl_autotest', true, true], ['atomic_autotest', false, true], ['bitmap_autotest', true, true], - ['bpf_autotest', true, true], - ['bpf_convert_autotest', true, true], ['bitops_autotest', true, true], ['byteorder_autotest', true, true], ['cksum_autotest', true, true],
@@ -343,6 +340,13 @@ if dpdk_conf.has('RTE_EVENT_SKELETON') test_deps += 'event_skeleton' endif +if dpdk_conf.has('RTE_LIB_BPF') + test_sources += 'test_bpf.c' + fast_tests += [ + ['bpf_autotest', true, true], + ['bpf_convert_autotest', true, true], + ] +endif if dpdk_conf.has('RTE_LIB_DMADEV') test_sources += ['test_dmadev.c', 'test_dmadev_api.c'] driver_test_names += 'dmadev_autotest'
lib/meson.build +1 -0
@@ -70,6 +70,7 @@ libraries = [ optional_libs = [ 'bbdev', 'bitratestats', + 'bpf', 'cfgfile', 'compressdev', 'dmadev',
Signature · 1 line
2.39.2
PATCH 4/7 build: make efd library optional
In reply to Bruce Richardson--- app/test/meson.build | 8 ++++---- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
app/test/meson.build +4 -4
@@ -42,8 +42,6 @@ test_sources = files( 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', - 'test_efd.c', - 'test_efd_perf.c', 'test_errno.c', 'test_ethdev_link.c', 'test_external_mem.c',
@@ -259,9 +257,7 @@ perf_test_names = [ 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest', - 'efd_autotest', 'hash_functions_autotest', - 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest', 'fib6_slow_autotest',
@@ -370,6 +366,10 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_EFD') + test_sources += ['test_efd.c', 'test_efd_perf.c'] + perf_test_names += ['efd_autotest', 'efd_perf_autotest'] +endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
@@ -74,6 +74,7 @@ optional_libs = [ 'cfgfile', 'compressdev', 'dmadev', + 'efd', 'eventdev', 'flow_classify', 'gpudev',
Signature · 1 line
2.39.2
PATCH 5/7 build: make distributor library optional
In reply to Bruce Richardson--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -38,8 +38,6 @@ test_sources = files( 'test_cycles.c', 'test_debug.c', 'test_devargs.c', - 'test_distributor.c', - 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', 'test_errno.c',
@@ -216,7 +214,6 @@ fast_tests = [ ['user_delay_us', true, true], ['version_autotest', true, true], ['crc_autotest', true, true], - ['distributor_autotest', false, true], ['fbarray_autotest', true, true], ['hash_readwrite_func_autotest', false, true], ['ipsec_autotest', true, true],
@@ -265,7 +262,6 @@ perf_test_names = [ 'rcu_qsbr_perf_autotest', 'red_perf', 'pie_perf', - 'distributor_perf_autotest', 'pmd_perf_autotest', 'service_perf_autotest', 'stack_perf_autotest',
@@ -366,6 +362,11 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_DISTRIBUTOR') + test_sources += ['test_distributor.c', 'test_distributor_perf.c'] + fast_tests += [['distributor_autotest', false, true]] + perf_test_names += 'distributor_perf_autotest' +endif if dpdk_conf.has('RTE_LIB_EFD') test_sources += ['test_efd.c', 'test_efd_perf.c'] perf_test_names += ['efd_autotest', 'efd_perf_autotest']
lib/meson.build +1 -0
@@ -73,6 +73,7 @@ optional_libs = [ 'bpf', 'cfgfile', 'compressdev', + 'distributor', 'dmadev', 'efd', 'eventdev',
Signature · 1 line
2.39.2
PATCH 6/7 build: make fragmentation libary optional
In reply to Bruce Richardson--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -58,7 +58,6 @@ test_sources = files( 'test_hash_perf.c', 'test_hash_readwrite_lf_perf.c', 'test_interrupts.c', - 'test_ipfrag.c', 'test_ipsec.c', 'test_ipsec_sad.c', 'test_ipsec_perf.c',
@@ -175,7 +174,6 @@ fast_tests = [ ['func_reentrancy_autotest', false, true], ['hash_autotest', true, true], ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], ['lcores_autotest', true, true], ['logs_autotest', true, true], ['lpm_autotest', true, true],
@@ -371,6 +369,10 @@ if dpdk_conf.has('RTE_LIB_EFD') test_sources += ['test_efd.c', 'test_efd_perf.c'] perf_test_names += ['efd_autotest', 'efd_perf_autotest'] endif +if dpdk_conf.has('RTE_IP_FRAG') + test_sources += 'test_ipfrag.c' + fast_tests += [['ipfrag_autotest', false, true]] +endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
@@ -82,6 +82,7 @@ optional_libs = [ 'gro', 'gso', 'kni', + 'ip_frag', 'jobstats', 'latencystats', 'member',
Signature · 1 line
2.39.2
PATCH 7/7 build: make reorder library optional
In reply to Bruce Richardson--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -96,7 +96,6 @@ test_sources = files( 'test_reciprocal_division_perf.c', 'test_red.c', 'test_pie.c', - 'test_reorder.c', 'test_rib.c', 'test_rib6.c', 'test_ring.c',
@@ -221,7 +220,6 @@ fast_tests = [ ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true], ['power_intel_uncore_autotest', true, true], - ['reorder_autotest', true, true], ['service_autotest', true, true], ['thash_autotest', true, true], ['threads_autotest', true, true],
@@ -382,6 +380,10 @@ if dpdk_conf.has('RTE_LIB_MEMBER') fast_tests += [['member_autotest', true, true]] perf_test_names += 'member_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_REORDER') + test_sources += 'test_reorder.c' + fast_tests += [['reorder_autotest', true, true]] +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -95,6 +95,7 @@ optional_libs = [ 'power', 'rawdev', 'regexdev', + 'reorder', 'table', 'vhost', ]
Signature · 1 line
2.39.2
Quoted 13 lines
From: Bruce Richardson [mailto:[email protected]]
Sent: Thursday, 22 June 2023 15.49DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
Quoted 6 lines
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
Thank you, Bruce.
v2 cover expand list of optional libraries
In reply to Bruce RichardsonDPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)
Bruce Richardson (7):
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optional
app/test/meson.build | 81 +++++++++++++++++++++++++++----------------- lib/meson.build | 13 +++++++ 2 files changed, 63 insertions(+), 31 deletions(-)
--
2.39.2
PATCH v2 1/7 build: make most device classes optional
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.
--- app/test/meson.build | 33 +++++++++++++++++++++------------ lib/meson.build | 7 +++++++ 2 files changed, 28 insertions(+), 12 deletions(-)
app/test/meson.build +21 -12
@@ -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
lib/meson.build +7 -0
@@ -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', ]
Signature · 1 line
2.39.2
PATCH v2 2/7 build: make membership library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -78,8 +78,6 @@ test_sources = files( 'test_malloc.c', 'test_malloc_perf.c', 'test_mbuf.c', - 'test_member.c', - 'test_member_perf.c', 'test_memcpy.c', 'test_memcpy_perf.c', 'test_memory.c',
@@ -229,7 +227,6 @@ fast_tests = [ ['ipsec_autotest', true, true], ['kni_autotest', false, true], ['kvargs_autotest', true, true], - ['member_autotest', true, true], ['power_cpufreq_autotest', false, true], ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true],
@@ -267,7 +264,6 @@ perf_test_names = [ 'timer_racecond_autotest', 'efd_autotest', 'hash_functions_autotest', - 'member_perf_autotest', 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest',
@@ -374,6 +370,11 @@ if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]] endif +if dpdk_conf.has('RTE_LIB_MEMBER') + test_sources += ['test_member.c', 'test_member_perf.c'] + fast_tests += [['member_autotest', true, true]] + perf_test_names += 'member_perf_autotest' +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -81,6 +81,7 @@ optional_libs = [ 'kni', 'jobstats', 'latencystats', + 'member', 'metrics', 'mldev', 'node',
Signature · 1 line
2.39.2
PATCH v2 3/7 build: make bpf library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 10 +++++++--- lib/meson.build | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
app/test/meson.build +7 -3
@@ -15,7 +15,6 @@ test_sources = files( 'test_barrier.c', 'test_bitops.c', 'test_bitmap.c', - 'test_bpf.c', 'test_byteorder.c', 'test_cksum.c', 'test_cksum_perf.c',
@@ -152,8 +151,6 @@ fast_tests = [ ['acl_autotest', true, true], ['atomic_autotest', false, true], ['bitmap_autotest', true, true], - ['bpf_autotest', true, true], - ['bpf_convert_autotest', true, true], ['bitops_autotest', true, true], ['byteorder_autotest', true, true], ['cksum_autotest', true, true],
@@ -343,6 +340,13 @@ if dpdk_conf.has('RTE_EVENT_SKELETON') test_deps += 'event_skeleton' endif +if dpdk_conf.has('RTE_LIB_BPF') + test_sources += 'test_bpf.c' + fast_tests += [ + ['bpf_autotest', true, true], + ['bpf_convert_autotest', true, true], + ] +endif if dpdk_conf.has('RTE_LIB_DMADEV') test_sources += ['test_dmadev.c', 'test_dmadev_api.c'] driver_test_names += 'dmadev_autotest'
lib/meson.build +1 -0
@@ -70,6 +70,7 @@ libraries = [ optional_libs = [ 'bbdev', 'bitratestats', + 'bpf', 'cfgfile', 'compressdev', 'dmadev',
Signature · 1 line
2.39.2
PATCH v2 4/7 build: make efd library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 8 ++++---- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
app/test/meson.build +4 -4
@@ -42,8 +42,6 @@ test_sources = files( 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', - 'test_efd.c', - 'test_efd_perf.c', 'test_errno.c', 'test_ethdev_link.c', 'test_external_mem.c',
@@ -259,9 +257,7 @@ perf_test_names = [ 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest', - 'efd_autotest', 'hash_functions_autotest', - 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest', 'fib6_slow_autotest',
@@ -370,6 +366,10 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_EFD') + test_sources += ['test_efd.c', 'test_efd_perf.c'] + perf_test_names += ['efd_autotest', 'efd_perf_autotest'] +endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
@@ -74,6 +74,7 @@ optional_libs = [ 'cfgfile', 'compressdev', 'dmadev', + 'efd', 'eventdev', 'flow_classify', 'gpudev',
Signature · 1 line
2.39.2
PATCH v2 5/7 build: make distributor library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -38,8 +38,6 @@ test_sources = files( 'test_cycles.c', 'test_debug.c', 'test_devargs.c', - 'test_distributor.c', - 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', 'test_errno.c',
@@ -216,7 +214,6 @@ fast_tests = [ ['user_delay_us', true, true], ['version_autotest', true, true], ['crc_autotest', true, true], - ['distributor_autotest', false, true], ['fbarray_autotest', true, true], ['hash_readwrite_func_autotest', false, true], ['ipsec_autotest', true, true],
@@ -265,7 +262,6 @@ perf_test_names = [ 'rcu_qsbr_perf_autotest', 'red_perf', 'pie_perf', - 'distributor_perf_autotest', 'pmd_perf_autotest', 'service_perf_autotest', 'stack_perf_autotest',
@@ -366,6 +362,11 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_DISTRIBUTOR') + test_sources += ['test_distributor.c', 'test_distributor_perf.c'] + fast_tests += [['distributor_autotest', false, true]] + perf_test_names += 'distributor_perf_autotest' +endif if dpdk_conf.has('RTE_LIB_EFD') test_sources += ['test_efd.c', 'test_efd_perf.c'] perf_test_names += ['efd_autotest', 'efd_perf_autotest']
lib/meson.build +1 -0
@@ -73,6 +73,7 @@ optional_libs = [ 'bpf', 'cfgfile', 'compressdev', + 'distributor', 'dmadev', 'efd', 'eventdev',
Signature · 1 line
2.39.2
PATCH v2 6/7 build: make fragmentation library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -58,7 +58,6 @@ test_sources = files( 'test_hash_perf.c', 'test_hash_readwrite_lf_perf.c', 'test_interrupts.c', - 'test_ipfrag.c', 'test_ipsec.c', 'test_ipsec_sad.c', 'test_ipsec_perf.c',
@@ -175,7 +174,6 @@ fast_tests = [ ['func_reentrancy_autotest', false, true], ['hash_autotest', true, true], ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], ['lcores_autotest', true, true], ['logs_autotest', true, true], ['lpm_autotest', true, true],
@@ -371,6 +369,10 @@ if dpdk_conf.has('RTE_LIB_EFD') test_sources += ['test_efd.c', 'test_efd_perf.c'] perf_test_names += ['efd_autotest', 'efd_perf_autotest'] endif +if dpdk_conf.has('RTE_IP_FRAG') + test_sources += 'test_ipfrag.c' + fast_tests += [['ipfrag_autotest', false, true]] +endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
@@ -82,6 +82,7 @@ optional_libs = [ 'gro', 'gso', 'kni', + 'ip_frag', 'jobstats', 'latencystats', 'member',
Signature · 1 line
2.39.2
PATCH v2 7/7 build: make reorder library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -96,7 +96,6 @@ test_sources = files( 'test_reciprocal_division_perf.c', 'test_red.c', 'test_pie.c', - 'test_reorder.c', 'test_rib.c', 'test_rib6.c', 'test_ring.c',
@@ -221,7 +220,6 @@ fast_tests = [ ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true], ['power_intel_uncore_autotest', true, true], - ['reorder_autotest', true, true], ['service_autotest', true, true], ['thash_autotest', true, true], ['threads_autotest', true, true],
@@ -382,6 +380,10 @@ if dpdk_conf.has('RTE_LIB_MEMBER') fast_tests += [['member_autotest', true, true]] perf_test_names += 'member_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_REORDER') + test_sources += 'test_reorder.c' + fast_tests += [['reorder_autotest', true, true]] +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -95,6 +95,7 @@ optional_libs = [ 'power', 'rawdev', 'regexdev', + 'reorder', 'table', 'vhost', ]
Signature · 1 line
2.39.2
Quoted 30 lines · Bruce Richardson
DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)Bruce Richardson (7):
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optional
Quoted 3 lines
app/test/meson.build | 81 +++++++++++++++++++++++++++----------------- lib/meson.build | 13 +++++++ 2 files changed, 63 insertions(+), 31 deletions(-)
There is a trivial conflict on the main repo (after lib/graph change), so the CI did not run this v2 revision.
The v1 looked fine but there was a strange error in Intel report:
http://mails.dpdk.org/archives/test-report/2023-June/415672.html
Could you rebase please?
Signature · 1 line
David Marchand
Quoted 37 lines · David Marchand
Quoted 30 lines · Bruce Richardson
DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)Bruce Richardson (7):
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optionalQuoted 3 lines
app/test/meson.build | 81 +++++++++++++++++++++++++++----------------- lib/meson.build | 13 +++++++ 2 files changed, 63 insertions(+), 31 deletions(-)
Quoted 5 lines
There is a trivial conflict on the main repo (after lib/graph change), so the CI did not run this v2 revision.
The v1 looked fine but there was a strange error in Intel report:
http://mails.dpdk.org/archives/test-report/2023-June/415672.html
Hum, we did not receive the ovsrobot report on v1 (not sure why), but looking at it manually, we have one failure too:
https://github.com/ovsrobot/dpdk/actions/runs/5346924872/jobs/9694636520#step:18:219
This is because we ask for the l3fwd example but its dependencies are disabled.
Signature · 1 line
David Marchand
Quoted 35 lines · David Marchand
Quoted 33 lines · David Marchand
Quoted 30 lines · Bruce Richardson
DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)Bruce Richardson (7):
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optional
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
app/test/meson.build | 81 +++++++++++++++++++++++++++----------------- lib/meson.build | 13 +++++++ 2 files changed, 63 insertions(+), 31 deletions(-)There is a trivial conflict on the main repo (after lib/graph change), so the CI did not run this v2 revision.
I've already rebased and preparing a v3
Quoted 9 lines
Quoted 2 lines
The v1 looked fine but there was a strange error in Intel report:
http://mails.dpdk.org/archives/test-report/2023-June/415672.htmlHum, we did not receive the ovsrobot report on v1 (not sure why), but looking at it manually, we have one failure too:
https://github.com/ovsrobot/dpdk/actions/runs/5346924872/jobs/9694636520#step:18:219This is because we ask for the l3fwd example but its dependencies are disabled.
Spotted this too, and working on a solution. Three options I considered:
1. keep eventdev as mandatory
2. don't build l3fwd as part of examples list (or build only with eventdev)
3. make eventdev an optional dependency of l3fwd.
I've gone for the latter (#3), which, though likely the more complicated change is probably the best one. L3fwd is such a commonly referenced app, I think it should be buildable in all configs, and I also think requiring eventdev in all cases seems wrong.
V3 coming soon....
v3 cover expand list of optional libraries
In reply to Bruce RichardsonDPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V3:
- rebase on top of main.
- make eventdev an optional dependency of l3fwd
- Fix incorrect define reference - RTE_LIB_IP_FRAG vs RTE_IP_FRAG
V2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)
Bruce Richardson (8):
examples/l3fwd: make eventdev an optional dependency
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optional
app/test/meson.build | 81 +++++++++++++++++++++++--------------- examples/l3fwd/l3fwd_em.c | 2 + examples/l3fwd/l3fwd_fib.c | 2 + examples/l3fwd/l3fwd_lpm.c | 2 + examples/l3fwd/main.c | 65 +++++++++++++++++++++++------- examples/l3fwd/meson.build | 13 ++++-- lib/meson.build | 13 ++++++ 7 files changed, 129 insertions(+), 49 deletions(-)
--
2.39.2
PATCH v3 1/8 examples/l3fwd: make eventdev an optional dependency
With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs.
--- examples/l3fwd/l3fwd_em.c | 2 ++ examples/l3fwd/l3fwd_fib.c | 2 ++ examples/l3fwd/l3fwd_lpm.c | 2 ++ examples/l3fwd/main.c | 65 ++++++++++++++++++++++++++++++-------- examples/l3fwd/meson.build | 13 +++++--- 5 files changed, 66 insertions(+), 18 deletions(-)
examples/l3fwd/l3fwd_em.c +2 -0
@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)return 0 ; } +#ifdef RTE_LIB_EVENTDEV static __rte_always_inline voidem_event_loop_single (struct l3fwd_event_resources *evt_rsrc,const uint8_t flags)
@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)em_event_loop_vector (evt_rsrc,L3FWD_EVENT_TX_ENQ ); return 0; } +#endif /* Initialize exact match (hash) parameters. 8< */ void
examples/l3fwd/l3fwd_fib.c +2 -0
@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)return 0 ; } +#ifdef RTE_LIB_EVENTDEV /* One eventdev loop for single and burst using fib. */ static __rte_always_inline void fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)fib_event_loop_vector (evt_rsrc,L3FWD_EVENT_TX_ENQ ); return 0; } +#endif /* Function to setup fib. 8< */ void
examples/l3fwd/l3fwd_lpm.c +2 -0
@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)return 0 ; } +#ifdef RTE_LIB_EVENTDEV static __rte_always_inline uint16_tlpm_process_event_pkt (const struct lcore_conf *lconf,struct rte_mbuf *mbuf) {
@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)lpm_event_loop_vector (evt_rsrc,L3FWD_EVENT_TX_ENQ ); return 0; } +#endif void setup_lpm (const int socketid)
examples/l3fwd/main.c +51 -14
227 lines not on this page · raw message
examples/l3fwd/meson.build +9 -4
@@ -7,14 +7,19 @@ # DPDK instance, use 'make' allow_experimental_apis = true -deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev'] +deps += ['acl', 'hash', 'lpm', 'fib'] sources = files( 'l3fwd_acl.c', 'l3fwd_em.c', - 'l3fwd_event.c', - 'l3fwd_event_internal_port.c', - 'l3fwd_event_generic.c', 'l3fwd_fib.c', 'l3fwd_lpm.c', 'main.c', ) +if dpdk_conf.has('RTE_LIB_EVENTDEV') + sources += files( + 'l3fwd_event.c', + 'l3fwd_event_internal_port.c', + 'l3fwd_event_generic.c', + ) + deps += 'eventdev' +endif
Signature · 1 line
2.39.2
Re: [PATCH v3 1/8] examples/l3fwd: make eventdev an optional dependency
Quoted 8 lines · Bruce Richardson
With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the
main.cfile having more than a couple of ifdefs.
Quoted 9 lines
Signed-off-by Bruce Richardson <[email protected]>--- examples/l3fwd/l3fwd_em.c | 2 ++ examples/l3fwd/l3fwd_fib.c | 2 ++ examples/l3fwd/l3fwd_lpm.c | 2 ++ examples/l3fwd/main.c | 65 ++++++++++++++++++++++++++++++-------- examples/l3fwd/meson.build | 13 +++++--- 5 files changed, 66 insertions(+), 18 deletions(-)
Apologies, it appears I still have issues in the case where l3fwd is compiled standalone after a DPDK install, rather than as part of the build. New revision of the set will be forthcoming....
PATCH v3 2/8 build: make most device classes optional
In reply to Bruce RichardsonApart 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.
--- app/test/meson.build | 33 +++++++++++++++++++++------------ lib/meson.build | 7 +++++++ 2 files changed, 28 insertions(+), 12 deletions(-)
app/test/meson.build +21 -12
@@ -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',
@@ -103,7 +96,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',
@@ -127,7 +119,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',
@@ -186,7 +177,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],
@@ -232,7 +222,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],
@@ -319,7 +308,6 @@ driver_test_names = [ 'cryptodev_sw_snow3g_autotest', 'cryptodev_sw_zuc_autotest', 'cryptodev_uadk_autotest', - 'dmadev_autotest', ] dump_test_names = []
@@ -357,6 +345,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]]
@@ -408,6 +415,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]]
@@ -430,6 +438,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
lib/meson.build +7 -0
@@ -68,8 +68,12 @@ libraries = [ ] optional_libs = [ + 'bbdev', 'bitratestats', 'cfgfile', + 'compressdev', + 'dmadev', + 'eventdev', 'flow_classify', 'gpudev', 'graph',
@@ -79,11 +83,14 @@ optional_libs = [ 'jobstats', 'latencystats', 'metrics', + 'mldev', 'node', 'pdump', 'pipeline', 'port', 'power', + 'rawdev', + 'regexdev', 'table', 'vhost', ]
Signature · 1 line
2.39.2
PATCH v3 3/8 build: make membership library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -76,8 +76,6 @@ test_sources = files( 'test_malloc.c', 'test_malloc_perf.c', 'test_mbuf.c', - 'test_member.c', - 'test_member_perf.c', 'test_memcpy.c', 'test_memcpy_perf.c', 'test_memory.c',
@@ -227,7 +225,6 @@ fast_tests = [ ['ipsec_autotest', true, true], ['kni_autotest', false, true], ['kvargs_autotest', true, true], - ['member_autotest', true, true], ['power_cpufreq_autotest', false, true], ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true],
@@ -265,7 +262,6 @@ perf_test_names = [ 'timer_racecond_autotest', 'efd_autotest', 'hash_functions_autotest', - 'member_perf_autotest', 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest',
@@ -379,6 +375,11 @@ if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]] endif +if dpdk_conf.has('RTE_LIB_MEMBER') + test_sources += ['test_member.c', 'test_member_perf.c'] + fast_tests += [['member_autotest', true, true]] + perf_test_names += 'member_perf_autotest' +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -82,6 +82,7 @@ optional_libs = [ 'kni', 'jobstats', 'latencystats', + 'member', 'metrics', 'mldev', 'node',
Signature · 1 line
2.39.2
PATCH v3 4/8 build: make bpf library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 10 +++++++--- lib/meson.build | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
app/test/meson.build +7 -3
@@ -15,7 +15,6 @@ test_sources = files( 'test_barrier.c', 'test_bitops.c', 'test_bitmap.c', - 'test_bpf.c', 'test_byteorder.c', 'test_cksum.c', 'test_cksum_perf.c',
@@ -150,8 +149,6 @@ fast_tests = [ ['acl_autotest', true, true], ['atomic_autotest', false, true], ['bitmap_autotest', true, true], - ['bpf_autotest', true, true], - ['bpf_convert_autotest', true, true], ['bitops_autotest', true, true], ['byteorder_autotest', true, true], ['cksum_autotest', true, true],
@@ -341,6 +338,13 @@ if dpdk_conf.has('RTE_EVENT_SKELETON') test_deps += 'event_skeleton' endif +if dpdk_conf.has('RTE_LIB_BPF') + test_sources += 'test_bpf.c' + fast_tests += [ + ['bpf_autotest', true, true], + ['bpf_convert_autotest', true, true], + ] +endif if dpdk_conf.has('RTE_LIB_DMADEV') test_sources += ['test_dmadev.c', 'test_dmadev_api.c'] driver_test_names += 'dmadev_autotest'
lib/meson.build +1 -0
@@ -70,6 +70,7 @@ libraries = [ optional_libs = [ 'bbdev', 'bitratestats', + 'bpf', 'cfgfile', 'compressdev', 'dmadev',
Signature · 1 line
2.39.2
PATCH v3 5/8 build: make efd library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 8 ++++---- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
app/test/meson.build +4 -4
@@ -42,8 +42,6 @@ test_sources = files( 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', - 'test_efd.c', - 'test_efd_perf.c', 'test_errno.c', 'test_ethdev_link.c', 'test_external_mem.c',
@@ -257,9 +255,7 @@ perf_test_names = [ 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest', - 'efd_autotest', 'hash_functions_autotest', - 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest', 'fib6_slow_autotest',
@@ -368,6 +364,10 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_EFD') + test_sources += ['test_efd.c', 'test_efd_perf.c'] + perf_test_names += ['efd_autotest', 'efd_perf_autotest'] +endif if dpdk_conf.has('RTE_LIB_GRAPH') test_sources += 'test_graph.c' fast_tests += [['graph_autotest', true, true]]
lib/meson.build +1 -0
@@ -74,6 +74,7 @@ optional_libs = [ 'cfgfile', 'compressdev', 'dmadev', + 'efd', 'eventdev', 'flow_classify', 'gpudev',
Signature · 1 line
2.39.2
PATCH v3 6/8 build: make distributor library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -38,8 +38,6 @@ test_sources = files( 'test_cycles.c', 'test_debug.c', 'test_devargs.c', - 'test_distributor.c', - 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', 'test_errno.c',
@@ -214,7 +212,6 @@ fast_tests = [ ['user_delay_us', true, true], ['version_autotest', true, true], ['crc_autotest', true, true], - ['distributor_autotest', false, true], ['fbarray_autotest', true, true], ['hash_readwrite_func_autotest', false, true], ['ipsec_autotest', true, true],
@@ -263,7 +260,6 @@ perf_test_names = [ 'rcu_qsbr_perf_autotest', 'red_perf', 'pie_perf', - 'distributor_perf_autotest', 'pmd_perf_autotest', 'service_perf_autotest', 'stack_perf_autotest',
@@ -364,6 +360,11 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_DISTRIBUTOR') + test_sources += ['test_distributor.c', 'test_distributor_perf.c'] + fast_tests += [['distributor_autotest', false, true]] + perf_test_names += 'distributor_perf_autotest' +endif if dpdk_conf.has('RTE_LIB_EFD') test_sources += ['test_efd.c', 'test_efd_perf.c'] perf_test_names += ['efd_autotest', 'efd_perf_autotest']
lib/meson.build +1 -0
@@ -73,6 +73,7 @@ optional_libs = [ 'bpf', 'cfgfile', 'compressdev', + 'distributor', 'dmadev', 'efd', 'eventdev',
Signature · 1 line
2.39.2
PATCH v3 7/8 build: make fragmentation library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -56,7 +56,6 @@ test_sources = files( 'test_hash_perf.c', 'test_hash_readwrite_lf_perf.c', 'test_interrupts.c', - 'test_ipfrag.c', 'test_ipsec.c', 'test_ipsec_sad.c', 'test_ipsec_perf.c',
@@ -173,7 +172,6 @@ fast_tests = [ ['func_reentrancy_autotest', false, true], ['hash_autotest', true, true], ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], ['lcores_autotest', true, true], ['logs_autotest', true, true], ['lpm_autotest', true, true],
@@ -376,6 +374,10 @@ if dpdk_conf.has('RTE_LIB_GRAPH') test_sources += 'test_graph_perf.c' perf_test_names += 'graph_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_IP_FRAG') + test_sources += 'test_ipfrag.c' + fast_tests += [['ipfrag_autotest', false, true]] +endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
@@ -83,6 +83,7 @@ optional_libs = [ 'gro', 'gso', 'kni', + 'ip_frag', 'jobstats', 'latencystats', 'member',
Signature · 1 line
2.39.2
PATCH v3 8/8 build: make reorder library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -94,7 +94,6 @@ test_sources = files( 'test_reciprocal_division_perf.c', 'test_red.c', 'test_pie.c', - 'test_reorder.c', 'test_rib.c', 'test_rib6.c', 'test_ring.c',
@@ -219,7 +218,6 @@ fast_tests = [ ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true], ['power_intel_uncore_autotest', true, true], - ['reorder_autotest', true, true], ['service_autotest', true, true], ['thash_autotest', true, true], ['threads_autotest', true, true],
@@ -387,6 +385,10 @@ if dpdk_conf.has('RTE_LIB_MEMBER') fast_tests += [['member_autotest', true, true]] perf_test_names += 'member_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_REORDER') + test_sources += 'test_reorder.c' + fast_tests += [['reorder_autotest', true, true]] +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -96,6 +96,7 @@ optional_libs = [ 'power', 'rawdev', 'regexdev', + 'reorder', 'table', 'vhost', ]
Signature · 1 line
2.39.2
v4 cover expand list of optional libraries
In reply to Bruce RichardsonDPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V4:
- fix more issues with disabling eventdev:
* ensure dlb2 driver doesn't directly reference the static lib
* ensure l3fwd can be built using makefiles without eventdev
* remove dependency on eventdev for unit tests like pdump that don't actually need it.
V3:
- rebase on top of main.
- make eventdev an optional dependency of l3fwd
- Fix incorrect define reference - RTE_LIB_IP_FRAG vs RTE_IP_FRAG
V2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)
Bruce Richardson (9):
examples/l3fwd: make eventdev an optional dependency event/dlb2: skip configuration if no eventdev lib
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optional
app/test/meson.build | 89 +++++++++++++--------- drivers/event/dlb2/meson.build | 2 +- examples/l3fwd/l3fwd_em.c | 2 + examples/l3fwd/l3fwd_em_hlm.h | 2 + examples/l3fwd/l3fwd_event.c | 2 + examples/l3fwd/l3fwd_event.h | 7 +- examples/l3fwd/l3fwd_event_generic.c | 2 + examples/l3fwd/l3fwd_event_internal_port.c | 2 + examples/l3fwd/l3fwd_fib.c | 2 + examples/l3fwd/l3fwd_lpm.c | 2 + examples/l3fwd/main.c | 65 ++++++++++++---- examples/l3fwd/meson.build | 5 +- lib/meson.build | 13 ++++ 13 files changed, 143 insertions(+), 52 deletions(-)
--
2.39.2
PATCH v4 1/9 examples/l3fwd: make eventdev an optional dependency
With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs.
--- examples/l3fwd/l3fwd_em.c | 2 + examples/l3fwd/l3fwd_em_hlm.h | 2 + examples/l3fwd/l3fwd_event.c | 2 + examples/l3fwd/l3fwd_event.h | 7 ++- examples/l3fwd/l3fwd_event_generic.c | 2 + examples/l3fwd/l3fwd_event_internal_port.c | 2 + examples/l3fwd/l3fwd_fib.c | 2 + examples/l3fwd/l3fwd_lpm.c | 2 + examples/l3fwd/main.c | 65 +++++++++++++++++----- examples/l3fwd/meson.build | 5 +- 10 files changed, 74 insertions(+), 17 deletions(-)
examples/l3fwd/l3fwd_em.c +2 -0
@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)return 0 ; } +#ifdef RTE_LIB_EVENTDEV static __rte_always_inline voidem_event_loop_single (struct l3fwd_event_resources *evt_rsrc,const uint8_t flags)
@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)em_event_loop_vector (evt_rsrc,L3FWD_EVENT_TX_ENQ ); return 0; } +#endif /* Initialize exact match (hash) parameters. 8< */ void
examples/l3fwd/l3fwd_em_hlm.h +2 -0
@@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,send_packets_multi (qconf, pkts_burst, dst_port, nb_rx); } +#ifdef RTE_LIB_EVENTDEV /* * Buffer optimized handling of events, invoked * from main_loop.
@@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec,process_event_vector (vec, dst_port); } +#endif /* RTE_LIB_EVENTDEV */ #endif /* __L3FWD_EM_HLM_H__ */
examples/l3fwd/l3fwd_event.c +2 -0
@@ -2,6 +2,7 @@* Copyright(C) 2019 Marvell International Ltd. */ +#ifdef RTE_LIB_EVENTDEV #include <stdbool.h> #include <getopt.h>
@@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,rte_event_port_quiesce (event_d_id, event_p_id, l3fwd_event_port_flush, NULL); } +#endif /* #ifdef RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event.h +5 -2
@@ -6,11 +6,13 @@#define __L3FWD_EVENTDEV_H__#include <rte_common.h> +#include <rte_service.h> +#include <rte_spinlock.h> + +#ifdef RTE_LIB_EVENTDEV #include <rte_eventdev.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> -#include <rte_service.h> -#include <rte_spinlock.h> #include "l3fwd.h"
@@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id, struct rte_event events[], uint16_t nb_enq, uint16_t nb_deq, uint8_t is_vector); +#endif /* ifdef RTE_LIB_EVENTDEV */ #endif /* __L3FWD_EVENTDEV_H__ */
examples/l3fwd/l3fwd_event_generic.c +2 -0
@@ -2,6 +2,7 @@* Copyright(C) 2019 Marvell International Ltd. */ +#ifdef RTE_LIB_EVENTDEV #include <stdbool.h> #include "l3fwd.h"
@@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops) ops->event_port_setup = l3fwd_event_port_setup_generic; ops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic; } +#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event_internal_port.c +2 -0
@@ -2,6 +2,7 @@* Copyright(C) 2019 Marvell International Ltd. */ +#ifdef RTE_LIB_EVENTDEV #include <stdbool.h> #include "l3fwd.h"
@@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops) ops->event_port_setup = l3fwd_event_port_setup_internal_port; ops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port; } +#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_fib.c +2 -0
@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)return 0 ; } +#ifdef RTE_LIB_EVENTDEV /* One eventdev loop for single and burst using fib. */ static __rte_always_inline void fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)fib_event_loop_vector (evt_rsrc,L3FWD_EVENT_TX_ENQ ); return 0; } +#endif /* Function to setup fib. 8< */ void
examples/l3fwd/l3fwd_lpm.c +2 -0
@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)return 0 ; } +#ifdef RTE_LIB_EVENTDEV static __rte_always_inline uint16_tlpm_process_event_pkt (const struct lcore_conf *lconf,struct rte_mbuf *mbuf) {
@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)lpm_event_loop_vector (evt_rsrc,L3FWD_EVENT_TX_ENQ ); return 0; } +#endif void setup_lpm (const int socketid)
examples/l3fwd/main.c +51 -14
227 lines not on this page · raw message
examples/l3fwd/meson.build +4 -1
@@ -7,7 +7,7 @@ # DPDK instance, use 'make' allow_experimental_apis = true -deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev'] +deps += ['acl', 'hash', 'lpm', 'fib'] sources = files( 'l3fwd_acl.c', 'l3fwd_em.c',
@@ -18,3 +18,6 @@ sources = files( 'l3fwd_lpm.c', 'main.c', ) +if dpdk_conf.has('RTE_LIB_EVENTDEV') + deps += 'eventdev' +endif
Signature · 1 line
2.39.2
PATCH v4 2/9 event/dlb2: skip configuration if no eventdev lib
In reply to Bruce RichardsonWhile the build system will skip building most libs and drivers when a dependency is missing for a component, for DLB2 driver, the "static_rte_eventdev" object is referenced inside the meson.build file itself, which will cause crashes if it doesn't exist i.e. if eventdev is disabled. Prevent this issue by skipping processing the file if no eventdev. [The build system will still report missing dependency, as the dependency is set by default for all eventdev drivers]
--- drivers/event/dlb2/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/event/dlb2/meson.build +1 -1
@@ -7,7 +7,7 @@ if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') subdir_done() endif -if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 or not dpdk_conf.has('RTE_LIB_EVENTDEV') subdir_done() endif
Signature · 1 line
2.39.2
Re: [PATCH v4 2/9] event/dlb2: skip configuration if no eventdev lib
Quoted 10 lines · Bruce Richardson
While the build system will skip building most libs and drivers when a dependency is missing for a component, for DLB2 driver, the "
static_rte_eventdev" object is referenced inside the meson.build file itself, which will cause crashes if it doesn't exist i.e. if eventdev is disabled. Prevent this issue by skipping processing the file if no eventdev. [The build system will still report missing dependency, as the dependency is set by default for all eventdev drivers]Signed-off-by Bruce Richardson <[email protected]>
Could we evaluate the class "std_deps" before jumping to each driver meson.build?
Signature · 1 line
David Marchand
Re: [PATCH v4 2/9] event/dlb2: skip configuration if no eventdev lib
Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson
While the build system will skip building most libs and drivers when a dependency is missing for a component, for DLB2 driver, the "
static_rte_eventdev" object is referenced inside the meson.build file itself, which will cause crashes if it doesn't exist i.e. if eventdev is disabled. Prevent this issue by skipping processing the file if no eventdev. [The build system will still report missing dependency, as the dependency is set by default for all eventdev drivers]
Quoted 4 lines
Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Could we evaluate the class "
std_deps" before jumping to each driver meson.build?
Hum, with my suggestion, we lose the opportunity for drivers to rewrite completely their "deps".
I doubt we have cases where it really matters, but if this revealed to be necessary, such driver may be directly referenced in drivers/meson.build like we do for common/cnxk & friends.
To illustrate the idea, I pushed your series along patches of mine (target is v23.11) in my github repo.
https://github.com/david-marchand/dpdk/commit/enable_libs~8
Signature · 1 line
David Marchand
Re: [PATCH v4 2/9] event/dlb2: skip configuration if no eventdev lib
Quoted 25 lines · David Marchand
Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson
While the build system will skip building most libs and drivers when a dependency is missing for a component, for DLB2 driver, the "
static_rte_eventdev" object is referenced inside the meson.build file itself, which will cause crashes if it doesn't exist i.e. if eventdev is disabled. Prevent this issue by skipping processing the file if no eventdev. [The build system will still report missing dependency, as the dependency is set by default for all eventdev drivers]Quoted 4 lines
Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Could we evaluate the class "
std_deps" before jumping to each driver meson.build?Hum, with my suggestion, we lose the opportunity for drivers to rewrite completely their "deps".
I doubt we have cases where it really matters, but if this revealed to be necessary, such driver may be directly referenced indrivers/meson.buildlike we do for common/cnxk & friends.
Quoted 4 lines
To illustrate the idea, I pushed your series along patches of mine (target is v23.11) in my github repo.
https://github.com/david-marchand/dpdk/commit/enable_libs~8
I don't think we should need to worry too much about the case of a driver needing to rewrite deps. The standard deps should really just be the minimal deps for a class.
However, for the implementation of that check, I'm not sure I like the approach of checking std_deps in a loop for each driver. Firstly, the logic inside the per-driver block is already pretty complicated, but secondly, I think we can skip that loop entirely if the standard deps for a class are not met. I think instead it would be better to process std_deps value once immediately after the "subdir(class)" line, and if not all deps are present, just loop through all the driver directories for that class immediately and mark them as unbuildable, before just moving on to the next class.
WDYT?
/Bruce
Re: [PATCH v4 2/9] event/dlb2: skip configuration if no eventdev lib
Hello Bruce,
Quoted 35 lines · Bruce Richardson
Quoted 25 lines · David Marchand
Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson
While the build system will skip building most libs and drivers when a dependency is missing for a component, for DLB2 driver, the "
static_rte_eventdev" object is referenced inside the meson.build file itself, which will cause crashes if it doesn't exist i.e. if eventdev is disabled. Prevent this issue by skipping processing the file if no eventdev. [The build system will still report missing dependency, as the dependency is set by default for all eventdev drivers]Quoted 4 lines
Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Could we evaluate the class "
std_deps" before jumping to each driver meson.build?Hum, with my suggestion, we lose the opportunity for drivers to rewrite completely their "deps".
I doubt we have cases where it really matters, but if this revealed to be necessary, such driver may be directly referenced indrivers/meson.buildlike we do for common/cnxk & friends.Quoted 4 lines
To illustrate the idea, I pushed your series along patches of mine (target is v23.11) in my github repo.
https://github.com/david-marchand/dpdk/commit/enable_libs~8I don't think we should need to worry too much about the case of a driver needing to rewrite deps. The standard deps should really just be the minimal deps for a class.
Quoted 9 lines
However, for the implementation of that check, I'm not sure I like the approach of checking
std_depsin a loop for each driver. Firstly, the logic inside the per-driver block is already pretty complicated, but secondly, I think we can skip that loop entirely if the standard deps for a class are not met. I think instead it would be better to processstd_depsvalue once immediately after the "subdir(class)" line, and if not all deps are present, just loop through all the driver directories for that class immediately and mark them as unbuildable, before just moving on to the next class.
Skipping this loop makes the change smaller and the logic in drivers/meson.build easier to understand.
We lose the exhaustive summary for disabled content (before, every disabled driver was logged with the associated reason), but we can still log the reason why a class is disabled.
Your suggestion looks good to me, let me send a patch.
Signature · 1 line
David Marchand
Re: [PATCH v4 2/9] event/dlb2: skip configuration if no eventdev lib
Quoted 49 lines · David Marchand
Hello Bruce,
Quoted 35 lines · Bruce Richardson
Quoted 25 lines · David Marchand
Quoted 12 lines · David Marchand
Quoted 9 lines · Bruce Richardson
While the build system will skip building most libs and drivers when a dependency is missing for a component, for DLB2 driver, the "
static_rte_eventdev" object is referenced inside the meson.build file itself, which will cause crashes if it doesn't exist i.e. if eventdev is disabled. Prevent this issue by skipping processing the file if no eventdev. [The build system will still report missing dependency, as the dependency is set by default for all eventdev drivers]Quoted 4 lines
Quoted 1 line
Signed-off-by Bruce Richardson <[email protected]>Could we evaluate the class "
std_deps" before jumping to each driver meson.build?Hum, with my suggestion, we lose the opportunity for drivers to rewrite completely their "deps".
I doubt we have cases where it really matters, but if this revealed to be necessary, such driver may be directly referenced indrivers/meson.buildlike we do for common/cnxk & friends.Quoted 4 lines
To illustrate the idea, I pushed your series along patches of mine (target is v23.11) in my github repo.
https://github.com/david-marchand/dpdk/commit/enable_libs~8I don't think we should need to worry too much about the case of a driver needing to rewrite deps. The standard deps should really just be the minimal deps for a class.
Quoted 9 lines
However, for the implementation of that check, I'm not sure I like the approach of checking
std_depsin a loop for each driver. Firstly, the logic inside the per-driver block is already pretty complicated, but secondly, I think we can skip that loop entirely if the standard deps for a class are not met. I think instead it would be better to processstd_depsvalue once immediately after the "subdir(class)" line, and if not all deps are present, just loop through all the driver directories for that class immediately and mark them as unbuildable, before just moving on to the next class.
Quoted 6 lines
Skipping this loop makes the change smaller and the logic in
drivers/meson.buildeasier to understand.
We lose the exhaustive summary for disabled content (before, every disabled driver was logged with the associated reason), but we can still log the reason why a class is disabled.
When we "subdir" into the driver class directory to get the standard dependencies, we also get the list of drivers of that class. We can then loop through those drivers to individually mark them as disabled for the summary. It would be a fairly small loop, and would keep things consistent with what we have now.
On the other hand, having a single line for a whole class of drivers may make the summary more useful!
/Bruce
PATCH v4 3/9 build: make most device classes optional
In reply to Bruce RichardsonApart 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.
--- app/test/meson.build | 41 ++++++++++++++++++++++++++--------------- lib/meson.build | 7 +++++++ 2 files changed, 33 insertions(+), 15 deletions(-)
app/test/meson.build +26 -15
@@ -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',
@@ -103,7 +96,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',
@@ -127,7 +119,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',
@@ -186,7 +177,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],
@@ -232,7 +222,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],
@@ -319,7 +308,6 @@ driver_test_names = [ 'cryptodev_sw_snow3g_autotest', 'cryptodev_sw_zuc_autotest', 'cryptodev_uadk_autotest', - 'dmadev_autotest', ] dump_test_names = []
@@ -357,6 +345,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]]
@@ -402,15 +409,18 @@ if dpdk_conf.has('RTE_NET_BOND') driver_test_names += 'link_bonding_mode4_autotest' endif endif -if dpdk_conf.has('RTE_LIB_EVENTDEV') and dpdk_conf.has('RTE_NET_RING') +if dpdk_conf.has('RTE_NET_RING') test_deps += 'net_ring' test_sources += 'test_pmd_ring_perf.c' test_sources += 'test_pmd_ring.c' - test_sources += 'test_event_eth_tx_adapter.c' test_sources += 'sample_packet_forward.c' fast_tests += [['ring_pmd_autotest', true, true]] perf_test_names += 'ring_pmd_perf_autotest' - fast_tests += [['event_eth_tx_adapter_autotest', false, true]] + if dpdk_conf.has('RTE_LIB_EVENTDEV') + test_sources += 'test_event_eth_tx_adapter.c' + test_sources += 'test_security_inline_proto.c' + fast_tests += [['event_eth_tx_adapter_autotest', false, true]] + endif if dpdk_conf.has('RTE_LIB_BITRATESTATS') test_sources += 'test_bitratestats.c' fast_tests += [['bitratestats_autotest', true, true]]
@@ -430,6 +440,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
lib/meson.build +7 -0
@@ -68,8 +68,12 @@ libraries = [ ] optional_libs = [ + 'bbdev', 'bitratestats', 'cfgfile', + 'compressdev', + 'dmadev', + 'eventdev', 'flow_classify', 'gpudev', 'graph',
@@ -79,11 +83,14 @@ optional_libs = [ 'jobstats', 'latencystats', 'metrics', + 'mldev', 'node', 'pdump', 'pipeline', 'port', 'power', + 'rawdev', + 'regexdev', 'table', 'vhost', ]
Signature · 1 line
2.39.2
PATCH v4 4/9 build: make membership library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -76,8 +76,6 @@ test_sources = files( 'test_malloc.c', 'test_malloc_perf.c', 'test_mbuf.c', - 'test_member.c', - 'test_member_perf.c', 'test_memcpy.c', 'test_memcpy_perf.c', 'test_memory.c',
@@ -227,7 +225,6 @@ fast_tests = [ ['ipsec_autotest', true, true], ['kni_autotest', false, true], ['kvargs_autotest', true, true], - ['member_autotest', true, true], ['power_cpufreq_autotest', false, true], ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true],
@@ -265,7 +262,6 @@ perf_test_names = [ 'timer_racecond_autotest', 'efd_autotest', 'hash_functions_autotest', - 'member_perf_autotest', 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest',
@@ -379,6 +375,11 @@ if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]] endif +if dpdk_conf.has('RTE_LIB_MEMBER') + test_sources += ['test_member.c', 'test_member_perf.c'] + fast_tests += [['member_autotest', true, true]] + perf_test_names += 'member_perf_autotest' +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -82,6 +82,7 @@ optional_libs = [ 'kni', 'jobstats', 'latencystats', + 'member', 'metrics', 'mldev', 'node',
Signature · 1 line
2.39.2
PATCH v4 5/9 build: make bpf library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 10 +++++++--- lib/meson.build | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
app/test/meson.build +7 -3
@@ -15,7 +15,6 @@ test_sources = files( 'test_barrier.c', 'test_bitops.c', 'test_bitmap.c', - 'test_bpf.c', 'test_byteorder.c', 'test_cksum.c', 'test_cksum_perf.c',
@@ -150,8 +149,6 @@ fast_tests = [ ['acl_autotest', true, true], ['atomic_autotest', false, true], ['bitmap_autotest', true, true], - ['bpf_autotest', true, true], - ['bpf_convert_autotest', true, true], ['bitops_autotest', true, true], ['byteorder_autotest', true, true], ['cksum_autotest', true, true],
@@ -341,6 +338,13 @@ if dpdk_conf.has('RTE_EVENT_SKELETON') test_deps += 'event_skeleton' endif +if dpdk_conf.has('RTE_LIB_BPF') + test_sources += 'test_bpf.c' + fast_tests += [ + ['bpf_autotest', true, true], + ['bpf_convert_autotest', true, true], + ] +endif if dpdk_conf.has('RTE_LIB_DMADEV') test_sources += ['test_dmadev.c', 'test_dmadev_api.c'] driver_test_names += 'dmadev_autotest'
lib/meson.build +1 -0
@@ -70,6 +70,7 @@ libraries = [ optional_libs = [ 'bbdev', 'bitratestats', + 'bpf', 'cfgfile', 'compressdev', 'dmadev',
Signature · 1 line
2.39.2
Re: [PATCH v4 5/9] build: make bpf library optional
23/06/2023 16:07, Bruce Richardson пишет:
Quoted 50 lines
This library is not essential for most DPDK uses, so mark it as optional in the build config.
Signed-off-by Bruce Richardson <[email protected]>Acked-by Morten Brørup <[email protected]>--- app/test/meson.build | 10 +++++++--- lib/meson.build | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)app/test/meson.build +7
-3@@ -15,7 +15,6 @@ test_sources = files( 'test_barrier.c', 'test_bitops.c', 'test_bitmap.c', - 'test_bpf.c', 'test_byteorder.c', 'test_cksum.c', 'test_cksum_perf.c',@@ -150,8 +149,6 @@ fast_tests = [ ['acl_autotest', true, true], ['atomic_autotest', false, true], ['bitmap_autotest', true, true], - ['bpf_autotest', true, true], - ['bpf_convert_autotest', true, true], ['bitops_autotest', true, true], ['byteorder_autotest', true, true], ['cksum_autotest', true, true],@@ -341,6 +338,13 @@ if dpdk_conf.has('RTE_EVENT_SKELETON') test_deps += 'event_skeleton' endif +if dpdk_conf.has('RTE_LIB_BPF') + test_sources += 'test_bpf.c' + fast_tests += [ + ['bpf_autotest', true, true], + ['bpf_convert_autotest', true, true], + ] +endif if dpdk_conf.has('RTE_LIB_DMADEV') test_sources += ['test_dmadev.c', 'test_dmadev_api.c'] driver_test_names += 'dmadev_autotest'lib/meson.build +0
-0
lib/meson.build libraries = [ · line 76
Quoted 7 lines
lib/meson.build +1
-0@@ -70,6 +70,7 @@ libraries = [ optional_libs = [ 'bbdev', 'bitratestats', + 'bpf', 'cfgfile', 'compressdev', 'dmadev',
PATCH v4 6/9 build: make efd library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 8 ++++---- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
app/test/meson.build +4 -4
@@ -42,8 +42,6 @@ test_sources = files( 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', - 'test_efd.c', - 'test_efd_perf.c', 'test_errno.c', 'test_ethdev_link.c', 'test_external_mem.c',
@@ -257,9 +255,7 @@ perf_test_names = [ 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest', - 'efd_autotest', 'hash_functions_autotest', - 'efd_perf_autotest', 'lpm6_perf_autotest', 'rib6_slow_autotest', 'fib6_slow_autotest',
@@ -368,6 +364,10 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_EFD') + test_sources += ['test_efd.c', 'test_efd_perf.c'] + perf_test_names += ['efd_autotest', 'efd_perf_autotest'] +endif if dpdk_conf.has('RTE_LIB_GRAPH') test_sources += 'test_graph.c' fast_tests += [['graph_autotest', true, true]]
lib/meson.build +1 -0
@@ -74,6 +74,7 @@ optional_libs = [ 'cfgfile', 'compressdev', 'dmadev', + 'efd', 'eventdev', 'flow_classify', 'gpudev',
Signature · 1 line
2.39.2
PATCH v4 7/9 build: make distributor library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 9 +++++---- lib/meson.build | 1 + 2 files changed, 6 insertions(+), 4 deletions(-)
app/test/meson.build +5 -4
@@ -38,8 +38,6 @@ test_sources = files( 'test_cycles.c', 'test_debug.c', 'test_devargs.c', - 'test_distributor.c', - 'test_distributor_perf.c', 'test_eal_flags.c', 'test_eal_fs.c', 'test_errno.c',
@@ -214,7 +212,6 @@ fast_tests = [ ['user_delay_us', true, true], ['version_autotest', true, true], ['crc_autotest', true, true], - ['distributor_autotest', false, true], ['fbarray_autotest', true, true], ['hash_readwrite_func_autotest', false, true], ['ipsec_autotest', true, true],
@@ -263,7 +260,6 @@ perf_test_names = [ 'rcu_qsbr_perf_autotest', 'red_perf', 'pie_perf', - 'distributor_perf_autotest', 'pmd_perf_autotest', 'service_perf_autotest', 'stack_perf_autotest',
@@ -364,6 +360,11 @@ if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY') test_sources += 'test_flow_classify.c' fast_tests += [['flow_classify_autotest', false, true]] endif +if dpdk_conf.has('RTE_LIB_DISTRIBUTOR') + test_sources += ['test_distributor.c', 'test_distributor_perf.c'] + fast_tests += [['distributor_autotest', false, true]] + perf_test_names += 'distributor_perf_autotest' +endif if dpdk_conf.has('RTE_LIB_EFD') test_sources += ['test_efd.c', 'test_efd_perf.c'] perf_test_names += ['efd_autotest', 'efd_perf_autotest']
lib/meson.build +1 -0
@@ -73,6 +73,7 @@ optional_libs = [ 'bpf', 'cfgfile', 'compressdev', + 'distributor', 'dmadev', 'efd', 'eventdev',
Signature · 1 line
2.39.2
PATCH v4 8/9 build: make fragmentation library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -56,7 +56,6 @@ test_sources = files( 'test_hash_perf.c', 'test_hash_readwrite_lf_perf.c', 'test_interrupts.c', - 'test_ipfrag.c', 'test_ipsec.c', 'test_ipsec_sad.c', 'test_ipsec_perf.c',
@@ -173,7 +172,6 @@ fast_tests = [ ['func_reentrancy_autotest', false, true], ['hash_autotest', true, true], ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], ['lcores_autotest', true, true], ['logs_autotest', true, true], ['lpm_autotest', true, true],
@@ -376,6 +374,10 @@ if dpdk_conf.has('RTE_LIB_GRAPH') test_sources += 'test_graph_perf.c' perf_test_names += 'graph_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_IP_FRAG') + test_sources += 'test_ipfrag.c' + fast_tests += [['ipfrag_autotest', false, true]] +endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]
lib/meson.build +1 -0
@@ -83,6 +83,7 @@ optional_libs = [ 'gro', 'gso', 'kni', + 'ip_frag', 'jobstats', 'latencystats', 'member',
Signature · 1 line
2.39.2
Re: [PATCH v4 8/9] build: make fragmentation library optional
23/06/2023 16:07, Bruce Richardson пишет:
Quoted 31 lines
This library is not essential for most DPDK uses, so mark it as optional in the build config.
Signed-off-by Bruce Richardson <[email protected]>Acked-by Morten Brørup <[email protected]>--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)app/test/meson.build +0
-2@@ -56,7 +56,6 @@ test_sources = files( 'test_hash_perf.c', 'test_hash_readwrite_lf_perf.c', 'test_interrupts.c', - 'test_ipfrag.c', 'test_ipsec.c', 'test_ipsec_sad.c', 'test_ipsec_perf.c',@@ -173,7 +172,6 @@ fast_tests = [ ['func_reentrancy_autotest', false, true], ['hash_autotest', true, true], ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], ['lcores_autotest', true, true], ['logs_autotest', true, true], ['lpm_autotest', true, true],
app/test/meson.build if dpdk_conf.has('RTE_LIB_GRAPH') · line 379
Quoted 6 lines
app/test/meson.build +3
-0@@ -376,6 +374,10 @@ if dpdk_conf.has('RTE_LIB_GRAPH') test_sources += 'test_graph_perf.c' perf_test_names += 'graph_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_IP_FRAG') + test_sources += 'test_ipfrag.c' + fast_tests += [['ipfrag_autotest', false, true]]
AFAIK, there is a new patch in flight to add new ip_frag perf autotest:
http://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
Probably need to be synced with these changes too..
Quoted 9 lines
app/test/meson.build +1
-0+endif if dpdk_conf.has('RTE_LIB_METRICS') test_sources += ['test_metrics.c'] fast_tests += [['metrics_autotest', true, true]]lib/meson.build +0
-0
lib/meson.build optional_libs = [ · line 89
Quoted 7 lines
lib/meson.build +1
-0@@ -83,6 +83,7 @@ optional_libs = [ 'gro', 'gso', 'kni', + 'ip_frag', 'jobstats', 'latencystats', 'member',
Re: [PATCH v4 8/9] build: make fragmentation library optional
Quoted 34 lines · Konstantin Ananyev
23/06/2023 16:07, Bruce Richardson пишет:
Quoted 33 lines
This library is not essential for most DPDK uses, so mark it as optional in the build config.
Signed-off-by Bruce Richardson <[email protected]>Acked-by Morten Brørup <[email protected]>--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)app/test/meson.build +0
-2@@ -56,7 +56,6 @@ test_sources = files( 'test_hash_perf.c', 'test_hash_readwrite_lf_perf.c', 'test_interrupts.c', - 'test_ipfrag.c', 'test_ipsec.c', 'test_ipsec_sad.c', 'test_ipsec_perf.c',@@ -173,7 +172,6 @@ fast_tests = [ ['func_reentrancy_autotest', false, true], ['hash_autotest', true, true], ['interrupt_autotest', true, true], - ['ipfrag_autotest', false, true], ['lcores_autotest', true, true], ['logs_autotest', true, true], ['lpm_autotest', true, true],@@ -376,6 +374,10 @@ if dpdk_conf.has('RTE_LIB_GRAPH') test_sources += 'test_graph_perf.c' perf_test_names += 'graph_perf_autotest'
Quoted 9 lines
app/test/meson.build if dpdk_conf.has('RTE_LIB_GRAPH') · line 379
Quoted 4 lines
app/test/meson.build +3
-0endif +if dpdk_conf.has('RTE_LIB_IP_FRAG') + test_sources += 'test_ipfrag.c' + fast_tests += [['ipfrag_autotest', false, true]]AFAIK, there is a new patch in flight to add new
ip_fragperf autotest:
http://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
Probably need to be synced with these changes too..
Yep, it would.
I'm working on and off in the background to try and improve the way we manage dependencies for tests, as right now it's a bit of mess, if I'm honest. It's very condition-based and error prone.
PATCH v4 9/9 build: make reorder library optional
In reply to Bruce RichardsonThis library is not essential for most DPDK uses, so mark it as optional in the build config.
--- app/test/meson.build | 6 ++++-- lib/meson.build | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
app/test/meson.build +4 -2
@@ -94,7 +94,6 @@ test_sources = files( 'test_reciprocal_division_perf.c', 'test_red.c', 'test_pie.c', - 'test_reorder.c', 'test_rib.c', 'test_rib6.c', 'test_ring.c',
@@ -219,7 +218,6 @@ fast_tests = [ ['power_autotest', true, true], ['power_kvm_vm_autotest', false, true], ['power_intel_uncore_autotest', true, true], - ['reorder_autotest', true, true], ['service_autotest', true, true], ['thash_autotest', true, true], ['threads_autotest', true, true],
@@ -387,6 +385,10 @@ if dpdk_conf.has('RTE_LIB_MEMBER') fast_tests += [['member_autotest', true, true]] perf_test_names += 'member_perf_autotest' endif +if dpdk_conf.has('RTE_LIB_REORDER') + test_sources += 'test_reorder.c' + fast_tests += [['reorder_autotest', true, true]] +endif if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY') test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c'] fast_tests += [['telemetry_json_autotest', true, true]]
lib/meson.build +1 -0
@@ -96,6 +96,7 @@ optional_libs = [ 'power', 'rawdev', 'regexdev', + 'reorder', 'table', 'vhost', ]
Signature · 1 line
2.39.2
Quoted 63 lines · Bruce Richardson
DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
V4:
- fix more issues with disabling eventdev:
* ensure dlb2 driver doesn't directly reference the static lib
* ensure l3fwd can be built using makefiles without eventdev
* remove dependency on eventdev for unit tests like pdump that don't actually need it.V3:
- rebase on top of main.
- make eventdev an optional dependency of l3fwd
- Fix incorrect define reference -RTE_LIB_IP_FRAGvsRTE_IP_FRAGV2: fix checkpatch issues, since checkpatch doesn't like empty commit
messages (even if the title is pretty self-explanatory!)Bruce Richardson (9):
examples/l3fwd: make eventdev an optional dependency event/dlb2: skip configuration if no eventdev lib
build: make most device classes optional
build: make membership library optional
build: make bpf library optional
build: make efd library optional
build: make distributor library optional
build: make fragmentation library optional
build: make reorder library optionalapp/test/meson.build | 89 +++++++++++++--------- drivers/event/dlb2/meson.build | 2 +- examples/l3fwd/l3fwd_em.c | 2 + examples/l3fwd/l3fwd_em_hlm.h | 2 + examples/l3fwd/l3fwd_event.c | 2 + examples/l3fwd/l3fwd_event.h | 7 +- examples/l3fwd/l3fwd_event_generic.c | 2 + examples/l3fwd/l3fwd_event_internal_port.c | 2 + examples/l3fwd/l3fwd_fib.c | 2 + examples/l3fwd/l3fwd_lpm.c | 2 + examples/l3fwd/main.c | 65 ++++++++++++---- examples/l3fwd/meson.build | 5 +- lib/meson.build | 13 ++++ 13 files changed, 143 insertions(+), 52 deletions(-)--
2.39.2.
Quoted 17 lines · Bruce Richardson
DPDK still has many libraries which cannot be disabled as part of a build. With the ongoing work to make it easier to only build a subset of the libraries in DPDK, we can also work to expand the list of libraries which can be enabled/disabled as desired.
This patch addresses a number of the "low-hanging fruit" libraries, where only the unit test builds need minor changes to support making the library optional. The rest of the build system is already well set up for selective disabling of libraries.
For better support of enabling components, especially those more integrated into DPDK unit tests, rework of the test meson.build file is likely needed. For example, it could probably be better rewritten to use a dictionary of files and the dependencies of each file, and the unit test commands each provides. However, such rework is a significant effort, and outside the scope of this patchset.
Quoted 7 lines
V4:
- fix more issues with disabling eventdev:
* ensure dlb2 driver doesn't directly reference the static lib
* ensure l3fwd can be built using makefiles without eventdev
* remove dependency on eventdev for unit tests like pdump that don't actually need it.
This patch series I'm closing off, and merging in with my patch series to improve the unit test builds. With the unit test build set applied, most of the patches in this set just become single-line changes to the optional list, so just adding them to the end of the test cleanup set makes sense.
/Bruce