examples: reduce indentation in build files
As with the lib and drivers directories, we can use "continue" keyword to reduce the indentation level of the majority of the foreach block. At the same time, we can also replace tab indentation with spaces. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
23bd8128d6
commit
cf59165dcb
@ -9,5 +9,5 @@
|
|||||||
deps += 'bbdev'
|
deps += 'bbdev'
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
deps += 'net_bond'
|
deps += 'net_bond'
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,7 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'commands.c', 'main.c', 'parse_obj_list.c'
|
'commands.c',
|
||||||
|
'main.c',
|
||||||
|
'parse_obj_list.c',
|
||||||
)
|
)
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
# require the power library
|
# require the power library
|
||||||
build = dpdk_conf.has('RTE_LIB_POWER')
|
build = dpdk_conf.has('RTE_LIB_POWER')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['distributor', 'power']
|
deps += ['distributor', 'power']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,17 +8,19 @@
|
|||||||
|
|
||||||
build = is_linux
|
build = is_linux
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sources = files('lib/rte_ethtool.c',
|
sources = files(
|
||||||
'ethtool-app/ethapp.c',
|
'lib/rte_ethtool.c',
|
||||||
'ethtool-app/main.c')
|
'ethtool-app/ethapp.c',
|
||||||
|
'ethtool-app/main.c',
|
||||||
|
)
|
||||||
includes = include_directories('lib', 'ethtool-app')
|
includes = include_directories('lib', 'ethtool-app')
|
||||||
|
|
||||||
deps += 'bus_pci'
|
deps += 'bus_pci'
|
||||||
if dpdk_conf.has('RTE_NET_IXGBE')
|
if dpdk_conf.has('RTE_NET_IXGBE')
|
||||||
deps += 'net_ixgbe'
|
deps += 'net_ixgbe'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += 'eventdev'
|
deps += 'eventdev'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c',
|
'main.c',
|
||||||
'pipeline_worker_generic.c',
|
'pipeline_worker_generic.c',
|
||||||
'pipeline_worker_tx.c'
|
'pipeline_worker_tx.c',
|
||||||
)
|
)
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
deps += ['cryptodev']
|
deps += ['cryptodev']
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'fips_validation_aes.c',
|
'fips_validation_aes.c',
|
||||||
'fips_validation.c',
|
'fips_validation.c',
|
||||||
'fips_validation_hmac.c',
|
'fips_validation_hmac.c',
|
||||||
'fips_validation_tdes.c',
|
'fips_validation_tdes.c',
|
||||||
'fips_validation_gcm.c',
|
'fips_validation_gcm.c',
|
||||||
'fips_validation_cmac.c',
|
'fips_validation_cmac.c',
|
||||||
'fips_validation_ccm.c',
|
'fips_validation_ccm.c',
|
||||||
'fips_validation_sha.c',
|
'fips_validation_sha.c',
|
||||||
'fips_validation_xts.c',
|
'fips_validation_xts.c',
|
||||||
'fips_dev_self_test.c',
|
'fips_dev_self_test.c',
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
deps += 'flow_classify'
|
deps += 'flow_classify'
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'flow_classify.c'
|
'flow_classify.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c',
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
build = dpdk_conf.has('RTE_RAW_IOAT')
|
build = dpdk_conf.has('RTE_RAW_IOAT')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['raw_ioat']
|
deps += ['raw_ioat']
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
'ioatfwd.c'
|
'ioatfwd.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['ip_frag', 'lpm']
|
deps += ['ip_frag', 'lpm']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,24 +8,24 @@
|
|||||||
|
|
||||||
build = cc.has_header('sys/epoll.h')
|
build = cc.has_header('sys/epoll.h')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['pipeline', 'bus_pci']
|
deps += ['pipeline', 'bus_pci']
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'action.c',
|
'action.c',
|
||||||
'cli.c',
|
'cli.c',
|
||||||
'conn.c',
|
'conn.c',
|
||||||
'kni.c',
|
'cryptodev.c',
|
||||||
'link.c',
|
'kni.c',
|
||||||
'main.c',
|
'link.c',
|
||||||
'mempool.c',
|
'main.c',
|
||||||
'parser.c',
|
'mempool.c',
|
||||||
'pipeline.c',
|
'parser.c',
|
||||||
'swq.c',
|
'pipeline.c',
|
||||||
'tap.c',
|
'swq.c',
|
||||||
'thread.c',
|
'tap.c',
|
||||||
'tmgr.c',
|
'thread.c',
|
||||||
'cryptodev.c'
|
'tmgr.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['lpm', 'ip_frag']
|
deps += ['lpm', 'ip_frag']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,17 +9,17 @@
|
|||||||
deps += ['security', 'lpm', 'acl', 'hash', 'ip_frag', 'ipsec', 'eventdev']
|
deps += ['security', 'lpm', 'acl', 'hash', 'ip_frag', 'ipsec', 'eventdev']
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'esp.c',
|
'esp.c',
|
||||||
'event_helper.c',
|
'event_helper.c',
|
||||||
'flow.c',
|
'flow.c',
|
||||||
'ipsec.c',
|
'ipsec.c',
|
||||||
'ipsec_process.c',
|
'ipsec_process.c',
|
||||||
'ipsec-secgw.c',
|
'ipsec-secgw.c',
|
||||||
'ipsec_worker.c',
|
'ipsec_worker.c',
|
||||||
'parser.c',
|
'parser.c',
|
||||||
'rt.c',
|
'rt.c',
|
||||||
'sa.c',
|
'sa.c',
|
||||||
'sad.c',
|
'sad.c',
|
||||||
'sp4.c',
|
'sp4.c',
|
||||||
'sp6.c'
|
'sp6.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += 'hash'
|
deps += 'hash'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
# this app can be built if-and-only-if KNI library is buildable
|
# this app can be built if-and-only-if KNI library is buildable
|
||||||
build = dpdk_conf.has('RTE_LIB_KNI')
|
build = dpdk_conf.has('RTE_LIB_KNI')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['kni', 'bus_pci']
|
deps += ['kni', 'bus_pci']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
|
@ -9,12 +9,13 @@
|
|||||||
pqos = cc.find_library('pqos', required: false)
|
pqos = cc.find_library('pqos', required: false)
|
||||||
build = pqos.found()
|
build = pqos.found()
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ext_deps += pqos
|
ext_deps += pqos
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
|
cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
|
||||||
sources = files(
|
sources = files(
|
||||||
'cat.c', 'l2fwd-cat.c'
|
'cat.c',
|
||||||
|
'l2fwd-cat.c',
|
||||||
)
|
)
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
deps += 'cryptodev'
|
deps += 'cryptodev'
|
||||||
if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
|
if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')
|
||||||
deps += 'crypto_scheduler'
|
deps += 'crypto_scheduler'
|
||||||
endif
|
endif
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += 'eventdev'
|
deps += 'eventdev'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c',
|
'main.c',
|
||||||
'l2fwd_poll.c',
|
'l2fwd_common.c',
|
||||||
'l2fwd_common.c',
|
'l2fwd_event.c',
|
||||||
'l2fwd_event.c',
|
'l2fwd_event_generic.c',
|
||||||
'l2fwd_event_internal_port.c',
|
'l2fwd_event_internal_port.c',
|
||||||
'l2fwd_event_generic.c'
|
'l2fwd_poll.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['jobstats', 'timer']
|
deps += ['jobstats', 'timer']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,12 +9,13 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
librt = cc.find_library('rt', required: false)
|
librt = cc.find_library('rt', required: false)
|
||||||
if not librt.found()
|
if not librt.found()
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ext_deps += librt
|
ext_deps += librt
|
||||||
deps += 'timer'
|
deps += 'timer'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c', 'shm.c'
|
'main.c',
|
||||||
|
'shm.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
# Enable experimental API flag as l2fwd uses rte_ethdev_set_ptype API
|
# Enable experimental API flag as l2fwd uses rte_ethdev_set_ptype API
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['acl', 'lpm', 'hash']
|
deps += ['acl', 'lpm', 'hash']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
|
|
||||||
deps += ['graph', 'eal', 'lpm', 'ethdev', 'node' ]
|
deps += ['graph', 'eal', 'lpm', 'ethdev', 'node' ]
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
|
@ -14,5 +14,6 @@ endif
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['power', 'timer', 'lpm', 'hash', 'metrics', 'telemetry']
|
deps += ['power', 'timer', 'lpm', 'hash', 'metrics', 'telemetry']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c', 'perf_core.c'
|
'main.c',
|
||||||
|
'perf_core.c',
|
||||||
)
|
)
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['hash', 'lpm', 'fib', 'eventdev']
|
deps += ['hash', 'lpm', 'fib', 'eventdev']
|
||||||
sources = files(
|
sources = files(
|
||||||
'l3fwd_em.c', 'l3fwd_lpm.c', 'l3fwd_fib.c', 'l3fwd_event.c',
|
'l3fwd_em.c',
|
||||||
'l3fwd_event_internal_port.c', 'l3fwd_event_generic.c', 'main.c'
|
'l3fwd_event.c',
|
||||||
|
'l3fwd_event_internal_port.c',
|
||||||
|
'l3fwd_event_generic.c',
|
||||||
|
'l3fwd_fib.c',
|
||||||
|
'l3fwd_lpm.c',
|
||||||
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -3,109 +3,130 @@
|
|||||||
|
|
||||||
link_whole_libs = []
|
link_whole_libs = []
|
||||||
if get_option('default_library') == 'static'
|
if get_option('default_library') == 'static'
|
||||||
link_whole_libs = dpdk_static_libraries + dpdk_drivers
|
link_whole_libs = dpdk_static_libraries + dpdk_drivers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# list of all example apps. Keep 1-3 per line, in alphabetical order.
|
# list of all example apps. Keep 1-3 per line, in alphabetical order.
|
||||||
all_examples = [
|
all_examples = [
|
||||||
'bbdev_app', 'bond',
|
'bbdev_app',
|
||||||
'cmdline',
|
'bond',
|
||||||
'distributor', 'ethtool',
|
'cmdline',
|
||||||
'eventdev_pipeline',
|
'distributor',
|
||||||
'fips_validation', 'flow_classify',
|
'ethtool',
|
||||||
'flow_filtering', 'helloworld',
|
'eventdev_pipeline',
|
||||||
'ioat',
|
'fips_validation',
|
||||||
'ip_fragmentation', 'ip_pipeline',
|
'flow_classify',
|
||||||
'ip_reassembly', 'ipsec-secgw',
|
'flow_filtering',
|
||||||
'ipv4_multicast', 'kni',
|
'helloworld',
|
||||||
'l2fwd', 'l2fwd-cat', 'l2fwd-event',
|
'ioat',
|
||||||
'l2fwd-crypto', 'l2fwd-jobstats',
|
'ip_fragmentation',
|
||||||
'l2fwd-keepalive', 'l3fwd',
|
'ip_pipeline',
|
||||||
'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph',
|
'ip_reassembly',
|
||||||
'link_status_interrupt',
|
'ipsec-secgw',
|
||||||
'multi_process/client_server_mp/mp_client',
|
'ipv4_multicast',
|
||||||
'multi_process/client_server_mp/mp_server',
|
'kni',
|
||||||
'multi_process/hotplug_mp',
|
'l2fwd',
|
||||||
'multi_process/simple_mp',
|
'l2fwd-cat',
|
||||||
'multi_process/symmetric_mp',
|
'l2fwd-crypto',
|
||||||
'ntb', 'packet_ordering',
|
'l2fwd-event',
|
||||||
'performance-thread/l3fwd-thread',
|
'l2fwd-jobstats',
|
||||||
'performance-thread/pthread_shim',
|
'l2fwd-keepalive',
|
||||||
'pipeline',
|
'l3fwd',
|
||||||
'ptpclient',
|
'l3fwd-acl',
|
||||||
'qos_meter', 'qos_sched',
|
'l3fwd-graph',
|
||||||
'rxtx_callbacks',
|
'l3fwd-power',
|
||||||
'server_node_efd/node',
|
'link_status_interrupt',
|
||||||
'server_node_efd/server',
|
'multi_process/client_server_mp/mp_client',
|
||||||
'service_cores',
|
'multi_process/client_server_mp/mp_server',
|
||||||
'skeleton',
|
'multi_process/hotplug_mp',
|
||||||
'timer', 'vdpa',
|
'multi_process/simple_mp',
|
||||||
'vhost', 'vhost_crypto',
|
'multi_process/symmetric_mp',
|
||||||
'vhost_blk', 'vm_power_manager',
|
'ntb',
|
||||||
'vm_power_manager/guest_cli',
|
'packet_ordering',
|
||||||
'vmdq', 'vmdq_dcb',
|
'performance-thread/l3fwd-thread',
|
||||||
|
'performance-thread/pthread_shim',
|
||||||
|
'pipeline',
|
||||||
|
'ptpclient',
|
||||||
|
'qos_meter',
|
||||||
|
'qos_sched',
|
||||||
|
'rxtx_callbacks',
|
||||||
|
'server_node_efd/node',
|
||||||
|
'server_node_efd/server',
|
||||||
|
'service_cores',
|
||||||
|
'skeleton',
|
||||||
|
'timer',
|
||||||
|
'vdpa',
|
||||||
|
'vhost',
|
||||||
|
'vhost_blk',
|
||||||
|
'vhost_crypto',
|
||||||
|
'vm_power_manager',
|
||||||
|
'vm_power_manager/guest_cli',
|
||||||
|
'vmdq',
|
||||||
|
'vmdq_dcb',
|
||||||
]
|
]
|
||||||
|
|
||||||
# on install, skip copying all meson.build files
|
# on install, skip copying all meson.build files
|
||||||
ex_file_excludes = ['meson.build']
|
ex_file_excludes = ['meson.build']
|
||||||
foreach ex:all_examples
|
foreach ex:all_examples
|
||||||
ex_file_excludes += [ex + '/meson.build']
|
ex_file_excludes += [ex + '/meson.build']
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if get_option('examples') == ''
|
if get_option('examples') == ''
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('examples').to_lower() == 'all'
|
if get_option('examples').to_lower() == 'all'
|
||||||
examples = all_examples
|
examples = all_examples
|
||||||
allow_skips = true # don't flag an error if we can't build an app
|
allow_skips = true # don't flag an error if we can't build an app
|
||||||
else
|
else
|
||||||
examples = get_option('examples').split(',')
|
examples = get_option('examples').split(',')
|
||||||
allow_skips = false # error out if we can't build a requested app
|
allow_skips = false # error out if we can't build a requested app
|
||||||
endif
|
endif
|
||||||
default_cflags = machine_args
|
default_cflags = machine_args
|
||||||
if cc.has_argument('-Wno-format-truncation')
|
if cc.has_argument('-Wno-format-truncation')
|
||||||
default_cflags += '-Wno-format-truncation'
|
default_cflags += '-Wno-format-truncation'
|
||||||
endif
|
endif
|
||||||
default_ldflags = dpdk_extra_ldflags
|
default_ldflags = dpdk_extra_ldflags
|
||||||
if get_option('default_library') == 'static' and not is_windows
|
if get_option('default_library') == 'static' and not is_windows
|
||||||
default_ldflags += ['-Wl,--export-dynamic']
|
default_ldflags += ['-Wl,--export-dynamic']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach example: examples
|
foreach example: examples
|
||||||
name = example.split('/')[-1]
|
name = example.split('/')[-1]
|
||||||
build = true
|
build = true
|
||||||
sources = []
|
sources = []
|
||||||
allow_experimental_apis = false
|
allow_experimental_apis = false
|
||||||
cflags = default_cflags
|
cflags = default_cflags
|
||||||
ldflags = default_ldflags
|
ldflags = default_ldflags
|
||||||
|
|
||||||
ext_deps = []
|
ext_deps = []
|
||||||
includes = [include_directories(example)]
|
includes = [include_directories(example)]
|
||||||
deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
|
deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
|
||||||
subdir(example)
|
subdir(example)
|
||||||
|
|
||||||
if build
|
if not build
|
||||||
dep_objs = ext_deps
|
if not allow_skips
|
||||||
foreach d:deps
|
error('Cannot build requested example "' + name + '"')
|
||||||
var_name = get_option('default_library') + '_rte_' + d
|
endif
|
||||||
if not is_variable(var_name)
|
message('Skipping example "' + name + '"')
|
||||||
error('Missing dependency "@0@" for example "@1@"'.format(d, name))
|
continue
|
||||||
endif
|
endif
|
||||||
dep_objs += [get_variable(var_name)]
|
|
||||||
endforeach
|
dep_objs = ext_deps
|
||||||
if allow_experimental_apis
|
foreach d:deps
|
||||||
cflags += '-DALLOW_EXPERIMENTAL_API'
|
var_name = get_option('default_library') + '_rte_' + d
|
||||||
endif
|
if not is_variable(var_name)
|
||||||
executable('dpdk-' + name, sources,
|
error('Missing dependency "@0@" for example "@1@"'.format(d, name))
|
||||||
include_directories: includes,
|
endif
|
||||||
link_whole: link_whole_libs,
|
dep_objs += [get_variable(var_name)]
|
||||||
link_args: ldflags,
|
endforeach
|
||||||
c_args: cflags,
|
if allow_experimental_apis
|
||||||
dependencies: dep_objs)
|
cflags += '-DALLOW_EXPERIMENTAL_API'
|
||||||
elif not allow_skips
|
endif
|
||||||
error('Cannot build requested example "' + name + '"')
|
executable('dpdk-' + name, sources,
|
||||||
else
|
include_directories: includes,
|
||||||
message('Skipping example "' + name + '"')
|
link_whole: link_whole_libs,
|
||||||
endif
|
link_args: ldflags,
|
||||||
|
c_args: cflags,
|
||||||
|
dependencies: dep_objs)
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -10,5 +10,5 @@ includes += include_directories('../shared')
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'client.c'
|
'client.c'
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,5 @@ includes += include_directories('../shared')
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'args.c', 'init.c', 'main.c'
|
'args.c', 'init.c', 'main.c'
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'commands.c', 'main.c'
|
'commands.c', 'main.c'
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'mp_commands.c', 'main.c'
|
'mp_commands.c', 'main.c'
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c'
|
||||||
)
|
)
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
if not is_linux
|
if not is_linux
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += 'rawdev'
|
deps += 'rawdev'
|
||||||
cflags += ['-D_FILE_OFFSET_BITS=64']
|
cflags += ['-D_FILE_OFFSET_BITS=64']
|
||||||
sources = files(
|
sources = files(
|
||||||
'ntb_fwd.c'
|
'ntb_fwd.c',
|
||||||
)
|
)
|
||||||
if dpdk_conf.has('RTE_RAW_NTB')
|
if dpdk_conf.has('RTE_RAW_NTB')
|
||||||
deps += 'raw_ntb'
|
deps += 'raw_ntb'
|
||||||
endif
|
endif
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += 'reorder'
|
deps += 'reorder'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
build = dpdk_conf.has('RTE_ARCH_X86_64')
|
build = dpdk_conf.has('RTE_ARCH_X86_64')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['timer', 'lpm']
|
deps += ['timer', 'lpm']
|
||||||
@ -16,17 +16,17 @@ allow_experimental_apis = true
|
|||||||
|
|
||||||
# get the performance thread (pt) architecture subdir
|
# get the performance thread (pt) architecture subdir
|
||||||
if dpdk_conf.has('RTE_ARCH_ARM64')
|
if dpdk_conf.has('RTE_ARCH_ARM64')
|
||||||
pt_arch_dir = '../common/arch/arm64'
|
pt_arch_dir = '../common/arch/arm64'
|
||||||
else
|
else
|
||||||
pt_arch_dir = '../common/arch/x86'
|
pt_arch_dir = '../common/arch/x86'
|
||||||
endif
|
endif
|
||||||
sources += files('main.c',
|
sources += files('main.c',
|
||||||
'../common/lthread.c',
|
'../common/lthread.c',
|
||||||
'../common/lthread_cond.c',
|
'../common/lthread_cond.c',
|
||||||
'../common/lthread_diag.c',
|
'../common/lthread_diag.c',
|
||||||
'../common/lthread_mutex.c',
|
'../common/lthread_mutex.c',
|
||||||
'../common/lthread_sched.c',
|
'../common/lthread_sched.c',
|
||||||
'../common/lthread_tls.c',
|
'../common/lthread_tls.c',
|
||||||
pt_arch_dir + '/ctx.c')
|
pt_arch_dir + '/ctx.c')
|
||||||
|
|
||||||
includes += include_directories('../common', pt_arch_dir)
|
includes += include_directories('../common', pt_arch_dir)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64')
|
build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['timer']
|
deps += ['timer']
|
||||||
@ -16,18 +16,18 @@ allow_experimental_apis = true
|
|||||||
|
|
||||||
# get the performance thread (pt) architecture subdir
|
# get the performance thread (pt) architecture subdir
|
||||||
if dpdk_conf.has('RTE_ARCH_ARM64')
|
if dpdk_conf.has('RTE_ARCH_ARM64')
|
||||||
pt_arch_dir = '../common/arch/arm64'
|
pt_arch_dir = '../common/arch/arm64'
|
||||||
else
|
else
|
||||||
pt_arch_dir = '../common/arch/x86'
|
pt_arch_dir = '../common/arch/x86'
|
||||||
endif
|
endif
|
||||||
sources += files('main.c',
|
sources += files('main.c',
|
||||||
'pthread_shim.c',
|
'pthread_shim.c',
|
||||||
'../common/lthread.c',
|
'../common/lthread.c',
|
||||||
'../common/lthread_cond.c',
|
'../common/lthread_cond.c',
|
||||||
'../common/lthread_diag.c',
|
'../common/lthread_diag.c',
|
||||||
'../common/lthread_mutex.c',
|
'../common/lthread_mutex.c',
|
||||||
'../common/lthread_sched.c',
|
'../common/lthread_sched.c',
|
||||||
'../common/lthread_tls.c',
|
'../common/lthread_tls.c',
|
||||||
pt_arch_dir + '/ctx.c')
|
pt_arch_dir + '/ctx.c')
|
||||||
|
|
||||||
includes += include_directories('../common', pt_arch_dir)
|
includes += include_directories('../common', pt_arch_dir)
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
|
|
||||||
build = cc.has_header('sys/epoll.h')
|
build = cc.has_header('sys/epoll.h')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['pipeline', 'bus_pci']
|
deps += ['pipeline', 'bus_pci']
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'cli.c',
|
'cli.c',
|
||||||
'conn.c',
|
'conn.c',
|
||||||
'main.c',
|
'main.c',
|
||||||
'obj.c',
|
'obj.c',
|
||||||
'thread.c',
|
'thread.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'ptpclient.c'
|
'ptpclient.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,6 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += 'meter'
|
deps += 'meter'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c', 'rte_policer.c'
|
'main.c',
|
||||||
|
'rte_policer.c',
|
||||||
)
|
)
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['sched', 'cfgfile']
|
deps += ['sched', 'cfgfile']
|
||||||
sources = files(
|
sources = files(
|
||||||
'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
|
'app_thread.c',
|
||||||
'init.c', 'main.c', 'stats.c'
|
'args.c',
|
||||||
|
'cfg_file.c',
|
||||||
|
'cmdline.c',
|
||||||
|
'init.c',
|
||||||
|
'main.c',
|
||||||
|
'stats.c',
|
||||||
)
|
)
|
||||||
|
@ -10,5 +10,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'basicfwd.c'
|
'basicfwd.c',
|
||||||
)
|
)
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += 'timer'
|
deps += 'timer'
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
# DPDK instance, use 'make'
|
# DPDK instance, use 'make'
|
||||||
|
|
||||||
if not is_linux
|
if not is_linux
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += 'vhost'
|
deps += 'vhost'
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -7,17 +7,18 @@
|
|||||||
# DPDK instance, use 'make'
|
# DPDK instance, use 'make'
|
||||||
|
|
||||||
if not is_linux
|
if not is_linux
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += 'vhost'
|
deps += 'vhost'
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c', 'virtio_net.c'
|
'main.c',
|
||||||
|
'virtio_net.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
if dpdk_conf.has('RTE_RAW_IOAT')
|
if dpdk_conf.has('RTE_RAW_IOAT')
|
||||||
deps += 'raw_ioat'
|
deps += 'raw_ioat'
|
||||||
sources += files('ioat.c')
|
sources += files('ioat.c')
|
||||||
endif
|
endif
|
||||||
|
@ -7,17 +7,19 @@
|
|||||||
# DPDK instance, use 'make'
|
# DPDK instance, use 'make'
|
||||||
|
|
||||||
if not is_linux
|
if not is_linux
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not cc.has_header('linux/virtio_blk.h')
|
if not cc.has_header('linux/virtio_blk.h')
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += 'vhost'
|
deps += 'vhost'
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'blk.c', 'vhost_blk.c', 'vhost_blk_compat.c'
|
'blk.c',
|
||||||
|
'vhost_blk.c',
|
||||||
|
'vhost_blk_compat.c',
|
||||||
)
|
)
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
build = dpdk_conf.has('RTE_LIB_VHOST')
|
build = dpdk_conf.has('RTE_LIB_VHOST')
|
||||||
if not build
|
if not build
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
deps += ['vhost', 'cryptodev']
|
deps += ['vhost', 'cryptodev']
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,9 @@ endif
|
|||||||
deps += ['power']
|
deps += ['power']
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c', 'parse.c', 'vm_power_cli_guest.c'
|
'main.c',
|
||||||
|
'parse.c',
|
||||||
|
'vm_power_cli_guest.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
|
@ -7,34 +7,39 @@
|
|||||||
# DPDK instance, use 'make'
|
# DPDK instance, use 'make'
|
||||||
|
|
||||||
if not dpdk_conf.has('RTE_LIB_POWER')
|
if not dpdk_conf.has('RTE_LIB_POWER')
|
||||||
build = false
|
build = false
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps += ['power']
|
deps += ['power']
|
||||||
|
|
||||||
if dpdk_conf.has('RTE_NET_BNXT')
|
if dpdk_conf.has('RTE_NET_BNXT')
|
||||||
deps += ['net_bnxt']
|
deps += ['net_bnxt']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if dpdk_conf.has('RTE_NET_I40E')
|
if dpdk_conf.has('RTE_NET_I40E')
|
||||||
deps += ['net_i40e']
|
deps += ['net_i40e']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if dpdk_conf.has('RTE_NET_IXGBE')
|
if dpdk_conf.has('RTE_NET_IXGBE')
|
||||||
deps += ['net_ixgbe']
|
deps += ['net_ixgbe']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
|
'channel_manager.c',
|
||||||
|
'channel_monitor.c',
|
||||||
|
'main.c',
|
||||||
|
'parse.c',
|
||||||
|
'power_manager.c',
|
||||||
|
'vm_power_cli.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
# If we're on X86, pull in the x86 code for the branch monitor algo.
|
# If we're on X86, pull in the x86 code for the branch monitor algo.
|
||||||
if dpdk_conf.has('RTE_ARCH_X86_64')
|
if dpdk_conf.has('RTE_ARCH_X86_64')
|
||||||
sources += files('oob_monitor_x86.c')
|
sources += files('oob_monitor_x86.c')
|
||||||
else
|
else
|
||||||
sources += files('oob_monitor_nop.c')
|
sources += files('oob_monitor_nop.c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
opt_dep = cc.find_library('virt', required : false)
|
opt_dep = cc.find_library('virt', required : false)
|
||||||
@ -43,6 +48,6 @@ ext_deps += opt_dep
|
|||||||
|
|
||||||
opt_dep = dependency('jansson', required : false, method: 'pkg-config')
|
opt_dep = dependency('jansson', required : false, method: 'pkg-config')
|
||||||
if opt_dep.found()
|
if opt_dep.found()
|
||||||
ext_deps += opt_dep
|
ext_deps += opt_dep
|
||||||
cflags += '-DUSE_JANSSON'
|
cflags += '-DUSE_JANSSON'
|
||||||
endif
|
endif
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
allow_experimental_apis = true
|
allow_experimental_apis = true
|
||||||
sources = files(
|
sources = files(
|
||||||
'main.c'
|
'main.c',
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user