2019-06-25 11:12:58 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
|
|
|
|
|
2022-09-02 04:40:05 +00:00
|
|
|
# For SUSE build check function arguments of ndo_tx_timeout API
|
|
|
|
# Ref: https://jira.devtools.intel.com/browse/DPDK-29263
|
|
|
|
kmod_cflags = ''
|
|
|
|
file_path = kernel_source_dir + '/include/linux/netdevice.h'
|
|
|
|
run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
|
|
|
|
|
|
|
|
if run_cmd.stdout().contains('txqueue') == true
|
|
|
|
kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2019-06-25 11:12:58 +00:00
|
|
|
kni_mkfile = custom_target('rte_kni_makefile',
|
|
|
|
output: 'Makefile',
|
|
|
|
command: ['touch', '@OUTPUT@'])
|
|
|
|
|
|
|
|
kni_sources = files(
|
|
|
|
'kni_misc.c',
|
|
|
|
'kni_net.c',
|
|
|
|
'Kbuild')
|
|
|
|
|
|
|
|
custom_target('rte_kni',
|
2020-06-18 16:55:50 +00:00
|
|
|
input: kni_sources,
|
2019-06-25 11:12:58 +00:00
|
|
|
output: 'rte_kni.ko',
|
2019-11-23 08:13:38 +00:00
|
|
|
command: ['make', '-j4', '-C', kernel_dir + '/build',
|
2019-06-25 11:12:58 +00:00
|
|
|
'M=' + meson.current_build_dir(),
|
|
|
|
'src=' + meson.current_source_dir(),
|
2022-09-02 04:40:05 +00:00
|
|
|
' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
|
|
|
|
+ dpdk_source_root + '/config/rte_config.h' +
|
|
|
|
' -I' + dpdk_source_root + '/lib/librte_eal/include' +
|
|
|
|
' -I' + dpdk_source_root + '/lib/librte_kni' +
|
|
|
|
' -I' + dpdk_build_root +
|
2020-06-18 16:55:50 +00:00
|
|
|
' -I' + meson.current_source_dir(),
|
2019-06-25 11:12:58 +00:00
|
|
|
'modules'],
|
|
|
|
depends: kni_mkfile,
|
|
|
|
install: true,
|
2019-11-23 08:13:38 +00:00
|
|
|
install_dir: kernel_dir + '/extra/dpdk',
|
2019-06-25 11:12:58 +00:00
|
|
|
build_by_default: get_option('enable_kmods'))
|