[2/2] examples: enable building multiprocess applications
Checks
Commit Message
This enables building the example multiprocess applications in
the subdirectory multi_process.
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
---
examples/meson.build | 8 +++++++-
.../client_server_mp/mp_client/meson.build | 14 ++++++++++++++
.../client_server_mp/mp_server/meson.build | 14 ++++++++++++++
examples/multi_process/hotplug_mp/meson.build | 12 ++++++++++++
examples/multi_process/simple_mp/meson.build | 12 ++++++++++++
.../multi_process/{ => symmetric_mp}/meson.build | 8 +++++---
6 files changed, 64 insertions(+), 4 deletions(-)
create mode 100644 examples/multi_process/client_server_mp/mp_client/meson.build
create mode 100644 examples/multi_process/client_server_mp/mp_server/meson.build
create mode 100644 examples/multi_process/hotplug_mp/meson.build
create mode 100644 examples/multi_process/simple_mp/meson.build
rename examples/multi_process/{ => symmetric_mp}/meson.build (68%)
Comments
On Thu, May 23, 2019 at 02:54:13PM +0000, Ali Alnubani wrote:
> This enables building the example multiprocess applications in
> the subdirectory multi_process.
>
> Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
> ---
> examples/meson.build | 8 +++++++-
> .../client_server_mp/mp_client/meson.build | 14 ++++++++++++++
> .../client_server_mp/mp_server/meson.build | 14 ++++++++++++++
> examples/multi_process/hotplug_mp/meson.build | 12 ++++++++++++
> examples/multi_process/simple_mp/meson.build | 12 ++++++++++++
> .../multi_process/{ => symmetric_mp}/meson.build | 8 +++++---
> 6 files changed, 64 insertions(+), 4 deletions(-)
> create mode 100644 examples/multi_process/client_server_mp/mp_client/meson.build
> create mode 100644 examples/multi_process/client_server_mp/mp_server/meson.build
> create mode 100644 examples/multi_process/hotplug_mp/meson.build
> create mode 100644 examples/multi_process/simple_mp/meson.build
> rename examples/multi_process/{ => symmetric_mp}/meson.build (68%)
>
> diff --git a/examples/meson.build b/examples/meson.build
> index 53a786eb4..647114c23 100644
> --- a/examples/meson.build
> +++ b/examples/meson.build
> @@ -24,7 +24,7 @@ all_examples = [
> 'l2fwd-keepalive', 'l3fwd',
> 'l3fwd-acl', 'l3fwd-power',
> 'l3fwd-vf', 'link_status_interrupt',
> - 'load_balancer', 'multi_process',
> + 'load_balancer',
> 'netmap_compat', 'packet_ordering',
> 'performance-thread', 'ptpclient',
> 'qos_meter', 'qos_sched',
> @@ -35,6 +35,12 @@ all_examples = [
> 'vhost', 'vhost_crypto',
> 'vhost_scsi', 'vm_power_manager',
> 'vmdq', 'vmdq_dcb',
> + 'multi_process/simple_mp',
> + 'multi_process/hotplug_mp',
> + 'multi_process/symmetric_mp',
> + 'multi_process/client_server_mp/mp_server',
> + 'multi_process/client_server_mp/mp_client',
> +
> ]
Since these are in alphabetical order, I think we should keep the
multi-process apps in the list in the correct order, rather than at the end.
> # install all example code on install - irrespective of whether the example in
> # question is to be built as part of this build or not.
> diff --git a/examples/multi_process/client_server_mp/mp_client/meson.build b/examples/multi_process/client_server_mp/mp_client/meson.build
> new file mode 100644
> index 000000000..196c39fc5
> --- /dev/null
> +++ b/examples/multi_process/client_server_mp/mp_client/meson.build
> @@ -0,0 +1,14 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright 2019 Mellanox Technologies, Ltd
> +
> +# 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'
> +
> +includes += include_directories('../shared')
> +
> +name = 'mp_client'
I believe your previous patch in this set already set up the names
correctly for these apps, so I think you should remove this and the other
name assignment lines in the other files. I'd like to try and enforce
consistency in naming, and not having overrides of the name value in the
individual app meson.build files is key to enforcing that consistency.
Otherwise, thanks for doing this, and the rest of the patch looks fine to
me.
/Bruce
Hi Bruce,
Comments are inline.
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Thursday, May 23, 2019 6:33 PM
> To: Ali Alnubani <alialnu@mellanox.com>
> Cc: dev@dpdk.org; bluca@debian.org
> Subject: Re: [PATCH 2/2] examples: enable building multiprocess applications
>
> On Thu, May 23, 2019 at 02:54:13PM +0000, Ali Alnubani wrote:
> > This enables building the example multiprocess applications in the
> > subdirectory multi_process.
> >
> > Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
> > ---
> > examples/meson.build | 8 +++++++-
> > .../client_server_mp/mp_client/meson.build | 14 ++++++++++++++
> > .../client_server_mp/mp_server/meson.build | 14 ++++++++++++++
> > examples/multi_process/hotplug_mp/meson.build | 12 ++++++++++++
> > examples/multi_process/simple_mp/meson.build | 12 ++++++++++++
> > .../multi_process/{ => symmetric_mp}/meson.build | 8 +++++---
> > 6 files changed, 64 insertions(+), 4 deletions(-) create mode 100644
> > examples/multi_process/client_server_mp/mp_client/meson.build
> > create mode 100644
> > examples/multi_process/client_server_mp/mp_server/meson.build
> > create mode 100644 examples/multi_process/hotplug_mp/meson.build
> > create mode 100644 examples/multi_process/simple_mp/meson.build
> > rename examples/multi_process/{ => symmetric_mp}/meson.build (68%)
> >
> > diff --git a/examples/meson.build b/examples/meson.build index
> > 53a786eb4..647114c23 100644
> > --- a/examples/meson.build
> > +++ b/examples/meson.build
> > @@ -24,7 +24,7 @@ all_examples = [
> > 'l2fwd-keepalive', 'l3fwd',
> > 'l3fwd-acl', 'l3fwd-power',
> > 'l3fwd-vf', 'link_status_interrupt',
> > - 'load_balancer', 'multi_process',
> > + 'load_balancer',
> > 'netmap_compat', 'packet_ordering',
> > 'performance-thread', 'ptpclient',
> > 'qos_meter', 'qos_sched',
> > @@ -35,6 +35,12 @@ all_examples = [
> > 'vhost', 'vhost_crypto',
> > 'vhost_scsi', 'vm_power_manager',
> > 'vmdq', 'vmdq_dcb',
> > + 'multi_process/simple_mp',
> > + 'multi_process/hotplug_mp',
> > + 'multi_process/symmetric_mp',
> > + 'multi_process/client_server_mp/mp_server',
> > + 'multi_process/client_server_mp/mp_client',
> > +
> > ]
>
> Since these are in alphabetical order, I think we should keep the multi-
> process apps in the list in the correct order, rather than at the end.
Corrected in v2.
>
> > # install all example code on install - irrespective of whether the
> > example in # question is to be built as part of this build or not.
> > diff --git
> > a/examples/multi_process/client_server_mp/mp_client/meson.build
> > b/examples/multi_process/client_server_mp/mp_client/meson.build
> > new file mode 100644
> > index 000000000..196c39fc5
> > --- /dev/null
> > +++ b/examples/multi_process/client_server_mp/mp_client/meson.build
> > @@ -0,0 +1,14 @@
> > +# SPDX-License-Identifier: BSD-3-Clause # Copyright 2019 Mellanox
> > +Technologies, Ltd
> > +
> > +# 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'
> > +
> > +includes += include_directories('../shared')
> > +
> > +name = 'mp_client'
>
> I believe your previous patch in this set already set up the names correctly
> for these apps, so I think you should remove this and the other name
> assignment lines in the other files. I'd like to try and enforce consistency in
> naming, and not having overrides of the name value in the individual app
> meson.build files is key to enforcing that consistency.
I left those assignments from a previous version of the patchset, my bad.
Also corrected in v2.
>
> Otherwise, thanks for doing this, and the rest of the patch looks fine to me.
>
> /Bruce
I sent a v2, but realized I forgot to tag it. Sorry.
http://patches.dpdk.org/project/dpdk/list/?series=4761
Thanks,
Ali
@@ -24,7 +24,7 @@ all_examples = [
'l2fwd-keepalive', 'l3fwd',
'l3fwd-acl', 'l3fwd-power',
'l3fwd-vf', 'link_status_interrupt',
- 'load_balancer', 'multi_process',
+ 'load_balancer',
'netmap_compat', 'packet_ordering',
'performance-thread', 'ptpclient',
'qos_meter', 'qos_sched',
@@ -35,6 +35,12 @@ all_examples = [
'vhost', 'vhost_crypto',
'vhost_scsi', 'vm_power_manager',
'vmdq', 'vmdq_dcb',
+ 'multi_process/simple_mp',
+ 'multi_process/hotplug_mp',
+ 'multi_process/symmetric_mp',
+ 'multi_process/client_server_mp/mp_server',
+ 'multi_process/client_server_mp/mp_client',
+
]
# install all example code on install - irrespective of whether the example in
# question is to be built as part of this build or not.
new file mode 100644
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2019 Mellanox Technologies, Ltd
+
+# 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'
+
+includes += include_directories('../shared')
+
+name = 'mp_client'
+sources = files(
+ 'client.c'
+)
new file mode 100644
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2019 Mellanox Technologies, Ltd
+
+# 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'
+
+includes += include_directories('../shared')
+
+name = 'mp_server'
+sources = files(
+ 'args.c', 'init.c', 'main.c'
+)
new file mode 100644
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2019 Mellanox Technologies, Ltd
+
+# 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 = 'hotplug_mp'
+sources = files(
+ 'commands.c', 'main.c'
+)
new file mode 100644
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright 2019 Mellanox Technologies, Ltd
+
+# 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 = 'simple_mp'
+sources = files(
+ 'mp_commands.c', 'main.c'
+)
similarity index 68%
rename from examples/multi_process/meson.build
rename to examples/multi_process/symmetric_mp/meson.build
@@ -1,10 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018 Intel Corporation
+# Copyright 2019 Mellanox Technologies, Ltd
# 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 = 'symmetric_mp'
+sources = files(
+ 'main.c'
+)