build: change indentation in infrastructure files

Switch from using tabs to 4 spaces for meson.build indentation, for the
basic infrastructure and tooling files, as well as doc and kernel
directories.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Bruce Richardson 2021-04-20 11:22:23 +01:00 committed by Thomas Monjalon
parent cf59165dcb
commit 8dcb898c65
16 changed files with 786 additions and 795 deletions

View File

@ -2,19 +2,19 @@
# Copyright(c) 2021 Intel Corporation
if not get_option('check_includes')
build = false
subdir_done()
build = false
subdir_done()
endif
if is_windows
# for windows, the shebang line in the script won't work.
error('option "check_includes" is not supported on windows')
# for windows, the shebang line in the script won't work.
error('option "check_includes" is not supported on windows')
endif
gen_c_file_for_header = find_program('gen_c_file_for_header.py')
gen_c_files = generator(gen_c_file_for_header,
output: '@BASENAME@.c',
arguments: ['@INPUT@', '@OUTPUT@'])
output: '@BASENAME@.c',
arguments: ['@INPUT@', '@OUTPUT@'])
cflags = machine_args
cflags += '-DALLOW_EXPERIMENTAL_API'
@ -24,12 +24,12 @@ sources += gen_c_files.process(dpdk_chkinc_headers)
deps = []
foreach l:enabled_libs
deps += get_variable('static_rte_' + l)
deps += get_variable('static_rte_' + l)
endforeach
executable('chkincs', sources,
c_args: cflags,
include_directories: includes,
dependencies: deps,
link_whole: dpdk_static_libraries + dpdk_drivers,
install: false)
c_args: cflags,
include_directories: includes,
dependencies: deps,
link_whole: dpdk_static_libraries + dpdk_drivers,
install: false)

View File

@ -10,9 +10,9 @@ binutils_avx512_check = find_program('binutils-avx512-check.sh')
# set up map-to-win script using python, either built-in or external
python3 = import('python').find_installation(required: false)
if python3.found()
py3 = [python3]
py3 = [python3]
else
py3 = ['meson', 'runpython']
py3 = ['meson', 'runpython']
endif
map_to_win_cmd = py3 + files('map_to_win.py')
sphinx_wrapper = py3 + files('call-sphinx-build.py')
@ -21,27 +21,27 @@ sphinx_wrapper = py3 + files('call-sphinx-build.py')
pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()]
pmdinfogen = py3 + files('pmdinfogen.py')
if host_machine.system() == 'windows'
if cc.get_id() == 'gcc'
pmdinfo += 'ar'
else
pmdinfo += 'llvm-ar'
endif
pmdinfogen += 'coff'
if cc.get_id() == 'gcc'
pmdinfo += 'ar'
else
pmdinfo += 'llvm-ar'
endif
pmdinfogen += 'coff'
else
pmdinfo += 'ar'
pmdinfogen += 'elf'
pmdinfo += 'ar'
pmdinfogen += 'elf'
endif
# TODO: starting from Meson 0.51.0 use
# python3 = import('python').find_installation('python',
# modules : python3_required_modules)
# python3 = import('python').find_installation('python',
# modules : python3_required_modules)
python3_required_modules = []
if host_machine.system() != 'windows'
python3_required_modules = ['elftools']
python3_required_modules = ['elftools']
endif
foreach module : python3_required_modules
script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
if run_command(py3, '-c', script.format(module)).returncode() != 0
error('missing python module: @0@'.format(module))
endif
script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
if run_command(py3, '-c', script.format(module)).returncode() != 0
error('missing python module: @0@'.format(module))
endif
endforeach

View File

@ -4,7 +4,7 @@
pkg = import('pkgconfig')
pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args
if is_freebsd
pkg_extra_cflags += ['-D__BSD_VISIBLE']
pkg_extra_cflags += ['-D__BSD_VISIBLE']
endif
# When calling pkg-config --static --libs, pkg-config will always output the
@ -28,30 +28,30 @@ endif
pkg.generate(name: 'dpdk-libs',
filebase: 'libdpdk-libs',
description: '''Internal-only DPDK pkgconfig file. Not for direct use.
filebase: 'libdpdk-libs',
description: '''Internal-only DPDK pkgconfig file. Not for direct use.
Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
version: meson.project_version(),
subdirs: [get_option('include_subdir_arch'), '.'],
extra_cflags: pkg_extra_cflags,
libraries: ['-Wl,--as-needed'] + dpdk_libraries,
libraries_private: dpdk_extra_ldflags)
version: meson.project_version(),
subdirs: [get_option('include_subdir_arch'), '.'],
extra_cflags: pkg_extra_cflags,
libraries: ['-Wl,--as-needed'] + dpdk_libraries,
libraries_private: dpdk_extra_ldflags)
platform_flags = []
if not is_windows
platform_flags += ['-Wl,--export-dynamic'] # ELF only
platform_flags += ['-Wl,--export-dynamic'] # ELF only
endif
pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
filebase: 'libdpdk',
version: meson.project_version(),
description: '''The Data Plane Development Kit (DPDK).
filebase: 'libdpdk',
version: meson.project_version(),
description: '''The Data Plane Development Kit (DPDK).
Note that CFLAGS might contain an -march flag higher than typical baseline.
This is required for a number of static inline functions in the public headers.''',
requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs
# if libbsd is not enabled, then this is blank
libraries_private: ['-Wl,--whole-archive'] +
dpdk_drivers + dpdk_static_libraries +
['-Wl,--no-whole-archive'] + platform_flags
requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs
# if libbsd is not enabled, then this is blank
libraries_private: ['-Wl,--whole-archive'] +
dpdk_drivers + dpdk_static_libraries +
['-Wl,--no-whole-archive'] + platform_flags
)
# For static linking with dependencies as shared libraries,

View File

@ -5,22 +5,22 @@
# common flags to all aarch64 builds, with lowest priority
flags_common = [
# Accelerate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest)
# to determine the best threshold in code. Refer to notes in source file
# (lib/librte_eal/arm/include/rte_memcpy_64.h) for more info.
['RTE_ARCH_ARM64_MEMCPY', false],
# ['RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD', 2048],
# ['RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD', 512],
# Leave below RTE_ARM64_MEMCPY_xxx options commented out,
# unless there are strong reasons.
# ['RTE_ARM64_MEMCPY_SKIP_GCC_VER_CHECK', false],
# ['RTE_ARM64_MEMCPY_ALIGN_MASK', 0xF],
# ['RTE_ARM64_MEMCPY_STRICT_ALIGN', false],
# Accelerate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest)
# to determine the best threshold in code. Refer to notes in source file
# (lib/librte_eal/arm/include/rte_memcpy_64.h) for more info.
['RTE_ARCH_ARM64_MEMCPY', false],
# ['RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD', 2048],
# ['RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD', 512],
# Leave below RTE_ARM64_MEMCPY_xxx options commented out,
# unless there are strong reasons.
# ['RTE_ARM64_MEMCPY_SKIP_GCC_VER_CHECK', false],
# ['RTE_ARM64_MEMCPY_ALIGN_MASK', 0xF],
# ['RTE_ARM64_MEMCPY_STRICT_ALIGN', false],
['RTE_SCHED_VECTOR', false],
['RTE_ARM_USE_WFE', false],
['RTE_ARCH_ARM64', true],
['RTE_CACHE_LINE_SIZE', 128]
['RTE_SCHED_VECTOR', false],
['RTE_ARM_USE_WFE', false],
['RTE_ARCH_ARM64', true],
['RTE_CACHE_LINE_SIZE', 128]
]
## Part numbers are specific to Arm implementers
@ -29,439 +29,432 @@ flags_common = [
# part number specific aarch64 flags have higher priority
# (will overwrite both common and implementer specific flags)
implementer_generic = {
'description': 'Generic armv8',
'flags': [
['RTE_MACHINE', '"armv8a"'],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_MAX_LCORE', 256],
['RTE_MAX_NUMA_NODES', 4]
],
'part_number_config': {
'generic': {'machine_args': ['-march=armv8-a+crc',
'-moutline-atomics']}
}
'description': 'Generic armv8',
'flags': [
['RTE_MACHINE', '"armv8a"'],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_MAX_LCORE', 256],
['RTE_MAX_NUMA_NODES', 4]
],
'part_number_config': {
'generic': {'machine_args': ['-march=armv8-a+crc', '-moutline-atomics']}
}
}
part_number_config_arm = {
'0xd03': {'machine_args': ['-mcpu=cortex-a53']},
'0xd04': {'machine_args': ['-mcpu=cortex-a35']},
'0xd07': {'machine_args': ['-mcpu=cortex-a57']},
'0xd08': {'machine_args': ['-mcpu=cortex-a72']},
'0xd09': {'machine_args': ['-mcpu=cortex-a73']},
'0xd0a': {'machine_args': ['-mcpu=cortex-a75']},
'0xd0b': {'machine_args': ['-mcpu=cortex-a76']},
'0xd0c': {
'machine_args': ['-march=armv8.2-a+crypto',
'-mcpu=neoverse-n1'],
'flags': [
['RTE_MACHINE', '"neoverse-n1"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_MEM_MB', 1048576],
['RTE_MAX_LCORE', 160],
['RTE_MAX_NUMA_NODES', 2]
]
},
'0xd49': {
'machine_args': ['-march=armv8.5-a+crypto+sve2'],
'flags': [
['RTE_MACHINE', '"neoverse-n2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_LCORE', 64],
['RTE_MAX_NUMA_NODES', 1]
]
}
'0xd03': {'machine_args': ['-mcpu=cortex-a53']},
'0xd04': {'machine_args': ['-mcpu=cortex-a35']},
'0xd07': {'machine_args': ['-mcpu=cortex-a57']},
'0xd08': {'machine_args': ['-mcpu=cortex-a72']},
'0xd09': {'machine_args': ['-mcpu=cortex-a73']},
'0xd0a': {'machine_args': ['-mcpu=cortex-a75']},
'0xd0b': {'machine_args': ['-mcpu=cortex-a76']},
'0xd0c': {
'machine_args': ['-march=armv8.2-a+crypto', '-mcpu=neoverse-n1'],
'flags': [
['RTE_MACHINE', '"neoverse-n1"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_MEM_MB', 1048576],
['RTE_MAX_LCORE', 160],
['RTE_MAX_NUMA_NODES', 2]
]
},
'0xd49': {
'machine_args': ['-march=armv8.5-a+crypto+sve2'],
'flags': [
['RTE_MACHINE', '"neoverse-n2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_LCORE', 64],
['RTE_MAX_NUMA_NODES', 1]
]
}
}
implementer_arm = {
'description': 'Arm',
'flags': [
['RTE_MACHINE', '"armv8a"'],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 64],
['RTE_MAX_NUMA_NODES', 4]
],
'part_number_config': part_number_config_arm
'description': 'Arm',
'flags': [
['RTE_MACHINE', '"armv8a"'],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 64],
['RTE_MAX_NUMA_NODES', 4]
],
'part_number_config': part_number_config_arm
}
flags_part_number_thunderx = [
['RTE_MACHINE', '"thunderx"'],
['RTE_USE_C11_MEM_MODEL', false]
['RTE_MACHINE', '"thunderx"'],
['RTE_USE_C11_MEM_MODEL', false]
]
implementer_cavium = {
'description': 'Cavium',
'flags': [
['RTE_MAX_VFIO_GROUPS', 128],
['RTE_MAX_LCORE', 96],
['RTE_MAX_NUMA_NODES', 2]
],
'part_number_config': {
'0xa1': {
'machine_args': ['-mcpu=thunderxt88'],
'flags': flags_part_number_thunderx
},
'0xa2': {
'machine_args': ['-mcpu=thunderxt81'],
'flags': flags_part_number_thunderx
},
'0xa3': {
'machine_args': ['-mcpu=thunderxt83'],
'flags': flags_part_number_thunderx
},
'0xaf': {
'machine_args': ['-march=armv8.1-a+crc+crypto',
'-mcpu=thunderx2t99'],
'flags': [
['RTE_MACHINE', '"thunderx2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 256]
]
},
'0xb2': {
'machine_args': ['-march=armv8.2-a+crc+crypto+lse',
'-mcpu=octeontx2'],
'flags': [
['RTE_MACHINE', '"octeontx2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_MAX_LCORE', 36],
['RTE_MAX_NUMA_NODES', 1]
]
}
}
'description': 'Cavium',
'flags': [
['RTE_MAX_VFIO_GROUPS', 128],
['RTE_MAX_LCORE', 96],
['RTE_MAX_NUMA_NODES', 2]
],
'part_number_config': {
'0xa1': {
'machine_args': ['-mcpu=thunderxt88'],
'flags': flags_part_number_thunderx
},
'0xa2': {
'machine_args': ['-mcpu=thunderxt81'],
'flags': flags_part_number_thunderx
},
'0xa3': {
'machine_args': ['-mcpu=thunderxt83'],
'flags': flags_part_number_thunderx
},
'0xaf': {
'machine_args': ['-march=armv8.1-a+crc+crypto', '-mcpu=thunderx2t99'],
'flags': [
['RTE_MACHINE', '"thunderx2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 256]
]
},
'0xb2': {
'machine_args': ['-march=armv8.2-a+crc+crypto+lse', '-mcpu=octeontx2'],
'flags': [
['RTE_MACHINE', '"octeontx2"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_MAX_LCORE', 36],
['RTE_MAX_NUMA_NODES', 1]
]
}
}
}
implementer_ampere = {
'description': 'Ampere Computing',
'flags': [
['RTE_MACHINE', '"emag"'],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 32],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number_config': {
'0x0': {'machine_args': ['-march=armv8-a+crc+crypto',
'-mtune=emag']}
}
'description': 'Ampere Computing',
'flags': [
['RTE_MACHINE', '"emag"'],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 32],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number_config': {
'0x0': {'machine_args': ['-march=armv8-a+crc+crypto', '-mtune=emag']}
}
}
implementer_hisilicon = {
'description': 'HiSilicon',
'flags': [
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 128]
],
'part_number_config': {
'0xd01': {
'machine_args': ['-march=armv8.2-a+crypto',
'-mtune=tsv110'],
'flags': [
['RTE_MACHINE', '"Kunpeng 920"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_LCORE', 256],
['RTE_MAX_NUMA_NODES', 8]
]
},
'0xd02': {
'machine_args': ['-march=armv8.2-a+crypto+sve'],
'flags': [
['RTE_MACHINE', '"Kunpeng 930"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_LCORE', 1280],
['RTE_MAX_NUMA_NODES', 16]
]
}
}
'description': 'HiSilicon',
'flags': [
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 128]
],
'part_number_config': {
'0xd01': {
'machine_args': ['-march=armv8.2-a+crypto', '-mtune=tsv110'],
'flags': [
['RTE_MACHINE', '"Kunpeng 920"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_LCORE', 256],
['RTE_MAX_NUMA_NODES', 8]
]
},
'0xd02': {
'machine_args': ['-march=armv8.2-a+crypto+sve'],
'flags': [
['RTE_MACHINE', '"Kunpeng 930"'],
['RTE_ARM_FEATURE_ATOMICS', true],
['RTE_MAX_LCORE', 1280],
['RTE_MAX_NUMA_NODES', 16]
]
}
}
}
implementer_qualcomm = {
'description': 'Qualcomm',
'flags': [
['RTE_MACHINE', '"armv8a"'],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 64],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number_config': {
'0xc00': {'machine_args': ['-march=armv8-a+crc']}
}
'description': 'Qualcomm',
'flags': [
['RTE_MACHINE', '"armv8a"'],
['RTE_USE_C11_MEM_MODEL', true],
['RTE_CACHE_LINE_SIZE', 64],
['RTE_MAX_LCORE', 64],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number_config': {
'0xc00': {'machine_args': ['-march=armv8-a+crc']}
}
}
## Arm implementers (ID from MIDR in Arm Architecture Reference Manual)
implementers = {
'generic': implementer_generic,
'0x41': implementer_arm,
'0x43': implementer_cavium,
'0x48': implementer_hisilicon,
'0x50': implementer_ampere,
'0x51': implementer_qualcomm
'generic': implementer_generic,
'0x41': implementer_arm,
'0x43': implementer_cavium,
'0x48': implementer_hisilicon,
'0x50': implementer_ampere,
'0x51': implementer_qualcomm
}
# SoC specific aarch64 flags have the highest priority
# (will overwrite all other flags)
soc_generic = {
'description': 'Generic un-optimized build for all aarch64 machines',
'implementer': 'generic',
'part_number': 'generic'
'description': 'Generic un-optimized build for all aarch64 machines',
'implementer': 'generic',
'part_number': 'generic'
}
soc_armada = {
'description': 'Marvell ARMADA',
'implementer': '0x41',
'part_number': '0xd08',
'flags': [
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'numa': false
'description': 'Marvell ARMADA',
'implementer': '0x41',
'part_number': '0xd08',
'flags': [
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'numa': false
}
soc_bluefield = {
'description': 'NVIDIA BlueField',
'implementer': '0x41',
'part_number': '0xd08',
'flags': [
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'numa': false
'description': 'NVIDIA BlueField',
'implementer': '0x41',
'part_number': '0xd08',
'flags': [
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'numa': false
}
soc_cn10k = {
'description' : 'Marvell OCTEON 10',
'implementer' : '0x41',
'flags': [
['RTE_MAX_LCORE', 24],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number': '0xd49',
'numa': false
'description' : 'Marvell OCTEON 10',
'implementer' : '0x41',
'flags': [
['RTE_MAX_LCORE', 24],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number': '0xd49',
'numa': false
}
soc_dpaa = {
'description': 'NXP DPAA',
'implementer': '0x41',
'part_number': '0xd08',
'flags': [
['RTE_MACHINE', '"dpaa"'],
['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false],
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'numa': false
'description': 'NXP DPAA',
'implementer': '0x41',
'part_number': '0xd08',
'flags': [
['RTE_MACHINE', '"dpaa"'],
['RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', false],
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'numa': false
}
soc_emag = {
'description': 'Ampere eMAG',
'implementer': '0x50',
'part_number': '0x0'
'description': 'Ampere eMAG',
'implementer': '0x50',
'part_number': '0x0'
}
soc_graviton2 = {
'description': 'AWS Graviton2',
'implementer': '0x41',
'part_number': '0xd0c',
'numa': false
'description': 'AWS Graviton2',
'implementer': '0x41',
'part_number': '0xd0c',
'numa': false
}
soc_kunpeng920 = {
'description': 'HiSilicon Kunpeng 920',
'implementer': '0x48',
'part_number': '0xd01',
'numa': true
'description': 'HiSilicon Kunpeng 920',
'implementer': '0x48',
'part_number': '0xd01',
'numa': true
}
soc_kunpeng930 = {
'description': 'HiSilicon Kunpeng 930',
'implementer': '0x48',
'part_number': '0xd02',
'numa': true
'description': 'HiSilicon Kunpeng 930',
'implementer': '0x48',
'part_number': '0xd02',
'numa': true
}
soc_n1sdp = {
'description': 'Arm Neoverse N1SDP',
'implementer': '0x41',
'part_number': '0xd0c',
'flags': [
['RTE_MAX_LCORE', 4]
],
'numa': false
'description': 'Arm Neoverse N1SDP',
'implementer': '0x41',
'part_number': '0xd0c',
'flags': [
['RTE_MAX_LCORE', 4]
],
'numa': false
}
soc_n2 = {
'description': 'Arm Neoverse N2',
'implementer': '0x41',
'part_number': '0xd49',
'numa': false
'description': 'Arm Neoverse N2',
'implementer': '0x41',
'part_number': '0xd49',
'numa': false
}
soc_octeontx2 = {
'description': 'Marvell OCTEON TX2',
'implementer': '0x43',
'part_number': '0xb2',
'numa': false
'description': 'Marvell OCTEON TX2',
'implementer': '0x43',
'part_number': '0xb2',
'numa': false
}
soc_stingray = {
'description': 'Broadcom Stingray',
'implementer': '0x41',
'flags': [
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number': '0xd08',
'numa': false
'description': 'Broadcom Stingray',
'implementer': '0x41',
'flags': [
['RTE_MAX_LCORE', 16],
['RTE_MAX_NUMA_NODES', 1]
],
'part_number': '0xd08',
'numa': false
}
soc_thunderx2 = {
'description': 'Marvell ThunderX2 T99',
'implementer': '0x43',
'part_number': '0xaf'
'description': 'Marvell ThunderX2 T99',
'implementer': '0x43',
'part_number': '0xaf'
}
soc_thunderxt88 = {
'description': 'Marvell ThunderX T88',
'implementer': '0x43',
'part_number': '0xa1'
'description': 'Marvell ThunderX T88',
'implementer': '0x43',
'part_number': '0xa1'
}
socs = {
'generic': soc_generic,
'armada': soc_armada,
'bluefield': soc_bluefield,
'cn10k' : soc_cn10k,
'dpaa': soc_dpaa,
'emag': soc_emag,
'graviton2': soc_graviton2,
'kunpeng920': soc_kunpeng920,
'kunpeng930': soc_kunpeng930,
'n1sdp': soc_n1sdp,
'n2': soc_n2,
'octeontx2': soc_octeontx2,
'stingray': soc_stingray,
'thunderx2': soc_thunderx2,
'thunderxt88': soc_thunderxt88
'generic': soc_generic,
'armada': soc_armada,
'bluefield': soc_bluefield,
'cn10k' : soc_cn10k,
'dpaa': soc_dpaa,
'emag': soc_emag,
'graviton2': soc_graviton2,
'kunpeng920': soc_kunpeng920,
'kunpeng930': soc_kunpeng930,
'n1sdp': soc_n1sdp,
'n2': soc_n2,
'octeontx2': soc_octeontx2,
'stingray': soc_stingray,
'thunderx2': soc_thunderx2,
'thunderxt88': soc_thunderxt88
}
dpdk_conf.set('RTE_ARCH_ARM', 1)
dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
if dpdk_conf.get('RTE_ARCH_32')
# armv7 build
dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
dpdk_conf.set('RTE_ARCH_ARMv7', 1)
# the minimum architecture supported, armv7-a, needs the following,
machine_args += '-mfpu=neon'
# armv7 build
dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
dpdk_conf.set('RTE_ARCH_ARMv7', 1)
# the minimum architecture supported, armv7-a, needs the following,
machine_args += '-mfpu=neon'
else
# aarch64 build
soc = get_option('platform')
soc_config = {}
if not meson.is_cross_build()
if machine == 'generic'
# generic build
if soc != ''
error('Building for a particular platform is ' +
'unsupported with generic build.')
endif
implementer_id = 'generic'
part_number = 'generic'
elif soc != ''
soc_config = socs.get(soc, {'not_supported': true})
else
# native build
# The script returns ['Implementer', 'Variant', 'Architecture',
# 'Primary Part number', 'Revision']
detect_vendor = find_program(join_paths(
meson.current_source_dir(), 'armv8_machine.py'))
cmd = run_command(detect_vendor.path())
if cmd.returncode() == 0
cmd_output = cmd.stdout().to_lower().strip().split(' ')
implementer_id = cmd_output[0]
part_number = cmd_output[3]
else
error('Error when getting Arm Implementer ID and part number.')
endif
endif
else
# cross build
soc = meson.get_cross_property('platform', '')
if soc == ''
error('Arm SoC must be specified in the cross file.')
endif
soc_config = socs.get(soc, {'not_supported': true})
endif
# aarch64 build
soc = get_option('platform')
soc_config = {}
if not meson.is_cross_build()
if machine == 'generic'
# generic build
if soc != ''
error('Building for a particular platform is unsupported with generic build.')
endif
implementer_id = 'generic'
part_number = 'generic'
elif soc != ''
soc_config = socs.get(soc, {'not_supported': true})
else
# native build
# The script returns ['Implementer', 'Variant', 'Architecture',
# 'Primary Part number', 'Revision']
detect_vendor = find_program(join_paths(meson.current_source_dir(),
'armv8_machine.py'))
cmd = run_command(detect_vendor.path())
if cmd.returncode() == 0
cmd_output = cmd.stdout().to_lower().strip().split(' ')
implementer_id = cmd_output[0]
part_number = cmd_output[3]
else
error('Error when getting Arm Implementer ID and part number.')
endif
endif
else
# cross build
soc = meson.get_cross_property('platform', '')
if soc == ''
error('Arm SoC must be specified in the cross file.')
endif
soc_config = socs.get(soc, {'not_supported': true})
endif
soc_flags = []
if soc_config.has_key('not_supported')
error('SoC @0@ not supported.'.format(soc))
elif soc_config != {}
implementer_id = soc_config['implementer']
implementer_config = implementers[implementer_id]
part_number = soc_config['part_number']
soc_flags = soc_config.get('flags', [])
if not soc_config.get('numa', true)
has_libnuma = 0
endif
soc_flags = []
if soc_config.has_key('not_supported')
error('SoC @0@ not supported.'.format(soc))
elif soc_config != {}
implementer_id = soc_config['implementer']
implementer_config = implementers[implementer_id]
part_number = soc_config['part_number']
soc_flags = soc_config.get('flags', [])
if not soc_config.get('numa', true)
has_libnuma = 0
endif
disable_drivers += ',' + soc_config.get('disable_drivers', '')
enable_drivers += ',' + soc_config.get('enable_drivers', '')
endif
disable_drivers += ',' + soc_config.get('disable_drivers', '')
enable_drivers += ',' + soc_config.get('enable_drivers', '')
endif
if implementers.has_key(implementer_id)
implementer_config = implementers[implementer_id]
else
error('Unsupported Arm implementer: @0@. '.format(implementer_id) +
'Please add support for it or use the generic ' +
'(-Dmachine=generic) build.')
endif
if implementers.has_key(implementer_id)
implementer_config = implementers[implementer_id]
else
error('Unsupported Arm implementer: @0@. '.format(implementer_id) +
'Please add support for it or use the generic ' +
'(-Dmachine=generic) build.')
endif
message('Arm implementer: ' + implementer_config['description'])
message('Arm part number: ' + part_number)
message('Arm implementer: ' + implementer_config['description'])
message('Arm part number: ' + part_number)
part_number_config = implementer_config['part_number_config']
if part_number_config.has_key(part_number)
# use the specified part_number machine args if found
part_number_config = part_number_config[part_number]
else
# unknown part number
error('Unsupported part number @0@ of implementer @1@. '
.format(part_number, implementer_id) +
'Please add support for it or use the generic ' +
'(-Dmachine=generic) build.')
endif
part_number_config = implementer_config['part_number_config']
if part_number_config.has_key(part_number)
# use the specified part_number machine args if found
part_number_config = part_number_config[part_number]
else
# unknown part number
error('Unsupported part number @0@ of implementer @1@. '
.format(part_number, implementer_id) +
'Please add support for it or use the generic ' +
'(-Dmachine=generic) build.')
endif
# add/overwrite flags in the proper order
dpdk_flags = flags_common + implementer_config['flags'] + part_number_config.get('flags', []) + soc_flags
# add/overwrite flags in the proper order
dpdk_flags = flags_common + implementer_config['flags'] + part_number_config.get('flags', []) + soc_flags
# apply supported machine args
machine_args = [] # Clear previous machine args
foreach flag: part_number_config['machine_args']
if cc.has_argument(flag)
machine_args += flag
endif
endforeach
# apply supported machine args
machine_args = [] # Clear previous machine args
foreach flag: part_number_config['machine_args']
if cc.has_argument(flag)
machine_args += flag
endif
endforeach
# apply flags
foreach flag: dpdk_flags
if flag.length() > 0
dpdk_conf.set(flag[0], flag[1])
endif
endforeach
# apply flags
foreach flag: dpdk_flags
if flag.length() > 0
dpdk_conf.set(flag[0], flag[1])
endif
endforeach
endif
message('Using machine args: @0@'.format(machine_args))
if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
cc.get_define('__aarch64__', args: machine_args) != '')
compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
endif
if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != ''
compile_time_cpuflags += ['RTE_CPUFLAG_CRC32']
compile_time_cpuflags += ['RTE_CPUFLAG_CRC32']
endif
if cc.get_define('__ARM_FEATURE_CRYPTO', args: machine_args) != ''
compile_time_cpuflags += ['RTE_CPUFLAG_AES', 'RTE_CPUFLAG_PMULL',
'RTE_CPUFLAG_SHA1', 'RTE_CPUFLAG_SHA2']
compile_time_cpuflags += ['RTE_CPUFLAG_AES', 'RTE_CPUFLAG_PMULL',
'RTE_CPUFLAG_SHA1', 'RTE_CPUFLAG_SHA2']
endif

View File

@ -5,13 +5,13 @@
supported_exec_envs = ['freebsd', 'linux', 'windows']
exec_env = host_machine.system()
if not supported_exec_envs.contains(exec_env)
error('unsupported system type "@0@"'.format(exec_env))
error('unsupported system type "@0@"'.format(exec_env))
endif
# define a handy variable for checking which OS we have.
# gives us "is_windows", "is_freebsd" and "is_linux"
foreach env:supported_exec_envs
set_variable('is_' + env, exec_env == env)
set_variable('is_' + env, exec_env == env)
endforeach
# MS linker requires special treatment.
@ -22,8 +22,7 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang')
# depending on the configuration options
pver = meson.project_version().split('.')
major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
abi_version = run_command(find_program('cat', 'more'),
abi_version_file).stdout().strip()
abi_version = run_command(find_program('cat', 'more'), abi_version_file).stdout().strip()
# Libraries have the abi_version as the filename extension
# and have the soname be all but the final part of the abi_version.
@ -35,21 +34,21 @@ so_version = abi_version.split('.')[0]
dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())
dpdk_conf.set('RTE_VER_MONTH', pver.get(1).to_int())
if pver.get(2).contains('-rc')
rc_ver = pver.get(2).split('-rc')
dpdk_conf.set('RTE_VER_MINOR', rc_ver.get(0).to_int())
dpdk_conf.set_quoted('RTE_VER_SUFFIX', '-rc')
dpdk_conf.set('RTE_VER_RELEASE', rc_ver.get(1).to_int())
rc_ver = pver.get(2).split('-rc')
dpdk_conf.set('RTE_VER_MINOR', rc_ver.get(0).to_int())
dpdk_conf.set_quoted('RTE_VER_SUFFIX', '-rc')
dpdk_conf.set('RTE_VER_RELEASE', rc_ver.get(1).to_int())
else
dpdk_conf.set('RTE_VER_MINOR', pver.get(2).to_int())
dpdk_conf.set_quoted('RTE_VER_SUFFIX', '')
dpdk_conf.set('RTE_VER_MINOR', pver.get(2).to_int())
dpdk_conf.set_quoted('RTE_VER_SUFFIX', '')
# for actual, non-rc releases, set the release value to 99 to ensure releases
# have higher version numbers than their respective release candidates
dpdk_conf.set('RTE_VER_RELEASE', 99)
dpdk_conf.set('RTE_VER_RELEASE', 99)
endif
pmd_subdir_opt = get_option('drivers_install_subdir')
if pmd_subdir_opt.contains('<VERSION>')
pmd_subdir_opt = abi_version.join(pmd_subdir_opt.split('<VERSION>'))
pmd_subdir_opt = abi_version.join(pmd_subdir_opt.split('<VERSION>'))
endif
driver_install_path = join_paths(get_option('libdir'), pmd_subdir_opt)
eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
@ -58,9 +57,8 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
# e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
# to be in the library path, so symlink the drivers from the main lib directory.
if not is_windows
meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
get_option('libdir'),
pmd_subdir_opt)
meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
get_option('libdir'), pmd_subdir_opt)
endif
# init disable/enable driver lists that will be populated in different places
@ -69,9 +67,9 @@ enable_drivers = ''
# set the machine type and cflags for it
if meson.is_cross_build()
machine = host_machine.cpu()
machine = host_machine.cpu()
else
machine = get_option('machine')
machine = get_option('machine')
endif
# machine type 'generic' is special, it selects the per arch agreed common
@ -82,17 +80,17 @@ endif
# This can be bumped up by the DPDK project, but it can never be an
# invariant like 'native'
if machine == 'default' or machine == 'generic'
if host_machine.cpu_family().startswith('x86')
# matches the old pre-meson build systems generic machine
machine = 'corei7'
elif host_machine.cpu_family().startswith('arm')
machine = 'armv7-a'
elif host_machine.cpu_family().startswith('aarch')
# arm64 manages generic config in config/arm/meson.build
machine = 'generic'
elif host_machine.cpu_family().startswith('ppc')
machine = 'power8'
endif
if host_machine.cpu_family().startswith('x86')
# matches the old pre-meson build systems generic machine
machine = 'corei7'
elif host_machine.cpu_family().startswith('arm')
machine = 'armv7-a'
elif host_machine.cpu_family().startswith('aarch')
# arm64 manages generic config in config/arm/meson.build
machine = 'generic'
elif host_machine.cpu_family().startswith('ppc')
machine = 'power8'
endif
endif
dpdk_conf.set('RTE_MACHINE', machine)
@ -100,10 +98,10 @@ machine_args = []
# ppc64 does not support -march= at all, use -mcpu and -mtune for that
if host_machine.cpu_family().startswith('ppc')
machine_args += '-mcpu=' + machine
machine_args += '-mtune=' + machine
machine_args += '-mcpu=' + machine
machine_args += '-mtune=' + machine
else
machine_args += '-march=' + machine
machine_args += '-march=' + machine
endif
toolchain = cc.get_id()
@ -114,88 +112,88 @@ dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
if not is_windows
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
endif
# use pthreads if available for the platform
if not is_windows
add_project_link_arguments('-pthread', language: 'c')
dpdk_extra_ldflags += '-pthread'
add_project_link_arguments('-pthread', language: 'c')
dpdk_extra_ldflags += '-pthread'
endif
# on some OS, maths functions are in a separate library
if cc.find_library('m', required : false).found()
# some libs depend on maths lib
add_project_link_arguments('-lm', language: 'c')
dpdk_extra_ldflags += '-lm'
# some libs depend on maths lib
add_project_link_arguments('-lm', language: 'c')
dpdk_extra_ldflags += '-lm'
endif
if is_linux
link_lib = 'dl'
link_lib = 'dl'
else
link_lib = ''
link_lib = ''
endif
# if link_lib is empty, do not add it to project properties
if link_lib != ''
add_project_link_arguments('-l' + link_lib, language: 'c')
dpdk_extra_ldflags += '-l' + link_lib
add_project_link_arguments('-l' + link_lib, language: 'c')
dpdk_extra_ldflags += '-l' + link_lib
endif
# check for libraries used in multiple places in DPDK
has_libnuma = 0
find_libnuma = true
if meson.is_cross_build() and not meson.get_cross_property('numa', true)
# don't look for libnuma if explicitly disabled in cross build
find_libnuma = false
# don't look for libnuma if explicitly disabled in cross build
find_libnuma = false
endif
if find_libnuma
numa_dep = cc.find_library('numa', required: false)
if numa_dep.found() and cc.has_header('numaif.h')
dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
has_libnuma = 1
add_project_link_arguments('-lnuma', language: 'c')
dpdk_extra_ldflags += '-lnuma'
endif
numa_dep = cc.find_library('numa', required: false)
if numa_dep.found() and cc.has_header('numaif.h')
dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
has_libnuma = 1
add_project_link_arguments('-lnuma', language: 'c')
dpdk_extra_ldflags += '-lnuma'
endif
endif
has_libfdt = 0
fdt_dep = cc.find_library('libfdt', required: false)
if fdt_dep.found() and cc.has_header('fdt.h')
dpdk_conf.set10('RTE_HAS_LIBFDT', true)
has_libfdt = 1
add_project_link_arguments('-lfdt', language: 'c')
dpdk_extra_ldflags += '-lfdt'
dpdk_conf.set10('RTE_HAS_LIBFDT', true)
has_libfdt = 1
add_project_link_arguments('-lfdt', language: 'c')
dpdk_extra_ldflags += '-lfdt'
endif
libexecinfo = cc.find_library('libexecinfo', required: false)
if libexecinfo.found() and cc.has_header('execinfo.h')
add_project_link_arguments('-lexecinfo', language: 'c')
dpdk_extra_ldflags += '-lexecinfo'
add_project_link_arguments('-lexecinfo', language: 'c')
dpdk_extra_ldflags += '-lexecinfo'
endif
# check for libbsd
libbsd = dependency('libbsd', required: false, method: 'pkg-config')
if libbsd.found()
dpdk_conf.set('RTE_USE_LIBBSD', 1)
dpdk_conf.set('RTE_USE_LIBBSD', 1)
endif
# check for pcap
pcap_dep = dependency('libpcap', required: false, method: 'pkg-config')
if not pcap_dep.found()
# pcap got a pkg-config file only in 1.9.0
pcap_dep = cc.find_library('pcap', required: false)
# pcap got a pkg-config file only in 1.9.0
pcap_dep = cc.find_library('pcap', required: false)
endif
if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
dpdk_conf.set('RTE_PORT_PCAP', 1)
dpdk_extra_ldflags += '-lpcap'
dpdk_conf.set('RTE_PORT_PCAP', 1)
dpdk_extra_ldflags += '-lpcap'
endif
# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
atomic_dep = cc.find_library('atomic', required: true)
add_project_link_arguments('-latomic', language: 'c')
dpdk_extra_ldflags += '-latomic'
atomic_dep = cc.find_library('atomic', required: true)
add_project_link_arguments('-latomic', language: 'c')
dpdk_extra_ldflags += '-latomic'
endif
# add -include rte_config to cflags
@ -203,48 +201,48 @@ add_project_arguments('-include', 'rte_config.h', language: 'c')
# enable extra warnings and disable any unwanted warnings
warning_flags = [
# -Wall is added by meson by default, so add -Wextra only
'-Wextra',
# -Wall is added by meson by default, so add -Wextra only
'-Wextra',
# additional warnings in alphabetical order
'-Wcast-qual',
'-Wdeprecated',
'-Wformat',
'-Wformat-nonliteral',
'-Wformat-security',
'-Wmissing-declarations',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
'-Wpointer-arith',
'-Wsign-compare',
'-Wstrict-prototypes',
'-Wundef',
'-Wwrite-strings',
# additional warnings in alphabetical order
'-Wcast-qual',
'-Wdeprecated',
'-Wformat',
'-Wformat-nonliteral',
'-Wformat-security',
'-Wmissing-declarations',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wold-style-definition',
'-Wpointer-arith',
'-Wsign-compare',
'-Wstrict-prototypes',
'-Wundef',
'-Wwrite-strings',
# globally disabled warnings
'-Wno-address-of-packed-member',
'-Wno-packed-not-aligned',
'-Wno-missing-field-initializers'
# globally disabled warnings
'-Wno-address-of-packed-member',
'-Wno-packed-not-aligned',
'-Wno-missing-field-initializers',
]
if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0')
# FIXME: Bugzilla 396
warning_flags += '-Wno-zero-length-bounds'
warning_flags += '-Wno-zero-length-bounds'
endif
if not dpdk_conf.get('RTE_ARCH_64')
# for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
warning_flags += '-Wno-pointer-to-int-cast'
warning_flags += '-Wno-pointer-to-int-cast'
endif
if cc.get_id() == 'intel'
warning_ids = [181, 188, 2203, 2279, 2557, 3179, 3656]
foreach i:warning_ids
warning_flags += '-diag-disable=@0@'.format(i)
endforeach
warning_ids = [181, 188, 2203, 2279, 2557, 3179, 3656]
foreach i:warning_ids
warning_flags += '-diag-disable=@0@'.format(i)
endforeach
endif
foreach arg: warning_flags
if cc.has_argument(arg)
add_project_arguments(arg, language: 'c')
endif
if cc.has_argument(arg)
add_project_arguments(arg, language: 'c')
endif
endforeach
# set other values pulled from the build options
@ -258,9 +256,9 @@ dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)
if dpdk_conf.get('RTE_ARCH_64')
dpdk_conf.set('RTE_MAX_MEM_MB', 524288)
dpdk_conf.set('RTE_MAX_MEM_MB', 524288)
else # for 32-bit we need smaller reserved memory areas
dpdk_conf.set('RTE_MAX_MEM_MB', 2048)
dpdk_conf.set('RTE_MAX_MEM_MB', 2048)
endif
@ -270,24 +268,24 @@ dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
# apply cross-specific options
if meson.is_cross_build()
# configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
cross_max_lcores = meson.get_cross_property('max_lcores', 0)
if cross_max_lcores != 0
message('Setting RTE_MAX_LCORE from cross file')
dpdk_conf.set('RTE_MAX_LCORE', cross_max_lcores)
endif
cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
if cross_max_numa_nodes != 0
message('Setting RTE_MAX_NUMA_NODES from cross file')
dpdk_conf.set('RTE_MAX_NUMA_NODES', cross_max_numa_nodes)
endif
# configure RTE_MAX_LCORE and RTE_MAX_NUMA_NODES from cross file
cross_max_lcores = meson.get_cross_property('max_lcores', 0)
if cross_max_lcores != 0
message('Setting RTE_MAX_LCORE from cross file')
dpdk_conf.set('RTE_MAX_LCORE', cross_max_lcores)
endif
cross_max_numa_nodes = meson.get_cross_property('max_numa_nodes', 0)
if cross_max_numa_nodes != 0
message('Setting RTE_MAX_NUMA_NODES from cross file')
dpdk_conf.set('RTE_MAX_NUMA_NODES', cross_max_numa_nodes)
endif
endif
# set the install path for the drivers
dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
install_headers(['rte_config.h'],
subdir: get_option('include_subdir_arch'))
subdir: get_option('include_subdir_arch'))
# enable VFIO only if it is linux OS
dpdk_conf.set('RTE_EAL_VFIO', is_linux)
@ -297,53 +295,53 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
# specify -D__BSD_VISIBLE for FreeBSD
if is_freebsd
add_project_arguments('-D__BSD_VISIBLE', language: 'c')
add_project_arguments('-D__BSD_VISIBLE', language: 'c')
endif
if is_windows
# VirtualAlloc2() is available since Windows 10 / Server 2016.
add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
# VirtualAlloc2() is available since Windows 10 / Server 2016.
add_project_arguments('-D_WIN32_WINNT=0x0A00', language: 'c')
# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
if cc.get_id() == 'gcc'
add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
endif
# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
if cc.get_id() == 'gcc'
add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
endif
# Disable secure CRT deprecated warnings for clang
if cc.get_id() == 'clang'
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c')
endif
# Disable secure CRT deprecated warnings for clang
if cc.get_id() == 'clang'
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'c')
endif
add_project_link_arguments('-lws2_32', language: 'c')
add_project_link_arguments('-lws2_32', language: 'c')
# Contrary to docs, VirtualAlloc2() is exported by mincore.lib
# in Windows SDK, while MinGW exports it by advapi32.a.
if is_ms_linker
add_project_link_arguments('-lmincore', language: 'c')
endif
# Contrary to docs, VirtualAlloc2() is exported by mincore.lib
# in Windows SDK, while MinGW exports it by advapi32.a.
if is_ms_linker
add_project_link_arguments('-lmincore', language: 'c')
endif
add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
add_project_link_arguments('-ldbghelp', language: 'c')
add_project_link_arguments('-ladvapi32', '-lsetupapi', language: 'c')
add_project_link_arguments('-ldbghelp', language: 'c')
endif
if get_option('b_lto')
if cc.has_argument('-ffat-lto-objects')
add_project_arguments('-ffat-lto-objects', language: 'c')
else
error('compiler does not support fat LTO objects - please turn LTO off')
endif
# workaround for gcc bug 81440
if cc.get_id() == 'gcc' and cc.version().version_compare('<8.0')
add_project_arguments('-Wno-lto-type-mismatch', language: 'c')
add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
endif
if cc.has_argument('-ffat-lto-objects')
add_project_arguments('-ffat-lto-objects', language: 'c')
else
error('compiler does not support fat LTO objects - please turn LTO off')
endif
# workaround for gcc bug 81440
if cc.get_id() == 'gcc' and cc.version().version_compare('<8.0')
add_project_arguments('-Wno-lto-type-mismatch', language: 'c')
add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
endif
endif
if get_option('default_library') == 'both'
error( '''
Unsupported value "both" for "default_library" option.
error( '''
Unsupported value "both" for "default_library" option.
NOTE: DPDK always builds both shared and static libraries. Please set
"default_library" to either "static" or "shared" to select default linkage
for apps and any examples.''')
NOTE: DPDK always builds both shared and static libraries. Please set
"default_library" to either "static" or "shared" to select default linkage
for apps and any examples.''')
endif

View File

@ -2,7 +2,7 @@
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
if not dpdk_conf.get('RTE_ARCH_64')
error('Only 64-bit compiles are supported for this platform type')
error('Only 64-bit compiles are supported for this platform type')
endif
dpdk_conf.set('RTE_ARCH', 'ppc_64')
dpdk_conf.set('RTE_ARCH_PPC_64', 1)
@ -12,9 +12,9 @@ dpdk_conf.set('RTE_ARCH_PPC_64', 1)
# is used, resulting in a build failure.
power9_supported = cc.has_argument('-mcpu=power9')
if not power9_supported
machine = 'power8'
machine_args = ['-mcpu=power8', '-mtune=power8']
dpdk_conf.set('RTE_MACHINE','power8')
machine = 'power8'
machine_args = ['-mcpu=power8', '-mtune=power8']
dpdk_conf.set('RTE_MACHINE','power8')
endif
# overrides specific to ppc64

View File

@ -3,57 +3,57 @@
# get binutils version for the workaround of Bug 97
if not is_windows
binutils_ok = run_command(binutils_avx512_check)
if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
machine_args += '-mno-avx512f'
warning('Binutils error with AVX512 assembly, disabling AVX512 support')
endif
binutils_ok = run_command(binutils_avx512_check)
if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
machine_args += '-mno-avx512f'
warning('Binutils error with AVX512 assembly, disabling AVX512 support')
endif
endif
# we require SSE4.2 for DPDK
if cc.get_define('__SSE4_2__', args: machine_args) == ''
message('SSE 4.2 not enabled by default, explicitly enabling')
machine_args += '-msse4'
message('SSE 4.2 not enabled by default, explicitly enabling')
machine_args += '-msse4'
endif
base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
foreach f:base_flags
compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
endforeach
optional_flags = [
'AES',
'AVX',
'AVX2',
'AVX512BW',
'AVX512CD',
'AVX512DQ',
'AVX512F',
'AVX512VL',
'PCLMUL',
'RDRND',
'RDSEED',
'VPCLMULQDQ',
'AES',
'AVX',
'AVX2',
'AVX512BW',
'AVX512CD',
'AVX512DQ',
'AVX512F',
'AVX512VL',
'PCLMUL',
'RDRND',
'RDSEED',
'VPCLMULQDQ',
]
foreach f:optional_flags
if cc.get_define('__@0@__'.format(f), args: machine_args) == '1'
if f == 'PCLMUL' # special case flags with different defines
f = 'PCLMULQDQ'
elif f == 'RDRND'
f = 'RDRAND'
endif
compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
endif
if cc.get_define('__@0@__'.format(f), args: machine_args) == '1'
if f == 'PCLMUL' # special case flags with different defines
f = 'PCLMULQDQ'
elif f == 'RDRND'
f = 'RDRAND'
endif
compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
endif
endforeach
dpdk_conf.set('RTE_ARCH_X86', 1)
if dpdk_conf.get('RTE_ARCH_64')
dpdk_conf.set('RTE_ARCH_X86_64', 1)
dpdk_conf.set('RTE_ARCH', 'x86_64')
dpdk_conf.set('RTE_ARCH_X86_64', 1)
dpdk_conf.set('RTE_ARCH', 'x86_64')
else
dpdk_conf.set('RTE_ARCH_I686', 1)
dpdk_conf.set('RTE_ARCH', 'i686')
dpdk_conf.set('RTE_ARCH_I686', 1)
dpdk_conf.set('RTE_ARCH', 'i686')
endif
dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)

View File

@ -23,12 +23,12 @@ htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
# false it would be impossible to install the docs.
# So use a configure option for now.
example = custom_target('examples.dox',
output: 'examples.dox',
command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'],
depfile: 'examples.dox.d',
install: get_option('enable_docs'),
install_dir: htmldir,
build_by_default: get_option('enable_docs'))
output: 'examples.dox',
command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'],
depfile: 'examples.dox.d',
install: get_option('enable_docs'),
install_dir: htmldir,
build_by_default: get_option('enable_docs'))
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
@ -39,23 +39,23 @@ cdata.set('TOPDIR', meson.source_root())
cdata.set('STRIP_FROM_PATH', meson.source_root())
cdata.set('WARN_AS_ERROR', 'NO')
if get_option('werror')
cdata.set('WARN_AS_ERROR', 'YES')
cdata.set('WARN_AS_ERROR', 'YES')
endif
doxy_conf = configure_file(input: 'doxy-api.conf.in',
output: 'doxy-api.conf',
configuration: cdata)
output: 'doxy-api.conf',
configuration: cdata)
doxy_build = custom_target('doxygen',
depends: example,
depend_files: 'doxy-api-index.md',
input: doxy_conf,
output: 'html',
depfile: 'html.d',
command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
install: get_option('enable_docs'),
install_dir: htmldir,
build_by_default: get_option('enable_docs'))
depends: example,
depend_files: 'doxy-api-index.md',
input: doxy_conf,
output: 'html',
depfile: 'html.d',
command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
install: get_option('enable_docs'),
install_dir: htmldir,
build_by_default: get_option('enable_docs'))
doc_targets += doxy_build
doc_target_names += 'Doxygen_API'

View File

@ -4,28 +4,27 @@
sphinx = find_program('sphinx-build', required: get_option('enable_docs'))
if not sphinx.found()
subdir_done()
subdir_done()
endif
extra_sphinx_args = []
if get_option('werror')
extra_sphinx_args += '-W'
extra_sphinx_args += '-W'
endif
htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
html_guides = custom_target('html_guides',
input: files('index.rst'),
output: 'html',
command: [sphinx_wrapper, sphinx, meson.project_version(),
meson.current_source_dir(), meson.current_build_dir(),
extra_sphinx_args],
depfile: '.html.d',
build_by_default: get_option('enable_docs'),
install: get_option('enable_docs'),
install_dir: htmldir)
input: files('index.rst'),
output: 'html',
command: [sphinx_wrapper, sphinx, meson.project_version(),
meson.current_source_dir(), meson.current_build_dir(),
extra_sphinx_args],
depfile: '.html.d',
build_by_default: get_option('enable_docs'),
install: get_option('enable_docs'),
install_dir: htmldir)
install_data(files('custom.css'),
install_dir: join_paths(htmldir,'_static', 'css'))
install_data(files('custom.css'), install_dir: join_paths(htmldir,'_static', 'css'))
doc_targets += html_guides
doc_target_names += 'HTML_Guides'

View File

@ -7,9 +7,9 @@ subdir('api')
subdir('guides')
if doc_targets.length() == 0
message = 'No docs targets found'
message = 'No docs targets found'
else
message = 'Building docs:'
message = 'Building docs:'
endif
run_target('doc', command: ['echo', message, doc_target_names],
depends: doc_targets)
depends: doc_targets)

View File

@ -10,26 +10,26 @@ kmods = ['contigmem', 'nic_uio']
# files from the individual meson.build files, and then use a custom
# target to call make, passing in the values as env parameters.
kmod_cflags = ['-I' + meson.build_root(),
'-I' + join_paths(meson.source_root(), 'config'),
'-include rte_config.h']
'-I' + join_paths(meson.source_root(), 'config'),
'-include rte_config.h']
# to avoid warnings due to race conditions with creating the dev_if.h, etc.
# files, serialize the kernel module builds. Each module will depend on
# previous ones
built_kmods = []
foreach k:kmods
subdir(k)
built_kmods += custom_target(k,
input: [files('BSDmakefile.meson'), sources],
output: k + '.ko',
command: ['make', '-f', '@INPUT0@',
'KMOD_OBJDIR=@OUTDIR@',
'KMOD_SRC=@INPUT1@',
'KMOD=' + k,
'KMOD_CFLAGS=' + ' '.join(kmod_cflags),
'CC=clang'],
depends: built_kmods, # make each module depend on prev
build_by_default: get_option('enable_kmods'),
install: get_option('enable_kmods'),
install_dir: '/boot/modules/')
subdir(k)
built_kmods += custom_target(k,
input: [files('BSDmakefile.meson'), sources],
output: k + '.ko',
command: ['make', '-f', '@INPUT0@',
'KMOD_OBJDIR=@OUTDIR@',
'KMOD_SRC=@INPUT1@',
'KMOD=' + k,
'KMOD_CFLAGS=' + ' '.join(kmod_cflags),
'CC=clang'],
depends: built_kmods, # make each module depend on prev
build_by_default: get_option('enable_kmods'),
install: get_option('enable_kmods'),
install_dir: '/boot/modules/')
endforeach

View File

@ -2,27 +2,28 @@
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
kni_mkfile = custom_target('rte_kni_makefile',
output: 'Makefile',
command: ['touch', '@OUTPUT@'])
output: 'Makefile',
command: ['touch', '@OUTPUT@'])
kni_sources = files(
'kni_misc.c',
'kni_net.c',
'Kbuild')
'kni_misc.c',
'kni_net.c',
'Kbuild',
)
custom_target('rte_kni',
input: kni_sources,
output: 'rte_kni.ko',
command: ['make', '-j4', '-C', kernel_build_dir,
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'MODULE_CFLAGS=-include ' + meson.source_root() + '/config/rte_config.h' +
' -I' + meson.source_root() + '/lib/librte_eal/include' +
' -I' + meson.source_root() + '/lib/librte_kni' +
' -I' + meson.build_root() +
' -I' + meson.current_source_dir(),
'modules'] + cross_args,
depends: kni_mkfile,
install: install,
install_dir: kernel_install_dir,
build_by_default: get_option('enable_kmods'))
input: kni_sources,
output: 'rte_kni.ko',
command: ['make', '-j4', '-C', kernel_build_dir,
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'MODULE_CFLAGS=-include ' + meson.source_root() + '/config/rte_config.h' +
' -I' + meson.source_root() + '/lib/librte_eal/include' +
' -I' + meson.source_root() + '/lib/librte_kni' +
' -I' + meson.build_root() +
' -I' + meson.current_source_dir(),
'modules'] + cross_args,
depends: kni_mkfile,
install: install,
install_dir: kernel_install_dir,
build_by_default: get_option('enable_kmods'))

View File

@ -9,84 +9,83 @@ install = not meson.is_cross_build()
cross_args = []
if not meson.is_cross_build()
# native build
kernel_version = run_command('uname', '-r').stdout().strip()
kernel_install_dir = '/lib/modules/' + kernel_version + '/extra/dpdk'
if kernel_build_dir == ''
# use default path for native builds
kernel_build_dir = '/lib/modules/' + kernel_version + '/build'
endif
# native build
kernel_version = run_command('uname', '-r').stdout().strip()
kernel_install_dir = '/lib/modules/' + kernel_version + '/extra/dpdk'
if kernel_build_dir == ''
# use default path for native builds
kernel_build_dir = '/lib/modules/' + kernel_version + '/build'
endif
# test running make in kernel directory, using "make kernelversion"
make_returncode = run_command('make', '-sC', kernel_build_dir,
'kernelversion').returncode()
if make_returncode != 0
# backward compatibility:
# the headers could still be in the 'build' subdir
if not kernel_build_dir.endswith('build') and not kernel_build_dir.endswith('build/')
kernel_build_dir = join_paths(kernel_build_dir, 'build')
make_returncode = run_command('make', '-sC', kernel_build_dir,
'kernelversion').returncode()
endif
endif
# test running make in kernel directory, using "make kernelversion"
make_returncode = run_command('make', '-sC', kernel_build_dir,
'kernelversion').returncode()
if make_returncode != 0
# backward compatibility:
# the headers could still be in the 'build' subdir
if not kernel_build_dir.endswith('build') and not kernel_build_dir.endswith('build/')
kernel_build_dir = join_paths(kernel_build_dir, 'build')
make_returncode = run_command('make', '-sC', kernel_build_dir,
'kernelversion').returncode()
endif
endif
if make_returncode != 0
error('Cannot compile kernel modules as requested - are kernel headers installed?')
endif
if make_returncode != 0
error('Cannot compile kernel modules as requested - are kernel headers installed?')
endif
# DO ACTUAL MODULE BUILDING
foreach d:subdirs
subdir(d)
endforeach
# DO ACTUAL MODULE BUILDING
foreach d:subdirs
subdir(d)
endforeach
subdir_done()
subdir_done()
endif
# cross build
# if we are cross-compiling we need kernel_build_dir specified
if kernel_build_dir == ''
error('Need "kernel_dir" option for kmod compilation when cross-compiling')
error('Need "kernel_dir" option for kmod compilation when cross-compiling')
endif
cross_compiler = find_program('c').path()
if cross_compiler.endswith('gcc')
cross_prefix = run_command([py3, '-c', 'print("' + cross_compiler + '"[:-3])']).stdout().strip()
cross_prefix = run_command([py3, '-c', 'print("' + cross_compiler + '"[:-3])']).stdout().strip()
elif cross_compiler.endswith('clang')
cross_prefix = ''
found_target = false
# search for '-target' and use the arg that follows
# (i.e. the value of '-target') as cross_prefix
foreach cross_c_arg : meson.get_cross_property('c_args')
if found_target and cross_prefix == ''
cross_prefix = cross_c_arg
endif
if cross_c_arg == '-target'
found_target = true
endif
endforeach
if cross_prefix == ''
error('Didn\'t find -target and its value in' +
' c_args in input cross-file.')
endif
linker = 'lld'
foreach cross_c_link_arg : meson.get_cross_property('c_link_args')
if cross_c_link_arg.startswith('-fuse-ld')
linker = cross_c_link_arg.split('=')[1]
endif
endforeach
cross_args += ['CC=@0@'.format(cross_compiler), 'LD=ld.@0@'.format(linker)]
cross_prefix = ''
found_target = false
# search for '-target' and use the arg that follows
# (i.e. the value of '-target') as cross_prefix
foreach cross_c_arg : meson.get_cross_property('c_args')
if found_target and cross_prefix == ''
cross_prefix = cross_c_arg
endif
if cross_c_arg == '-target'
found_target = true
endif
endforeach
if cross_prefix == ''
error('Did not find -target and its value in c_args in input cross-file.')
endif
linker = 'lld'
foreach cross_c_link_arg : meson.get_cross_property('c_link_args')
if cross_c_link_arg.startswith('-fuse-ld')
linker = cross_c_link_arg.split('=')[1]
endif
endforeach
cross_args += ['CC=@0@'.format(cross_compiler), 'LD=ld.@0@'.format(linker)]
else
error('Unsupported cross compiler: @0@'.format(cross_compiler))
error('Unsupported cross compiler: @0@'.format(cross_compiler))
endif
cross_arch = host_machine.cpu_family()
if host_machine.cpu_family() == 'aarch64'
cross_arch = 'arm64'
cross_arch = 'arm64'
endif
cross_args += ['ARCH=@0@'.format(cross_arch),
'CROSS_COMPILE=@0@'.format(cross_prefix)]
'CROSS_COMPILE=@0@'.format(cross_prefix)]
# DO ACTUAL MODULE BUILDING
foreach d:subdirs
subdir(d)
subdir(d)
endforeach

View File

@ -2,27 +2,27 @@
# Copyright(c) 2017-2019 Intel Corporation
project('DPDK', 'C',
# Get version number from file.
# Fallback to "more" for Windows compatibility.
version: run_command(find_program('cat', 'more'),
files('VERSION')).stdout().strip(),
license: 'BSD',
default_options: ['buildtype=release', 'default_library=static'],
meson_version: '>= 0.49.2'
# Get version number from file.
# Fallback to "more" for Windows compatibility.
version: run_command(find_program('cat', 'more'),
files('VERSION')).stdout().strip(),
license: 'BSD',
default_options: ['buildtype=release', 'default_library=static'],
meson_version: '>= 0.49.2'
)
# check for developer mode
developer_mode = false
if get_option('developer_mode').auto()
if meson.version().version_compare('>=0.53') # fs module available
fs = import('fs')
developer_mode = fs.is_dir('.git')
endif
if meson.version().version_compare('>=0.53') # fs module available
fs = import('fs')
developer_mode = fs.is_dir('.git')
endif
else
developer_mode = get_option('developer_mode').enabled()
developer_mode = get_option('developer_mode').enabled()
endif
if developer_mode
message('## Building in Developer Mode ##')
message('## Building in Developer Mode ##')
endif
# set up some global vars for compiler, platform, configuration, etc.
@ -39,20 +39,20 @@ dpdk_drvs_disabled = []
abi_version_file = files('ABI_VERSION')
if host_machine.cpu_family().startswith('x86')
arch_subdir = 'x86'
arch_subdir = 'x86'
elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
arch_subdir = 'arm'
arch_subdir = 'arm'
elif host_machine.cpu_family().startswith('ppc')
arch_subdir = 'ppc'
arch_subdir = 'ppc'
endif
# configure the build, and make sure configs here and in config folder are
# able to be included in any file. We also store a global array of include dirs
# for passing to pmdinfogen scripts
global_inc = include_directories('.', 'config',
'lib/librte_eal/include',
'lib/librte_eal/@0@/include'.format(host_machine.system()),
'lib/librte_eal/@0@/include'.format(arch_subdir),
'lib/librte_eal/include',
'lib/librte_eal/@0@/include'.format(host_machine.system()),
'lib/librte_eal/@0@/include'.format(arch_subdir),
)
# do configuration and get tool paths
@ -74,25 +74,25 @@ subdir('doc')
# install any example code into the appropriate install path
subdir('examples')
install_subdir('examples',
install_dir: get_option('datadir') + '/dpdk',
exclude_files: ex_file_excludes)
install_dir: get_option('datadir') + '/dpdk',
exclude_files: ex_file_excludes)
# build kernel modules if enabled
if get_option('enable_kmods')
subdir('kernel')
subdir('kernel')
endif
# check header includes if requested
if get_option('check_includes')
subdir('buildtools/chkincs')
subdir('buildtools/chkincs')
endif
# write the build config
build_cfg = 'rte_build_config.h'
configure_file(output: build_cfg,
configuration: dpdk_conf,
install_dir: join_paths(get_option('includedir'),
get_option('include_subdir_arch')))
configuration: dpdk_conf,
install_dir: join_paths(get_option('includedir'),
get_option('include_subdir_arch')))
# build pkg-config files for dpdk
subdir('buildtools/pkg-config')
@ -103,40 +103,40 @@ output_message = '\n=================\nLibraries Enabled\n=================\n'
output_message += '\nlibs:\n\t'
output_count = 0
foreach lib:enabled_libs
output_message += lib + ', '
output_count += 1
if output_count == 8
output_message += '\n\t'
output_count = 0
endif
output_message += lib + ', '
output_count += 1
if output_count == 8
output_message += '\n\t'
output_count = 0
endif
endforeach
message(output_message + '\n')
output_message = '\n===============\nDrivers Enabled\n===============\n'
foreach class:dpdk_driver_classes
class_drivers = get_variable(class + '_drivers')
output_message += '\n' + class + ':\n\t'
output_count = 0
foreach drv:class_drivers
output_message += drv + ', '
output_count += 1
if output_count == 8
output_message += '\n\t'
output_count = 0
endif
endforeach
class_drivers = get_variable(class + '_drivers')
output_message += '\n' + class + ':\n\t'
output_count = 0
foreach drv:class_drivers
output_message += drv + ', '
output_count += 1
if output_count == 8
output_message += '\n\t'
output_count = 0
endif
endforeach
endforeach
message(output_message + '\n')
output_message = '\n=================\nContent Skipped\n=================\n'
output_message += '\nlibs:\n\t'
foreach lib:dpdk_libs_disabled
reason = get_variable(lib.underscorify() + '_disable_reason')
output_message += lib + ':\t' + reason + '\n\t'
reason = get_variable(lib.underscorify() + '_disable_reason')
output_message += lib + ':\t' + reason + '\n\t'
endforeach
output_message += '\ndrivers:\n\t'
foreach drv:dpdk_drvs_disabled
reason = get_variable(drv.underscorify() + '_disable_reason')
output_message += drv + ':\t' + reason + '\n\t'
reason = get_variable(drv.underscorify() + '_disable_reason')
output_message += drv + ':\t' + reason + '\n\t'
endforeach
message(output_message + '\n')

View File

@ -1,44 +1,44 @@
# Please keep these options sorted alphabetically.
option('check_includes', type: 'boolean', value: false,
description: 'build "chkincs" to verify each header file can compile alone')
option('developer_mode', type: 'feature',
description: 'turn on additional build checks relevant for DPDK developers')
option('disable_drivers', type: 'string', value: '',
description: 'Comma-separated list of drivers to explicitly disable.')
option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',
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,
description: 'build kernel modules')
option('examples', type: 'string', value: '',
description: 'Comma-separated list of examples to build by default')
option('flexran_sdk', type: 'string', value: '',
description: 'Path to FlexRAN SDK optional Libraries for BBDEV device')
option('ibverbs_link', type: 'combo', choices : ['static', 'shared', 'dlopen'], value: 'shared',
description: 'Linkage method (static/shared/dlopen) for Mellanox PMDs with ibverbs dependencies.')
option('include_subdir_arch', type: 'string', value: '',
description: 'subdirectory where to install arch-dependent headers')
option('kernel_dir', type: 'string', value: '',
description: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir or $kernel_dir/build. Modules will be installed in /lib/modules.')
option('machine', type: 'string', value: 'native',
description: 'set the target machine type or "generic", a build usable on all machines of the build machine architecture or "native", which lets the compiler pick the architecture of the build machine.')
option('max_ethports', type: 'integer', value: 32,
description: 'maximum number of Ethernet devices')
option('max_lcores', type: 'integer', value: 128,
description: 'maximum number of cores/threads supported by EAL')
option('max_numa_nodes', type: 'integer', value: 32,
description: 'maximum number of NUMA nodes supported by EAL')
option('platform', type: 'string', value: '',
description: 'use configuration for a particular platform (such as a SoC).')
option('enable_trace_fp', type: 'boolean', value: false,
description: 'enable fast path trace points.')
option('tests', type: 'boolean', value: true,
description: 'build unit tests')
option('use_hpet', type: 'boolean', value: false,
description: 'use HPET timer in EAL')
option('check_includes', type: 'boolean', value: false, description:
'build "chkincs" to verify each header file can compile alone')
option('developer_mode', type: 'feature', description:
'turn on additional build checks relevant for DPDK developers')
option('disable_drivers', type: 'string', value: '', description:
'Comma-separated list of drivers to explicitly disable.')
option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>', 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, description:
'build kernel modules')
option('examples', type: 'string', value: '', description:
'Comma-separated list of examples to build by default')
option('flexran_sdk', type: 'string', value: '', description:
'Path to FlexRAN SDK optional Libraries for BBDEV device')
option('ibverbs_link', type: 'combo', choices : ['static', 'shared', 'dlopen'], value: 'shared', description:
'Linkage method (static/shared/dlopen) for Mellanox PMDs with ibverbs dependencies.')
option('include_subdir_arch', type: 'string', value: '', description:
'subdirectory where to install arch-dependent headers')
option('kernel_dir', type: 'string', value: '', description:
'Path to the kernel for building kernel modules. Headers must be in $kernel_dir or $kernel_dir/build. Modules will be installed in /lib/modules.')
option('machine', type: 'string', value: 'native', description:
'set the target machine type or "generic", a build usable on all machines of the build machine architecture or "native", which lets the compiler pick the architecture of the build machine.')
option('max_ethports', type: 'integer', value: 32, description:
'maximum number of Ethernet devices')
option('max_lcores', type: 'integer', value: 128, description:
'maximum number of cores/threads supported by EAL')
option('max_numa_nodes', type: 'integer', value: 32, description:
'maximum number of NUMA nodes supported by EAL')
option('platform', type: 'string', value: '', description:
'use configuration for a particular platform (such as a SoC).')
option('enable_trace_fp', type: 'boolean', value: false, description:
'enable fast path trace points.')
option('tests', type: 'boolean', value: true, description:
'build unit tests')
option('use_hpet', type: 'boolean', value: false, description:
'use HPET timer in EAL')

View File

@ -2,8 +2,9 @@
# Copyright(c) 2017 Intel Corporation
install_data([
'dpdk-devbind.py',
'dpdk-pmdinfo.py',
'dpdk-telemetry.py',
'dpdk-hugepages.py'
],install_dir: 'bin')
'dpdk-devbind.py',
'dpdk-pmdinfo.py',
'dpdk-telemetry.py',
'dpdk-hugepages.py',
],
install_dir: 'bin')