sched: add PIE based congestion management
[dpdk.git] / kernel / linux / kni / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
3
4 # For SUSE build check function arguments of ndo_tx_timeout API
5 # Ref: https://jira.devtools.intel.com/browse/DPDK-29263
6 kmod_cflags = ''
7 file_path = kernel_source_dir + '/include/linux/netdevice.h'
8 run_cmd = run_command('grep', 'ndo_tx_timeout', file_path)
9
10 if run_cmd.stdout().contains('txqueue') == true
11    kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
12 endif
13
14
15 kni_mkfile = custom_target('rte_kni_makefile',
16         output: 'Makefile',
17         command: ['touch', '@OUTPUT@'])
18
19 kni_sources = files(
20         'kni_misc.c',
21         'kni_net.c',
22         'Kbuild',
23 )
24
25 custom_target('rte_kni',
26         input: kni_sources,
27         output: 'rte_kni.ko',
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             + meson.source_root() + '/config/rte_config.h' +
33             ' -I' + meson.source_root() + '/lib/eal/include' +
34             ' -I' + meson.source_root() + '/lib/kni' +
35             ' -I' + meson.build_root() +
36             ' -I' + meson.current_source_dir(),
37             'modules'] + cross_args,
38         depends: kni_mkfile,
39         install: install,
40         install_dir: kernel_install_dir,
41         build_by_default: get_option('enable_kmods'))