os.getenv('MESON_SUBDIR', '.'))
for path in sys.argv[1].split(','):
- for p in iglob(os.path.join(root, path)):
- if os.path.isdir(p):
- print(os.path.relpath(p))
+ if path:
+ for p in iglob(os.path.join(root, path)):
+ if os.path.isdir(p):
+ print(os.path.relpath(p))
# ['RTE_ARM64_MEMCPY_ALIGN_MASK', 0xF],
# ['RTE_ARM64_MEMCPY_STRICT_ALIGN', false],
- ['RTE_NET_FM10K', false],
- ['RTE_NET_AVP', false],
-
['RTE_SCHED_VECTOR', false],
['RTE_ARM_USE_WFE', false],
['RTE_ARCH_ARM64', true],
['RTE_MACHINE', '"octeontx2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_USE_C11_MEM_MODEL', true],
- ['RTE_EAL_IGB_UIO', false],
['RTE_MAX_LCORE', 36],
['RTE_MAX_NUMA_NODES', 1]
]
pmd_subdir_opt)
endif
+# init disable/enable driver lists that will be populated in different places
+disable_drivers = ''
+enable_drivers = ''
+
# set the machine type and cflags for it
if meson.is_cross_build()
machine = host_machine.cpu()
numa = false # set to false to force building for a non-NUMA system
# if not set or set to true, the build system will build for a NUMA
# system only if libnuma is installed
+
+ disable_drivers = 'bus/dpaa,crypto/*' # add disabled drivers
+ # valid values are dir/subdirs in the drivers directory
+ # wildcards are allowed
+
+ enable_drivers = 'common/*,bus/*' # build only these drivers
+ # valid values are dir/subdirs in the drivers directory
+ # wildcards are allowed
qat_compress_path = 'compress/qat'
qat_compress_relpath = '../../' + qat_compress_path
-if disabled_drivers.contains(qat_crypto_path)
+if disable_drivers.contains(qat_crypto_path)
qat_crypto = false
dpdk_drvs_disabled += qat_crypto_path
set_variable(qat_crypto_path.underscorify() + '_disable_reason',
'Explicitly disabled via build config')
endif
-if disabled_drivers.contains(qat_compress_path)
+if disable_drivers.contains(qat_compress_path)
qat_compress = false
dpdk_drvs_disabled += qat_compress_path
set_variable(qat_compress_path.underscorify() + '_disable_reason',
'baseband', # depends on common and bus.
]
-disabled_drivers = run_command(list_dir_globs, get_option('disable_drivers'),
- ).stdout().split()
+if meson.is_cross_build()
+ disable_drivers += ',' + meson.get_cross_property('disable_drivers', '')
+ enable_drivers += ',' + meson.get_cross_property('enable_drivers', '')
+endif
+
+# add cmdline disabled drivers and meson disabled drivers together
+disable_drivers += ',' + get_option('disable_drivers')
+disable_drivers = run_command(list_dir_globs, disable_drivers).stdout().split()
+
+# add cmdline enabled drivers and meson enabled drivers together
+enable_drivers = ',' + get_option('enable_drivers')
+enable_drivers = run_command(list_dir_globs, enable_drivers).stdout().split()
+if enable_drivers.length() == 0
+ enable_drivers = run_command(list_dir_globs, '*/*').stdout().split()
+endif
+
+# these drivers must always be enabled, otherwise the build breaks
+always_enable = ['bus/pci', 'bus/vdev']
+enable_drivers += always_enable
default_cflags = machine_args
default_cflags += ['-DALLOW_EXPERIMENTAL_API']
ext_deps = []
pkgconfig_extra_libs = []
- if disabled_drivers.contains(drv_path)
+ if not enable_drivers.contains(drv_path)
build = false
- reason = 'explicitly disabled via build config'
+ reason = 'not in enabled drivers build config'
+ elif disable_drivers.contains(drv_path)
+ if always_enable.contains(drv_path)
+ message('Driver @0@ cannot be disabled, not disabling.'.format(drv_path))
+ else
+ build = false
+ reason = 'explicitly disabled via build config'
+ endif
else
# pull in driver directory which should update all the local variables
subdir(drv_path)
description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
option('enable_docs', type: 'boolean', value: false,
description: 'build documentation')
+option('enable_drivers', type: 'string', value: '',
+ description: 'Comma-separated list of drivers to build. If unspecified, build all drivers.')
option('enable_driver_sdk', type: 'boolean', value: false,
description: 'Install headers to build drivers.')
option('enable_kmods', type: 'boolean', value: false,