[v3,4/9] examples/performance-thread: add l3fwd-thread to meson

Message ID 20191022154310.41238-5-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Headers
Series support all examples in a meson build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson Oct. 22, 2019, 3:43 p.m. UTC
  Limited to x86_64 systems, as it fails to compile on any others and is
disabled in the examples makefile for non-x86_64 systems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build                          |  3 ++-
 .../l3fwd-thread/meson.build                  | 27 +++++++++++++++++++
 examples/performance-thread/meson.build       | 10 -------
 3 files changed, 29 insertions(+), 11 deletions(-)
 create mode 100644 examples/performance-thread/l3fwd-thread/meson.build
 delete mode 100644 examples/performance-thread/meson.build
  

Patch

diff --git a/examples/meson.build b/examples/meson.build
index e40ab68da..889bb6b2c 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -31,7 +31,8 @@  all_examples = [
 	'multi_process/simple_mp',
 	'multi_process/symmetric_mp',
 	'netmap_compat', 'ntb', 'packet_ordering',
-	'performance-thread', 'ptpclient',
+	'performance-thread/l3fwd-thread',
+	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
 	'server_node_efd', 'service_cores',
diff --git a/examples/performance-thread/l3fwd-thread/meson.build b/examples/performance-thread/l3fwd-thread/meson.build
new file mode 100644
index 000000000..185fa59a4
--- /dev/null
+++ b/examples/performance-thread/l3fwd-thread/meson.build
@@ -0,0 +1,27 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+build = dpdk_conf.has('RTE_ARCH_X86_64')
+deps += ['timer', 'lpm']
+
+# get the performance thread (pt) architecture subdir
+if dpdk_conf.has('RTE_ARCH_ARM64')
+	pt_arch_dir = '../common/arch/arm64'
+else
+	pt_arch_dir = '../common/arch/x86'
+endif
+sources += files('main.c',
+	'../common/lthread.c',
+	'../common/lthread_cond.c',
+	'../common/lthread_diag.c',
+	'../common/lthread_mutex.c',
+	'../common/lthread_sched.c',
+	'../common/lthread_tls.c',
+	pt_arch_dir + '/ctx.c')
+
+includes += include_directories('../common', pt_arch_dir)
diff --git a/examples/performance-thread/meson.build b/examples/performance-thread/meson.build
deleted file mode 100644
index c370d7476..000000000
--- a/examples/performance-thread/meson.build
+++ /dev/null
@@ -1,10 +0,0 @@ 
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018 Intel Corporation
-
-# meson file, for building this example as part of a main DPDK build.
-#
-# To build this example as a standalone application with an already-installed
-# DPDK instance, use 'make'
-
-# Example app currently unsupported by meson build
-build = false