DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/8] support all examples in a meson build
@ 2019-10-14 11:34 Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 1/8] examples/bpf: remove from list of examples to build Bruce Richardson
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

When build with meson, some examples were skipped when "-Dexamples=all"
parameter was passed. Ignoring examples slated for removal by other
patches[1], this set adds support for building the rest of the examples.
The only exception is "bpf" which is a set of code snippets rather than
code to be natively run.

[1] http://patches.dpdk.org/project/dpdk/list/?series=6683

Bruce Richardson (8):
  examples/bpf: remove from list of examples to build
  examples/ethtool: allow building as part of meson build
  examples/performance-thread: remove warning disabling
  examples/performance-thread: rename directory to standard
  examples/performance-thread: add l3fwd-thread to meson
  examples/performance-thread: add pthread shim to meson
  examples/server_node_efd: add node binary to meson build
  examples/server_node_efd: add server binary to meson build

 examples/bpf/meson.build                      |  6 -----
 examples/ethtool/meson.build                  | 13 +++++++++--
 examples/meson.build                          | 10 +++++---
 .../common/arch/{arm64 => arm}/ctx.c          |  0
 .../common/arch/{arm64 => arm}/ctx.h          |  0
 .../common/arch/{arm64 => arm}/stack.h        |  0
 examples/performance-thread/common/common.mk  |  2 +-
 .../performance-thread/l3fwd-thread/Makefile  |  6 -----
 .../performance-thread/l3fwd-thread/main.c    |  4 ++--
 .../l3fwd-thread/meson.build                  | 22 ++++++++++++++++++
 .../pthread_shim/meson.build                  | 23 +++++++++++++++++++
 .../node}/meson.build                         |  9 +++++---
 .../server_node_efd/{ => server}/meson.build  |  9 +++++---
 13 files changed, 78 insertions(+), 26 deletions(-)
 delete mode 100644 examples/bpf/meson.build
 rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)
 rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.h (100%)
 rename examples/performance-thread/common/arch/{arm64 => arm}/stack.h (100%)
 create mode 100644 examples/performance-thread/l3fwd-thread/meson.build
 create mode 100644 examples/performance-thread/pthread_shim/meson.build
 rename examples/{performance-thread => server_node_efd/node}/meson.build (60%)
 rename examples/server_node_efd/{ => server}/meson.build (57%)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 1/8] examples/bpf: remove from list of examples to build
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 2/8] examples/ethtool: allow building as part of meson build Bruce Richardson
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The examples/bpf directory does not contain an example app, but rather
example code for use with testpmd's BPF support. Therefore, we should not
attempt to build it when the user requests "examples=all". This also
synchronises the meson behaviour with make which similarly doesn't compile
up the code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/bpf/meson.build | 6 ------
 examples/meson.build     | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
 delete mode 100644 examples/bpf/meson.build

diff --git a/examples/bpf/meson.build b/examples/bpf/meson.build
deleted file mode 100644
index 0a817aaea..000000000
--- a/examples/bpf/meson.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-# This contains BPF example code for use in testing BPF with testpmd,
-# therefore it should not be built as part of a meson build.
-build=false
diff --git a/examples/meson.build b/examples/meson.build
index e4580f74a..9de6618ef 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -11,7 +11,7 @@ execinfo = cc.find_library('execinfo', required: false)
 # list of all example apps. Keep 1-3 per line, in alphabetical order.
 all_examples = [
 	'bbdev_app', 'bond',
-	'bpf', 'cmdline',
+	'cmdline',
 	'distributor', 'ethtool',
 	'eventdev_pipeline',
 	'fips_validation', 'flow_classify',
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 2/8] examples/ethtool: allow building as part of meson build
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 1/8] examples/bpf: remove from list of examples to build Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 3/8] examples/performance-thread: remove warning disabling Bruce Richardson
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Since the code for the ethtool example was contained in subdirectories the
compilation of this example is different from most of the other apps, and
it had not been abled when the user requests a build with "-Dexamples=all".

To simplify the build with meson, the separate ethtool library is not build
separately, rather the app is built as a single entity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/ethtool/meson.build | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build
index c370d7476..603396bae 100644
--- a/examples/ethtool/meson.build
+++ b/examples/ethtool/meson.build
@@ -6,5 +6,14 @@
 # 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
+sources = files('lib/rte_ethtool.c',
+	'ethtool-app/ethapp.c',
+	'ethtool-app/main.c')
+includes = include_directories('lib', 'ethtool-app')
+
+deps += 'bus_pci'
+if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
+	deps += 'pmd_ixgbe'
+endif
+
+allow_experimental_apis = true
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 3/8] examples/performance-thread: remove warning disabling
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 1/8] examples/bpf: remove from list of examples to build Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 2/8] examples/ethtool: allow building as part of meson build Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard Bruce Richardson
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The warnings about functions not returning values can be removed from the
code by just adding an attribute to the function to specify it doesn't
return. The GCC bug referenced in the makefile which prevents this from
working has been fixed for >10 years according to bugzilla.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/l3fwd-thread/Makefile | 6 ------
 examples/performance-thread/l3fwd-thread/main.c   | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile
index 1a1c95829..b14b21e30 100644
--- a/examples/performance-thread/l3fwd-thread/Makefile
+++ b/examples/performance-thread/l3fwd-thread/Makefile
@@ -20,10 +20,4 @@ include $(RTE_SDK)/examples/performance-thread/common/common.mk
 
 CFLAGS += -O3 -g $(USER_FLAGS) $(INCLUDES) $(WERROR_FLAGS)
 
-# workaround for a gcc bug with noreturn attribute
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
-#ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
-CFLAGS_main.o += -Wno-return-type
-#endif
-
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 00f535053..d9af5c78d 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1877,7 +1877,7 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 /*
  * CPU-load stats collector
  */
-static int
+static int __attribute__((noreturn))
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
 	uint64_t hits;
@@ -2299,7 +2299,7 @@ sched_spawner(__rte_unused void *arg) {
 }
 
 /* main processing loop */
-static int
+static int __attribute__((noreturn))
 pthread_tx(void *dummy)
 {
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (2 preceding siblings ...)
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 3/8] examples/performance-thread: remove warning disabling Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 16:16   ` Jerin Jacob
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 5/8] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

In other places in DPDK, e.g. EAL, the architecture-specific files for arm
are just stored in a folder called "arm". Rename the "arm64" folder for
performance thread example to align to this naming.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/common/arch/{arm64 => arm}/ctx.c   | 0
 examples/performance-thread/common/arch/{arm64 => arm}/ctx.h   | 0
 examples/performance-thread/common/arch/{arm64 => arm}/stack.h | 0
 examples/performance-thread/common/common.mk                   | 2 +-
 4 files changed, 1 insertion(+), 1 deletion(-)
 rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)
 rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.h (100%)
 rename examples/performance-thread/common/arch/{arm64 => arm}/stack.h (100%)

diff --git a/examples/performance-thread/common/arch/arm64/ctx.c b/examples/performance-thread/common/arch/arm/ctx.c
similarity index 100%
rename from examples/performance-thread/common/arch/arm64/ctx.c
rename to examples/performance-thread/common/arch/arm/ctx.c
diff --git a/examples/performance-thread/common/arch/arm64/ctx.h b/examples/performance-thread/common/arch/arm/ctx.h
similarity index 100%
rename from examples/performance-thread/common/arch/arm64/ctx.h
rename to examples/performance-thread/common/arch/arm/ctx.h
diff --git a/examples/performance-thread/common/arch/arm64/stack.h b/examples/performance-thread/common/arch/arm/stack.h
similarity index 100%
rename from examples/performance-thread/common/arch/arm64/stack.h
rename to examples/performance-thread/common/arch/arm/stack.h
diff --git a/examples/performance-thread/common/common.mk b/examples/performance-thread/common/common.mk
index 5e2b18a9f..021e61aea 100644
--- a/examples/performance-thread/common/common.mk
+++ b/examples/performance-thread/common/common.mk
@@ -11,7 +11,7 @@ MKFILE_PATH=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
 ifeq ($(CONFIG_RTE_ARCH_X86_64),y)
 ARCH_PATH += $(MKFILE_PATH)/arch/x86
 else ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
-ARCH_PATH += $(MKFILE_PATH)/arch/arm64
+ARCH_PATH += $(MKFILE_PATH)/arch/arm
 endif
 
 VPATH := $(MKFILE_PATH) $(ARCH_PATH)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 5/8] examples/performance-thread: add l3fwd-thread to meson
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (3 preceding siblings ...)
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 6/8] examples/performance-thread: add pthread shim " Bruce Richardson
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

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>
---
 examples/meson.build                          |  3 ++-
 .../l3fwd-thread/meson.build                  | 22 +++++++++++++++++++
 examples/performance-thread/meson.build       | 10 ---------
 3 files changed, 24 insertions(+), 11 deletions(-)
 create mode 100644 examples/performance-thread/l3fwd-thread/meson.build
 delete mode 100644 examples/performance-thread/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 9de6618ef..7dedc787d 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -30,7 +30,8 @@ all_examples = [
 	'multi_process/simple_mp',
 	'multi_process/symmetric_mp',
 	'ntb', 'packet_ordering',
-	'performance-thread', 'ptpclient',
+	'performance-thread/l3fwd-thread',
+	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'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..f25f201ce
--- /dev/null
+++ b/examples/performance-thread/l3fwd-thread/meson.build
@@ -0,0 +1,22 @@
+# 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']
+
+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',
+	'../common/arch/@0@/ctx.c'.format(arch_subdir))
+
+includes += include_directories('../common',
+	'../common/arch/@0@'.format(arch_subdir))
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
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 6/8] examples/performance-thread: add pthread shim to meson
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (4 preceding siblings ...)
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 5/8] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 7/8] examples/server_node_efd: add node binary to meson build Bruce Richardson
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                          |  1 +
 .../pthread_shim/meson.build                  | 23 +++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 examples/performance-thread/pthread_shim/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 7dedc787d..ff4e8608c 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -31,6 +31,7 @@ all_examples = [
 	'multi_process/symmetric_mp',
 	'ntb', 'packet_ordering',
 	'performance-thread/l3fwd-thread',
+	'performance-thread/pthread_shim',
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'rxtx_callbacks',
diff --git a/examples/performance-thread/pthread_shim/meson.build b/examples/performance-thread/pthread_shim/meson.build
new file mode 100644
index 000000000..4feec05a7
--- /dev/null
+++ b/examples/performance-thread/pthread_shim/meson.build
@@ -0,0 +1,23 @@
+# 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') or dpdk_conf.has('RTE_ARCH_ARM64')
+deps += ['timer']
+
+sources += files('main.c',
+	'pthread_shim.c',
+	'../common/lthread.c',
+	'../common/lthread_cond.c',
+	'../common/lthread_diag.c',
+	'../common/lthread_mutex.c',
+	'../common/lthread_sched.c',
+	'../common/lthread_tls.c',
+	'../common/arch/@0@/ctx.c'.format(arch_subdir))
+
+includes += include_directories('../common',
+	'../common/arch/@0@'.format(arch_subdir))
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 7/8] examples/server_node_efd: add node binary to meson build
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (5 preceding siblings ...)
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 6/8] examples/performance-thread: add pthread shim " Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 8/8] examples/server_node_efd: add server " Bruce Richardson
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                            | 3 ++-
 examples/server_node_efd/{ => node}/meson.build | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
 rename examples/server_node_efd/{ => node}/meson.build (60%)

diff --git a/examples/meson.build b/examples/meson.build
index ff4e8608c..352921ea8 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -35,7 +35,8 @@ all_examples = [
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'rxtx_callbacks',
-	'server_node_efd', 'service_cores',
+	'server_node_efd/node',
+	'service_cores',
 	'skeleton', 'tep_termination',
 	'timer', 'vdpa',
 	'vhost', 'vhost_crypto',
diff --git a/examples/server_node_efd/meson.build b/examples/server_node_efd/node/meson.build
similarity index 60%
rename from examples/server_node_efd/meson.build
rename to examples/server_node_efd/node/meson.build
index c370d7476..30f28761f 100644
--- a/examples/server_node_efd/meson.build
+++ b/examples/server_node_efd/node/meson.build
@@ -1,10 +1,13 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018 Intel Corporation
+# 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'
 
-# Example app currently unsupported by meson build
-build = false
+name = 'efd_node'
+
+deps += ['hash']
+sources += files('node.c')
+includes += include_directories('../shared')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH 8/8] examples/server_node_efd: add server binary to meson build
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (6 preceding siblings ...)
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 7/8] examples/server_node_efd: add node binary to meson build Bruce Richardson
@ 2019-10-14 11:34 ` Bruce Richardson
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 11:34 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                        |  1 +
 examples/server_node_efd/server/meson.build | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 examples/server_node_efd/server/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 352921ea8..4bc1e17af 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -36,6 +36,7 @@ all_examples = [
 	'qos_meter', 'qos_sched',
 	'rxtx_callbacks',
 	'server_node_efd/node',
+	'server_node_efd/server',
 	'service_cores',
 	'skeleton', 'tep_termination',
 	'timer', 'vdpa',
diff --git a/examples/server_node_efd/server/meson.build b/examples/server_node_efd/server/meson.build
new file mode 100644
index 000000000..23e08d1ae
--- /dev/null
+++ b/examples/server_node_efd/server/meson.build
@@ -0,0 +1,13 @@
+# 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'
+
+name = 'efd_server'
+
+deps += 'efd'
+sources += files('args.c', 'init.c', 'main.c')
+includes += include_directories('../shared')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard Bruce Richardson
@ 2019-10-14 16:16   ` Jerin Jacob
  2019-10-14 16:41     ` Bruce Richardson
  0 siblings, 1 reply; 33+ messages in thread
From: Jerin Jacob @ 2019-10-14 16:16 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk-dev

On Mon, Oct 14, 2019 at 5:05 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> In other places in DPDK, e.g. EAL, the architecture-specific files for arm
> are just stored in a folder called "arm". Rename the "arm64" folder for
> performance thread example to align to this naming.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  examples/performance-thread/common/arch/{arm64 => arm}/ctx.c   | 0
>  examples/performance-thread/common/arch/{arm64 => arm}/ctx.h   | 0
>  examples/performance-thread/common/arch/{arm64 => arm}/stack.h | 0
>  examples/performance-thread/common/common.mk                   | 2 +-
>  4 files changed, 1 insertion(+), 1 deletion(-)
>  rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)

This code only works for arm64 as it is storing and restoring arm64 registers.
armv7 registers are different so this code does not work for the generic arm.

arm64 specific code, we always named as arm64

F: lib/librte_hash/rte*_arm64.h
F: lib/librte_efd/rte*_arm64.h
F: lib/librte_table/rte*_arm64.h

IMO, If armv7 support adds in future then we can change the directory
as arch/arm
and have ctx_64.c and ctx_32.c etc. I think, for now, technically it
is correct to call the directory as arm64

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard
  2019-10-14 16:16   ` Jerin Jacob
@ 2019-10-14 16:41     ` Bruce Richardson
  0 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-14 16:41 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dpdk-dev

On Mon, Oct 14, 2019 at 09:46:50PM +0530, Jerin Jacob wrote:
> On Mon, Oct 14, 2019 at 5:05 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > In other places in DPDK, e.g. EAL, the architecture-specific files for arm
> > are just stored in a folder called "arm". Rename the "arm64" folder for
> > performance thread example to align to this naming.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  examples/performance-thread/common/arch/{arm64 => arm}/ctx.c   | 0
> >  examples/performance-thread/common/arch/{arm64 => arm}/ctx.h   | 0
> >  examples/performance-thread/common/arch/{arm64 => arm}/stack.h | 0
> >  examples/performance-thread/common/common.mk                   | 2 +-
> >  4 files changed, 1 insertion(+), 1 deletion(-)
> >  rename examples/performance-thread/common/arch/{arm64 => arm}/ctx.c (100%)
> 
> This code only works for arm64 as it is storing and restoring arm64 registers.
> armv7 registers are different so this code does not work for the generic arm.
> 
> arm64 specific code, we always named as arm64
> 
> F: lib/librte_hash/rte*_arm64.h
> F: lib/librte_efd/rte*_arm64.h
> F: lib/librte_table/rte*_arm64.h
> 
> IMO, If armv7 support adds in future then we can change the directory
> as arch/arm
> and have ctx_64.c and ctx_32.c etc. I think, for now, technically it
> is correct to call the directory as arm64

Ok, fair enough. The code isn't meant to build for ARMv7 so I thought I'd
save some logic by just using x86 and arm, rather than having to compute
the directory names individually.

I'll rework the patch.

/Bruce

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 0/7] support all examples in a meson build
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (7 preceding siblings ...)
  2019-10-14 11:34 ` [dpdk-dev] [PATCH 8/8] examples/server_node_efd: add server " Bruce Richardson
@ 2019-10-15 13:35 ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 1/7] examples/bpf: remove from list of examples to build Bruce Richardson
                     ` (7 more replies)
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
  9 siblings, 8 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

When build with meson, some examples were skipped when "-Dexamples=all"
parameter was passed. Ignoring examples slated for removal by other
patches[1], this set adds support for building the rest of the examples.
The only exception is "bpf" which is a set of code snippets rather than
code to be natively run.

V2: drop patch 4 renaming the arm64 directory.

[1] http://patches.dpdk.org/project/dpdk/list/?series=6683


Bruce Richardson (7):
  examples/bpf: remove from list of examples to build
  examples/ethtool: allow building as part of meson build
  examples/performance-thread: remove warning disabling
  examples/performance-thread: add l3fwd-thread to meson
  examples/performance-thread: add pthread shim to meson
  examples/server_node_efd: add node binary to meson build
  examples/server_node_efd: add server binary to meson build

 examples/bpf/meson.build                      |  6 ----
 examples/ethtool/meson.build                  | 13 +++++++--
 examples/meson.build                          | 10 +++++--
 .../performance-thread/l3fwd-thread/Makefile  |  6 ----
 .../performance-thread/l3fwd-thread/main.c    |  4 +--
 .../l3fwd-thread/meson.build                  | 27 ++++++++++++++++++
 .../pthread_shim/meson.build                  | 28 +++++++++++++++++++
 .../node}/meson.build                         |  9 ++++--
 .../server_node_efd/{ => server}/meson.build  |  9 ++++--
 9 files changed, 87 insertions(+), 25 deletions(-)
 delete mode 100644 examples/bpf/meson.build
 create mode 100644 examples/performance-thread/l3fwd-thread/meson.build
 create mode 100644 examples/performance-thread/pthread_shim/meson.build
 rename examples/{performance-thread => server_node_efd/node}/meson.build (60%)
 rename examples/server_node_efd/{ => server}/meson.build (57%)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 1/7] examples/bpf: remove from list of examples to build
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 2/7] examples/ethtool: allow building as part of meson build Bruce Richardson
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

The examples/bpf directory does not contain an example app, but rather
example code for use with testpmd's BPF support. Therefore, we should not
attempt to build it when the user requests "examples=all". This also
synchronises the meson behaviour with make which similarly doesn't compile
up the code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/bpf/meson.build | 6 ------
 examples/meson.build     | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
 delete mode 100644 examples/bpf/meson.build

diff --git a/examples/bpf/meson.build b/examples/bpf/meson.build
deleted file mode 100644
index 0a817aaea..000000000
--- a/examples/bpf/meson.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-# This contains BPF example code for use in testing BPF with testpmd,
-# therefore it should not be built as part of a meson build.
-build=false
diff --git a/examples/meson.build b/examples/meson.build
index a046b74ad..e40ab68da 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -11,7 +11,7 @@ execinfo = cc.find_library('execinfo', required: false)
 # list of all example apps. Keep 1-3 per line, in alphabetical order.
 all_examples = [
 	'bbdev_app', 'bond',
-	'bpf', 'cmdline',
+	'cmdline',
 	'distributor', 'ethtool',
 	'eventdev_pipeline', 'exception_path',
 	'fips_validation', 'flow_classify',
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 2/7] examples/ethtool: allow building as part of meson build
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 1/7] examples/bpf: remove from list of examples to build Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 3/7] examples/performance-thread: remove warning disabling Bruce Richardson
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

Since the code for the ethtool example was contained in subdirectories the
compilation of this example is different from most of the other apps, and
it had not been abled when the user requests a build with "-Dexamples=all".

To simplify the build with meson, the separate ethtool library is not build
separately, rather the app is built as a single entity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/ethtool/meson.build | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build
index c370d7476..603396bae 100644
--- a/examples/ethtool/meson.build
+++ b/examples/ethtool/meson.build
@@ -6,5 +6,14 @@
 # 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
+sources = files('lib/rte_ethtool.c',
+	'ethtool-app/ethapp.c',
+	'ethtool-app/main.c')
+includes = include_directories('lib', 'ethtool-app')
+
+deps += 'bus_pci'
+if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
+	deps += 'pmd_ixgbe'
+endif
+
+allow_experimental_apis = true
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 3/7] examples/performance-thread: remove warning disabling
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 1/7] examples/bpf: remove from list of examples to build Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 2/7] examples/ethtool: allow building as part of meson build Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 4/7] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

The warnings about functions not returning values can be removed from the
code by just adding an attribute to the function to specifies it doesn't
return. The GCC bug referenced in the makefile which prevents this from
working has been fixed for >10 years according to bugzilla.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/l3fwd-thread/Makefile | 6 ------
 examples/performance-thread/l3fwd-thread/main.c   | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile
index 1a1c95829..b14b21e30 100644
--- a/examples/performance-thread/l3fwd-thread/Makefile
+++ b/examples/performance-thread/l3fwd-thread/Makefile
@@ -20,10 +20,4 @@ include $(RTE_SDK)/examples/performance-thread/common/common.mk
 
 CFLAGS += -O3 -g $(USER_FLAGS) $(INCLUDES) $(WERROR_FLAGS)
 
-# workaround for a gcc bug with noreturn attribute
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
-#ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
-CFLAGS_main.o += -Wno-return-type
-#endif
-
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 122c63244..ad540fd84 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1877,7 +1877,7 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 /*
  * CPU-load stats collector
  */
-static int
+static int __attribute__((noreturn))
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
 	uint64_t hits;
@@ -2299,7 +2299,7 @@ sched_spawner(__rte_unused void *arg) {
 }
 
 /* main processing loop */
-static int
+static int __attribute__((noreturn))
 pthread_tx(void *dummy)
 {
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 4/7] examples/performance-thread: add l3fwd-thread to meson
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
                     ` (2 preceding siblings ...)
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 3/7] examples/performance-thread: remove warning disabling Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 5/7] examples/performance-thread: add pthread shim " Bruce Richardson
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

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>
---
 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

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
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 5/7] examples/performance-thread: add pthread shim to meson
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
                     ` (3 preceding siblings ...)
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 4/7] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 6/7] examples/server_node_efd: add node binary to meson build Bruce Richardson
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                          |  1 +
 .../pthread_shim/meson.build                  | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 examples/performance-thread/pthread_shim/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 889bb6b2c..8ef81446f 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -32,6 +32,7 @@ all_examples = [
 	'multi_process/symmetric_mp',
 	'netmap_compat', 'ntb', 'packet_ordering',
 	'performance-thread/l3fwd-thread',
+	'performance-thread/pthread_shim',
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
diff --git a/examples/performance-thread/pthread_shim/meson.build b/examples/performance-thread/pthread_shim/meson.build
new file mode 100644
index 000000000..393fbd122
--- /dev/null
+++ b/examples/performance-thread/pthread_shim/meson.build
@@ -0,0 +1,28 @@
+# 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') or dpdk_conf.has('RTE_ARCH_ARM64')
+deps += ['timer']
+
+# 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',
+	'pthread_shim.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)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 6/7] examples/server_node_efd: add node binary to meson build
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
                     ` (4 preceding siblings ...)
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 5/7] examples/performance-thread: add pthread shim " Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 7/7] examples/server_node_efd: add server " Bruce Richardson
  2019-10-16 11:47   ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Luca Boccassi
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                            | 3 ++-
 examples/server_node_efd/{ => node}/meson.build | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
 rename examples/server_node_efd/{ => node}/meson.build (60%)

diff --git a/examples/meson.build b/examples/meson.build
index 8ef81446f..6f5f00ec7 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -36,7 +36,8 @@ all_examples = [
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
-	'server_node_efd', 'service_cores',
+	'server_node_efd/node',
+	'service_cores',
 	'skeleton', 'tep_termination',
 	'timer', 'vdpa',
 	'vhost', 'vhost_crypto',
diff --git a/examples/server_node_efd/meson.build b/examples/server_node_efd/node/meson.build
similarity index 60%
rename from examples/server_node_efd/meson.build
rename to examples/server_node_efd/node/meson.build
index c370d7476..30f28761f 100644
--- a/examples/server_node_efd/meson.build
+++ b/examples/server_node_efd/node/meson.build
@@ -1,10 +1,13 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018 Intel Corporation
+# 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'
 
-# Example app currently unsupported by meson build
-build = false
+name = 'efd_node'
+
+deps += ['hash']
+sources += files('node.c')
+includes += include_directories('../shared')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v2 7/7] examples/server_node_efd: add server binary to meson build
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
                     ` (5 preceding siblings ...)
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 6/7] examples/server_node_efd: add node binary to meson build Bruce Richardson
@ 2019-10-15 13:35   ` Bruce Richardson
  2019-10-16 11:47   ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Luca Boccassi
  7 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-15 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerinjacobk, bluca, Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                        |  1 +
 examples/server_node_efd/server/meson.build | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 examples/server_node_efd/server/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 6f5f00ec7..8a15dafcf 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -37,6 +37,7 @@ all_examples = [
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
 	'server_node_efd/node',
+	'server_node_efd/server',
 	'service_cores',
 	'skeleton', 'tep_termination',
 	'timer', 'vdpa',
diff --git a/examples/server_node_efd/server/meson.build b/examples/server_node_efd/server/meson.build
new file mode 100644
index 000000000..23e08d1ae
--- /dev/null
+++ b/examples/server_node_efd/server/meson.build
@@ -0,0 +1,13 @@
+# 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'
+
+name = 'efd_server'
+
+deps += 'efd'
+sources += files('args.c', 'init.c', 'main.c')
+includes += include_directories('../shared')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/7] support all examples in a meson build
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
                     ` (6 preceding siblings ...)
  2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 7/7] examples/server_node_efd: add server " Bruce Richardson
@ 2019-10-16 11:47   ` Luca Boccassi
  7 siblings, 0 replies; 33+ messages in thread
From: Luca Boccassi @ 2019-10-16 11:47 UTC (permalink / raw)
  To: Bruce Richardson, dev

On Tue, 2019-10-15 at 14:35 +0100, Bruce Richardson wrote:
> When build with meson, some examples were skipped when "-
> Dexamples=all"
> parameter was passed. Ignoring examples slated for removal by other
> patches[1], this set adds support for building the rest of the
> examples.
> The only exception is "bpf" which is a set of code snippets rather
> than
> code to be natively run.
> 
> V2: drop patch 4 renaming the arm64 directory.
> 
> [1] 
> http://patches.dpdk.org/project/dpdk/list/?series=6683
> 
> 
> 
> Bruce Richardson (7):
>   examples/bpf: remove from list of examples to build
>   examples/ethtool: allow building as part of meson build
>   examples/performance-thread: remove warning disabling
>   examples/performance-thread: add l3fwd-thread to meson
>   examples/performance-thread: add pthread shim to meson
>   examples/server_node_efd: add node binary to meson build
>   examples/server_node_efd: add server binary to meson build

Series-acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 0/9] support all examples in a meson build
  2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
                   ` (8 preceding siblings ...)
  2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
@ 2019-10-22 15:43 ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 1/9] examples/bpf: remove from list of examples to build Bruce Richardson
                     ` (9 more replies)
  9 siblings, 10 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

When build with meson, some examples were skipped when "-Dexamples=all"
parameter was passed. Ignoring examples slated for removal by other
patches[1], this set adds support for building the rest of the examples.
The only exception is "bpf" which is a set of code snippets rather than
code to be natively run.

V3: add missing guest_cli example subdirectory
    disable ethtool on FreeBSD builds
    fix errors building server_node_efd/server on FreeBSD

V2: drop patch 4 renaming the arm64 directory.

[1] http://patches.dpdk.org/project/dpdk/list/?series=6683

Bruce Richardson (9):
  examples/bpf: remove from list of examples to build
  examples/ethtool: allow building as part of meson build
  examples/performance-thread: remove warning disabling
  examples/performance-thread: add l3fwd-thread to meson
  examples/performance-thread: add pthread shim to meson
  examples/server_node_efd: add node binary to meson build
  examples/server_node_efd: add server binary to meson build
  examples/guest_cli: fix type of cmdline token
  examples/guest_cli: add power manager guest cli to meson

 examples/bpf/meson.build                      |  6 ----
 examples/ethtool/meson.build                  | 14 ++++++++--
 examples/meson.build                          | 11 ++++++--
 .../performance-thread/l3fwd-thread/Makefile  |  6 ----
 .../performance-thread/l3fwd-thread/main.c    |  4 +--
 .../l3fwd-thread/meson.build                  | 27 ++++++++++++++++++
 .../pthread_shim/meson.build                  | 28 +++++++++++++++++++
 .../node}/meson.build                         |  9 ++++--
 examples/server_node_efd/server/main.c        |  2 ++
 .../server_node_efd/{ => server}/meson.build  |  9 ++++--
 .../vm_power_manager/guest_cli/meson.build    |  4 ---
 .../guest_cli/vm_power_cli_guest.c            |  2 +-
 12 files changed, 92 insertions(+), 30 deletions(-)
 delete mode 100644 examples/bpf/meson.build
 create mode 100644 examples/performance-thread/l3fwd-thread/meson.build
 create mode 100644 examples/performance-thread/pthread_shim/meson.build
 rename examples/{performance-thread => server_node_efd/node}/meson.build (60%)
 rename examples/server_node_efd/{ => server}/meson.build (57%)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 1/9] examples/bpf: remove from list of examples to build
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 2/9] examples/ethtool: allow building as part of meson build Bruce Richardson
                     ` (8 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

The examples/bpf directory does not contain an example app, but rather
example code for use with testpmd's BPF support. Therefore, we should not
attempt to build it when the user requests "examples=all". This also
synchronises the meson behaviour with make which similarly doesn't compile
up the code.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/bpf/meson.build | 6 ------
 examples/meson.build     | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
 delete mode 100644 examples/bpf/meson.build

diff --git a/examples/bpf/meson.build b/examples/bpf/meson.build
deleted file mode 100644
index 0a817aaea..000000000
--- a/examples/bpf/meson.build
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2019 Intel Corporation
-
-# This contains BPF example code for use in testing BPF with testpmd,
-# therefore it should not be built as part of a meson build.
-build=false
diff --git a/examples/meson.build b/examples/meson.build
index a046b74ad..e40ab68da 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -11,7 +11,7 @@ execinfo = cc.find_library('execinfo', required: false)
 # list of all example apps. Keep 1-3 per line, in alphabetical order.
 all_examples = [
 	'bbdev_app', 'bond',
-	'bpf', 'cmdline',
+	'cmdline',
 	'distributor', 'ethtool',
 	'eventdev_pipeline', 'exception_path',
 	'fips_validation', 'flow_classify',
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 2/9] examples/ethtool: allow building as part of meson build
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 1/9] examples/bpf: remove from list of examples to build Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 3/9] examples/performance-thread: remove warning disabling Bruce Richardson
                     ` (7 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

Since the code for the ethtool example was contained in subdirectories the
compilation of this example is different from most of the other apps, and
it had not been abled when the user requests a build with "-Dexamples=all".

To simplify the build with meson, the separate ethtool library is not build
separately, rather the app is built as a single entity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
V3: disable on non-linux
---
 examples/ethtool/meson.build | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/examples/ethtool/meson.build b/examples/ethtool/meson.build
index c370d7476..bc7a35514 100644
--- a/examples/ethtool/meson.build
+++ b/examples/ethtool/meson.build
@@ -6,5 +6,15 @@
 # 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
+build = is_linux
+sources = files('lib/rte_ethtool.c',
+	'ethtool-app/ethapp.c',
+	'ethtool-app/main.c')
+includes = include_directories('lib', 'ethtool-app')
+
+deps += 'bus_pci'
+if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
+	deps += 'pmd_ixgbe'
+endif
+
+allow_experimental_apis = true
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 3/9] examples/performance-thread: remove warning disabling
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 1/9] examples/bpf: remove from list of examples to build Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 2/9] examples/ethtool: allow building as part of meson build Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 4/9] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
                     ` (6 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

The warnings about functions not returning values can be removed from the
code by just adding an attribute to the function to specifies it doesn't
return. The GCC bug referenced in the makefile which prevents this from
working has been fixed for >10 years according to bugzilla.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/performance-thread/l3fwd-thread/Makefile | 6 ------
 examples/performance-thread/l3fwd-thread/main.c   | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile
index 1a1c95829..b14b21e30 100644
--- a/examples/performance-thread/l3fwd-thread/Makefile
+++ b/examples/performance-thread/l3fwd-thread/Makefile
@@ -20,10 +20,4 @@ include $(RTE_SDK)/examples/performance-thread/common/common.mk
 
 CFLAGS += -O3 -g $(USER_FLAGS) $(INCLUDES) $(WERROR_FLAGS)
 
-# workaround for a gcc bug with noreturn attribute
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
-#ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
-CFLAGS_main.o += -Wno-return-type
-#endif
-
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 122c63244..ad540fd84 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1877,7 +1877,7 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 /*
  * CPU-load stats collector
  */
-static int
+static int __attribute__((noreturn))
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
 	uint64_t hits;
@@ -2299,7 +2299,7 @@ sched_spawner(__rte_unused void *arg) {
 }
 
 /* main processing loop */
-static int
+static int __attribute__((noreturn))
 pthread_tx(void *dummy)
 {
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 4/9] examples/performance-thread: add l3fwd-thread to meson
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (2 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 3/9] examples/performance-thread: remove warning disabling Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 5/9] examples/performance-thread: add pthread shim " Bruce Richardson
                     ` (5 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

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

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
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 5/9] examples/performance-thread: add pthread shim to meson
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (3 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 4/9] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 6/9] examples/server_node_efd: add node binary to meson build Bruce Richardson
                     ` (4 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build                          |  1 +
 .../pthread_shim/meson.build                  | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 examples/performance-thread/pthread_shim/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 889bb6b2c..8ef81446f 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -32,6 +32,7 @@ all_examples = [
 	'multi_process/symmetric_mp',
 	'netmap_compat', 'ntb', 'packet_ordering',
 	'performance-thread/l3fwd-thread',
+	'performance-thread/pthread_shim',
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
diff --git a/examples/performance-thread/pthread_shim/meson.build b/examples/performance-thread/pthread_shim/meson.build
new file mode 100644
index 000000000..393fbd122
--- /dev/null
+++ b/examples/performance-thread/pthread_shim/meson.build
@@ -0,0 +1,28 @@
+# 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') or dpdk_conf.has('RTE_ARCH_ARM64')
+deps += ['timer']
+
+# 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',
+	'pthread_shim.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)
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 6/9] examples/server_node_efd: add node binary to meson build
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (4 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 5/9] examples/performance-thread: add pthread shim " Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 7/9] examples/server_node_efd: add server " Bruce Richardson
                     ` (3 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/meson.build                            | 3 ++-
 examples/server_node_efd/{ => node}/meson.build | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)
 rename examples/server_node_efd/{ => node}/meson.build (60%)

diff --git a/examples/meson.build b/examples/meson.build
index 8ef81446f..6f5f00ec7 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -36,7 +36,8 @@ all_examples = [
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
-	'server_node_efd', 'service_cores',
+	'server_node_efd/node',
+	'service_cores',
 	'skeleton', 'tep_termination',
 	'timer', 'vdpa',
 	'vhost', 'vhost_crypto',
diff --git a/examples/server_node_efd/meson.build b/examples/server_node_efd/node/meson.build
similarity index 60%
rename from examples/server_node_efd/meson.build
rename to examples/server_node_efd/node/meson.build
index c370d7476..30f28761f 100644
--- a/examples/server_node_efd/meson.build
+++ b/examples/server_node_efd/node/meson.build
@@ -1,10 +1,13 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018 Intel Corporation
+# 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'
 
-# Example app currently unsupported by meson build
-build = false
+name = 'efd_node'
+
+deps += ['hash']
+sources += files('node.c')
+includes += include_directories('../shared')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 7/9] examples/server_node_efd: add server binary to meson build
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (5 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 6/9] examples/server_node_efd: add node binary to meson build Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token Bruce Richardson
                     ` (2 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Luca Boccassi

When adding to the build, add in two missing includes that prevented build
on freebsd, rather than just duplicating the makefile restriction.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
V3: add in missing headers for build compilation
---
 examples/meson.build                        |  1 +
 examples/server_node_efd/server/main.c      |  2 ++
 examples/server_node_efd/server/meson.build | 13 +++++++++++++
 3 files changed, 16 insertions(+)
 create mode 100644 examples/server_node_efd/server/meson.build

diff --git a/examples/meson.build b/examples/meson.build
index 6f5f00ec7..8a15dafcf 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -37,6 +37,7 @@ all_examples = [
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
 	'server_node_efd/node',
+	'server_node_efd/server',
 	'service_cores',
 	'skeleton', 'tep_termination',
 	'timer', 'vdpa',
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index 455bdc063..21c72acda 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -11,6 +11,8 @@
 #include <inttypes.h>
 #include <sys/queue.h>
 #include <errno.h>
+#include <sys/types.h>
+#include <netinet/in.h>
 #include <netinet/ip.h>
 
 #include <rte_common.h>
diff --git a/examples/server_node_efd/server/meson.build b/examples/server_node_efd/server/meson.build
new file mode 100644
index 000000000..23e08d1ae
--- /dev/null
+++ b/examples/server_node_efd/server/meson.build
@@ -0,0 +1,13 @@
+# 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'
+
+name = 'efd_server'
+
+deps += 'efd'
+sources += files('args.c', 'init.c', 'main.c')
+includes += include_directories('../shared')
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (6 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 7/9] examples/server_node_efd: add server " Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-23 10:40     ` Hunt, David
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson Bruce Richardson
  2019-10-27 16:28   ` [dpdk-dev] [PATCH v3 0/9] support all examples in a meson build Thomas Monjalon
  9 siblings, 1 reply; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

Building the example with clang gives the error:

  error: expression which evaluates to zero treated as a null pointer
  constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
                        lcore_id, UINT8);
                                  ^~~~~

This error is due to the wrong data type being given for the
cmd_set_cpu_freq_core_num value - it was specified as string rather than
numeric type.

Fixes: f5e5c3347ae3 ("examples/vm_power: cli in guest")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index fe09b0778..610d9aeac 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -171,7 +171,7 @@ cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,
 cmdline_parse_token_string_t cmd_set_cpu_freq =
 	TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
 			set_cpu_freq, "set_cpu_freq");
-cmdline_parse_token_string_t cmd_set_cpu_freq_core_num =
+cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
 	TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
 			lcore_id, UINT8);
 cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (7 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token Bruce Richardson
@ 2019-10-22 15:43   ` Bruce Richardson
  2019-10-23 10:38     ` Hunt, David
  2019-10-27 16:28   ` [dpdk-dev] [PATCH v3 0/9] support all examples in a meson build Thomas Monjalon
  9 siblings, 1 reply; 33+ messages in thread
From: Bruce Richardson @ 2019-10-22 15:43 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                            | 1 +
 examples/vm_power_manager/guest_cli/meson.build | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index 8a15dafcf..5a235545a 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -43,6 +43,7 @@ all_examples = [
 	'timer', 'vdpa',
 	'vhost', 'vhost_crypto',
 	'vhost_scsi', 'vm_power_manager',
+	'vm_power_manager/guest_cli',
 	'vmdq', 'vmdq_dcb',
 ]
 # install all example code on install - irrespective of whether the example in
diff --git a/examples/vm_power_manager/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build
index 38bd8d837..2b490424f 100644
--- a/examples/vm_power_manager/guest_cli/meson.build
+++ b/examples/vm_power_manager/guest_cli/meson.build
@@ -6,10 +6,6 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-# Setting the name here because the default name will conflict with the
-# vm_power_manager app because of the way the directories are parsed.
-name = 'guest_cli'
-
 if not dpdk_conf.has('RTE_LIBRTE_POWER')
         build = false
         subdir_done()
-- 
2.21.0


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson Bruce Richardson
@ 2019-10-23 10:38     ` Hunt, David
  0 siblings, 0 replies; 33+ messages in thread
From: Hunt, David @ 2019-10-23 10:38 UTC (permalink / raw)
  To: Bruce Richardson, dev


On 22/10/2019 16:43, Bruce Richardson wrote:
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   examples/meson.build                            | 1 +
>   examples/vm_power_manager/guest_cli/meson.build | 4 ----
>   2 files changed, 1 insertion(+), 4 deletions(-)
>

Acked-by: David Hunt <david.hunt@intel.com>



^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token Bruce Richardson
@ 2019-10-23 10:40     ` Hunt, David
  0 siblings, 0 replies; 33+ messages in thread
From: Hunt, David @ 2019-10-23 10:40 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: stable


On 22/10/2019 16:43, Bruce Richardson wrote:
> Building the example with clang gives the error:
>
>    error: expression which evaluates to zero treated as a null pointer
>    constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
>                          lcore_id, UINT8);
>                                    ^~~~~
>
> This error is due to the wrong data type being given for the
> cmd_set_cpu_freq_core_num value - it was specified as string rather than
> numeric type.
>
> Fixes: f5e5c3347ae3 ("examples/vm_power: cli in guest")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---


Acked-by: David Hunt <david.hunt@intel.com>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [dpdk-dev] [PATCH v3 0/9] support all examples in a meson build
  2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
                     ` (8 preceding siblings ...)
  2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson Bruce Richardson
@ 2019-10-27 16:28   ` Thomas Monjalon
  9 siblings, 0 replies; 33+ messages in thread
From: Thomas Monjalon @ 2019-10-27 16:28 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

> Bruce Richardson (9):
>   examples/bpf: remove from list of examples to build
>   examples/ethtool: allow building as part of meson build
>   examples/performance-thread: remove warning disabling
>   examples/performance-thread: add l3fwd-thread to meson
>   examples/performance-thread: add pthread shim to meson
>   examples/server_node_efd: add node binary to meson build
>   examples/server_node_efd: add server binary to meson build
>   examples/guest_cli: fix type of cmdline token
>   examples/guest_cli: add power manager guest cli to meson

Applied, thanks




^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2019-10-27 16:29 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 1/8] examples/bpf: remove from list of examples to build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 2/8] examples/ethtool: allow building as part of meson build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 3/8] examples/performance-thread: remove warning disabling Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard Bruce Richardson
2019-10-14 16:16   ` Jerin Jacob
2019-10-14 16:41     ` Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 5/8] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 6/8] examples/performance-thread: add pthread shim " Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 7/8] examples/server_node_efd: add node binary to meson build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 8/8] examples/server_node_efd: add server " Bruce Richardson
2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 1/7] examples/bpf: remove from list of examples to build Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 2/7] examples/ethtool: allow building as part of meson build Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 3/7] examples/performance-thread: remove warning disabling Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 4/7] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 5/7] examples/performance-thread: add pthread shim " Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 6/7] examples/server_node_efd: add node binary to meson build Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 7/7] examples/server_node_efd: add server " Bruce Richardson
2019-10-16 11:47   ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Luca Boccassi
2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 1/9] examples/bpf: remove from list of examples to build Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 2/9] examples/ethtool: allow building as part of meson build Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 3/9] examples/performance-thread: remove warning disabling Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 4/9] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 5/9] examples/performance-thread: add pthread shim " Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 6/9] examples/server_node_efd: add node binary to meson build Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 7/9] examples/server_node_efd: add server " Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token Bruce Richardson
2019-10-23 10:40     ` Hunt, David
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson Bruce Richardson
2019-10-23 10:38     ` Hunt, David
2019-10-27 16:28   ` [dpdk-dev] [PATCH v3 0/9] support all examples in a meson build Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).