sched: add PIE based congestion management
[dpdk.git] / kernel / linux / kni / meson.build
index 877ff5c..c683fc7 100644 (file)
@@ -1,34 +1,41 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
-subdir('ethtool')
+# 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)
+
+if run_cmd.stdout().contains('txqueue') == true
+   kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
+endif
+
 
 kni_mkfile = custom_target('rte_kni_makefile',
-       output: 'Makefile',
-       command: ['touch', '@OUTPUT@'])
+        output: 'Makefile',
+        command: ['touch', '@OUTPUT@'])
 
 kni_sources = files(
-       'kni_ethtool.c',
-       'kni_misc.c',
-       'kni_net.c',
-       'Kbuild')
+        'kni_misc.c',
+        'kni_net.c',
+        'Kbuild',
+)
 
 custom_target('rte_kni',
-       input: kni_sources + kni_igb_sources + kni_ixgbe_sources,
-       output: 'rte_kni.ko',
-       command: ['make', '-j4', '-C', kernel_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/common/include' +
-               ' -I' + meson.source_root() + '/lib/librte_eal/linux/eal/include' +
-               ' -I' + meson.build_root() +
-               ' -I' + meson.current_source_dir() +
-               ' -I' + meson.current_source_dir() + '/ethtool/ixgbe' +
-               ' -I' + meson.current_source_dir() + '/ethtool/igb',
-               'modules'],
-       depends: kni_mkfile,
-       console: true,
-       install: true,
-       install_dir: kernel_dir + '/../extra/dpdk',
-       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(),
+            ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
+            + meson.source_root() + '/config/rte_config.h' +
+            ' -I' + meson.source_root() + '/lib/eal/include' +
+            ' -I' + meson.source_root() + '/lib/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'))