1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
4 # For SUSE build check function arguments of ndo_tx_timeout API
5 # Ref: https://jira.devtools.intel.com/browse/DPDK-29263
7 file_path = kernel_source_dir + '/include/linux/netdevice.h'
8 run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
10 if run_cmd.stdout().contains('txqueue') == true
11 kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
15 kni_mkfile = custom_target('rte_kni_makefile',
17 command: ['touch', '@OUTPUT@'])
25 custom_target('rte_kni',
28 command: ['make', '-j4', '-C', kernel_build_dir,
29 'M=' + meson.current_build_dir(),
30 'src=' + meson.current_source_dir(),
31 ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
32 + dpdk_source_root + '/config/rte_config.h' +
33 ' -I' + dpdk_source_root + '/lib/eal/include' +
34 ' -I' + dpdk_source_root + '/lib/kni' +
35 ' -I' + dpdk_build_root +
36 ' -I' + meson.current_source_dir(),
37 'modules'] + cross_args,
40 install_dir: kernel_install_dir,
41 build_by_default: get_option('enable_kmods'))