* Re: [dpdk-dev] [PATCH] build: add PPC64 Meson build
2018-09-07 18:35 [dpdk-dev] [PATCH] build: add PPC64 Meson build Luca Boccassi
@ 2018-09-10 7:26 ` Chao Zhu
2018-09-10 10:50 ` Bruce Richardson
2018-09-10 11:32 ` [dpdk-dev] [PATCH v2] " Luca Boccassi
2 siblings, 0 replies; 7+ messages in thread
From: Chao Zhu @ 2018-09-10 7:26 UTC (permalink / raw)
To: 'Luca Boccassi', dev; +Cc: christian.ehrhardt, bruce.richardson, thomas
Checked on ppc64, the build process is successful.
> -----Original Message-----
> From: Luca Boccassi [mailto:bluca@debian.org]
> Sent: 2018年9月8日 2:35
> To: dev@dpdk.org
> Cc: chaozhu@linux.vnet.ibm.com; christian.ehrhardt@canonical.com;
> bruce.richardson@intel.com; thomas@monjalon.net
> Subject: [PATCH] build: add PPC64 Meson build
>
> This has been only build-tested for now, on a native ppc64el POWER8E
machine
> running Debian sid.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> The build box cannot be used to run DPDK as it doesn't have supported NICs
> and root access. Would be great if someone could run-test it, but at this
point I
> think build support is enough to get started.
>
> config/meson.build | 8 ++++++++
> config/ppc_64/meson.build | 15
> +++++++++++++++
> lib/librte_eal/common/arch/ppc_64/meson.build | 5 +++++
> .../common/include/arch/ppc_64/meson.build | 16
> ++++++++++++++++
> 4 files changed, 44 insertions(+)
> create mode 100644 config/ppc_64/meson.build create mode 100644
> lib/librte_eal/common/arch/ppc_64/meson.build
> create mode 100644 lib/librte_eal/common/include/arch/ppc_64/meson.build
>
> diff --git a/config/meson.build b/config/meson.build index
> 4d755323f4..8e87b344c2 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -9,7 +9,13 @@ else
> endif
> dpdk_conf.set('RTE_MACHINE', machine)
> machine_args = []
> +# ppc64 does not support -march=native
> +if host_machine.cpu_family().startswith('ppc') and machine == 'native'
> +machine_args += '-mcpu=' + machine
> +machine_args += '-mtune=' + machine
> +else
> machine_args += '-march=' + machine
> +endif
>
> toolchain = cc.get_id()
> dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) @@ -84,6 +90,8 @@ if
> host_machine.cpu_family().startswith('x86')
> arch_subdir = 'x86'
> elif host_machine.cpu_family().startswith('arm') or
> host_machine.cpu_family().startswith('aarch')
> arch_subdir = 'arm'
> +elif host_machine.cpu_family().startswith('ppc')
> + arch_subdir = 'ppc_64'
> endif
> subdir(arch_subdir)
> dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS',
> ','.join(compile_time_cpuflags)) diff --git a/config/ppc_64/meson.build
> b/config/ppc_64/meson.build new file mode 100644 index
> 0000000000..d6faa7d64f
> --- /dev/null
> +++ b/config/ppc_64/meson.build
> @@ -0,0 +1,15 @@
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca
> +Boccassi <bluca@debian.org>
> +
> +# for checking defines we need to use the correct compiler flags
> +march_opt = '-march=@0@'.format(machine)
> +
> +dpdk_conf.set('RTE_ARCH', 'ppc_64')
> +dpdk_conf.set('RTE_ARCH_PPC_64', 1)
> +dpdk_conf.set('RTE_ARCH_64', 1)
> +
> +# overrides specific to ppc64
> +dpdk_conf.set('RTE_MAX_LCORE', 256)
> +dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
> +dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
> +dpdk_conf.set('RTE_MAX_LCORE', 256)
> diff --git a/lib/librte_eal/common/arch/ppc_64/meson.build
> b/lib/librte_eal/common/arch/ppc_64/meson.build
> new file mode 100644
> index 0000000000..40b3dc533a
> --- /dev/null
> +++ b/lib/librte_eal/common/arch/ppc_64/meson.build
> @@ -0,0 +1,5 @@
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca
> +Boccassi <bluca@debian.org>
> +
> +eal_common_arch_sources = files('rte_cpuflags.c',
> + 'rte_cycles.c', 'rte_hypervisor.c')
> diff --git a/lib/librte_eal/common/include/arch/ppc_64/meson.build
> b/lib/librte_eal/common/include/arch/ppc_64/meson.build
> new file mode 100644
> index 0000000000..00f9611768
> --- /dev/null
> +++ b/lib/librte_eal/common/include/arch/ppc_64/meson.build
> @@ -0,0 +1,16 @@
> +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca
> +Boccassi <bluca@debian.org>
> +
> +install_headers(
> + 'rte_atomic.h',
> + 'rte_byteorder.h',
> + 'rte_cpuflags.h',
> + 'rte_cycles.h',
> + 'rte_io.h',
> + 'rte_memcpy.h',
> + 'rte_pause.h',
> + 'rte_prefetch.h',
> + 'rte_rwlock.h',
> + 'rte_spinlock.h',
> + 'rte_vect.h',
> + subdir: get_option('include_subdir_arch'))
> --
> 2.18.0
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] build: add PPC64 Meson build
2018-09-07 18:35 [dpdk-dev] [PATCH] build: add PPC64 Meson build Luca Boccassi
2018-09-10 7:26 ` Chao Zhu
@ 2018-09-10 10:50 ` Bruce Richardson
2018-09-10 11:33 ` Luca Boccassi
2018-09-10 11:32 ` [dpdk-dev] [PATCH v2] " Luca Boccassi
2 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2018-09-10 10:50 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev, chaozhu, christian.ehrhardt, thomas
On Fri, Sep 07, 2018 at 07:35:02PM +0100, Luca Boccassi wrote:
> This has been only build-tested for now, on a native ppc64el POWER8E
> machine running Debian sid.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> The build box cannot be used to run DPDK as it doesn't have supported
> NICs and root access. Would be great if someone could run-test it, but
> at this point I think build support is enough to get started.
>
> config/meson.build | 8 ++++++++
> config/ppc_64/meson.build | 15 +++++++++++++++
> lib/librte_eal/common/arch/ppc_64/meson.build | 5 +++++
> .../common/include/arch/ppc_64/meson.build | 16 ++++++++++++++++
> 4 files changed, 44 insertions(+)
> create mode 100644 config/ppc_64/meson.build
> create mode 100644 lib/librte_eal/common/arch/ppc_64/meson.build
> create mode 100644 lib/librte_eal/common/include/arch/ppc_64/meson.build
>
> diff --git a/config/meson.build b/config/meson.build
> index 4d755323f4..8e87b344c2 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -9,7 +9,13 @@ else
> endif
> dpdk_conf.set('RTE_MACHINE', machine)
> machine_args = []
> +# ppc64 does not support -march=native
> +if host_machine.cpu_family().startswith('ppc') and machine == 'native'
> +machine_args += '-mcpu=' + machine
> +machine_args += '-mtune=' + machine
> +else
> machine_args += '-march=' + machine
> +endif
Indentation?
>
> toolchain = cc.get_id()
> dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
> @@ -84,6 +90,8 @@ if host_machine.cpu_family().startswith('x86')
> arch_subdir = 'x86'
> elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
> arch_subdir = 'arm'
> +elif host_machine.cpu_family().startswith('ppc')
> + arch_subdir = 'ppc_64'
> endif
> subdir(arch_subdir)
> dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
> diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build
> new file mode 100644
> index 0000000000..d6faa7d64f
> --- /dev/null
> +++ b/config/ppc_64/meson.build
> @@ -0,0 +1,15 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
> +
> +# for checking defines we need to use the correct compiler flags
> +march_opt = '-march=@0@'.format(machine)
This contradicts the statement above in config/meson.build where you state
that ppc64 doesn't support "-march=native"?
> +
> +dpdk_conf.set('RTE_ARCH', 'ppc_64')
> +dpdk_conf.set('RTE_ARCH_PPC_64', 1)
> +dpdk_conf.set('RTE_ARCH_64', 1)
> +
> +# overrides specific to ppc64
> +dpdk_conf.set('RTE_MAX_LCORE', 256)
> +dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
> +dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
> +dpdk_conf.set('RTE_MAX_LCORE', 256)
<snip>
/Bruce
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] build: add PPC64 Meson build
2018-09-10 10:50 ` Bruce Richardson
@ 2018-09-10 11:33 ` Luca Boccassi
0 siblings, 0 replies; 7+ messages in thread
From: Luca Boccassi @ 2018-09-10 11:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, chaozhu, christian.ehrhardt, thomas
On Mon, 2018-09-10 at 11:50 +0100, Bruce Richardson wrote:
> On Fri, Sep 07, 2018 at 07:35:02PM +0100, Luca Boccassi wrote:
> > This has been only build-tested for now, on a native ppc64el
> > POWER8E
> > machine running Debian sid.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > The build box cannot be used to run DPDK as it doesn't have
> > supported
> > NICs and root access. Would be great if someone could run-test it,
> > but
> > at this point I think build support is enough to get started.
> >
> > config/meson.build | 8 ++++++++
> > config/ppc_64/meson.build | 15
> > +++++++++++++++
> > lib/librte_eal/common/arch/ppc_64/meson.build | 5 +++++
> > .../common/include/arch/ppc_64/meson.build | 16
> > ++++++++++++++++
> > 4 files changed, 44 insertions(+)
> > create mode 100644 config/ppc_64/meson.build
> > create mode 100644 lib/librte_eal/common/arch/ppc_64/meson.build
> > create mode 100644
> > lib/librte_eal/common/include/arch/ppc_64/meson.build
> >
> > diff --git a/config/meson.build b/config/meson.build
> > index 4d755323f4..8e87b344c2 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -9,7 +9,13 @@ else
> > endif
> > dpdk_conf.set('RTE_MACHINE', machine)
> > machine_args = []
> > +# ppc64 does not support -march=native
> > +if host_machine.cpu_family().startswith('ppc') and machine ==
> > 'native'
> > +machine_args += '-mcpu=' + machine
> > +machine_args += '-mtune=' + machine
> > +else
> > machine_args += '-march=' + machine
> > +endif
>
> Indentation?
Was left in the keyboard
> >
> > toolchain = cc.get_id()
> > dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
> > @@ -84,6 +90,8 @@ if host_machine.cpu_family().startswith('x86')
> > arch_subdir = 'x86'
> > elif host_machine.cpu_family().startswith('arm') or
> > host_machine.cpu_family().startswith('aarch')
> > arch_subdir = 'arm'
> > +elif host_machine.cpu_family().startswith('ppc')
> > + arch_subdir = 'ppc_64'
> > endif
> > subdir(arch_subdir)
> > dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS',
> > ','.join(compile_time_cpuflags))
> > diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build
> > new file mode 100644
> > index 0000000000..d6faa7d64f
> > --- /dev/null
> > +++ b/config/ppc_64/meson.build
> > @@ -0,0 +1,15 @@
> > +# SPDX-License-Identifier: BSD-3-Clause
> > +# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
> > +
> > +# for checking defines we need to use the correct compiler flags
> > +march_opt = '-march=@0@'.format(machine)
>
> This contradicts the statement above in config/meson.build where you
> state
> that ppc64 doesn't support "-march=native"?
Yeah I copy-pasted the arm file to get started, but it doesn't seem to
me march_opt is used anywhere else other than in the x86 specific file,
so I've dropped that line in v2
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] build: add PPC64 Meson build
2018-09-07 18:35 [dpdk-dev] [PATCH] build: add PPC64 Meson build Luca Boccassi
2018-09-10 7:26 ` Chao Zhu
2018-09-10 10:50 ` Bruce Richardson
@ 2018-09-10 11:32 ` Luca Boccassi
2018-09-10 13:28 ` Bruce Richardson
2 siblings, 1 reply; 7+ messages in thread
From: Luca Boccassi @ 2018-09-10 11:32 UTC (permalink / raw)
To: dev; +Cc: chaozhu, christian.ehrhardt, bruce.richardson, thomas
This has been only build-tested for now, on a native ppc64el POWER8E
machine running Debian sid.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
v2: fix indentation, drop march_opt in ppc build file
config/meson.build | 10 +++++++++-
config/ppc_64/meson.build | 11 +++++++++++
lib/librte_eal/common/arch/ppc_64/meson.build | 5 +++++
.../common/include/arch/ppc_64/meson.build | 16 ++++++++++++++++
4 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 config/ppc_64/meson.build
create mode 100644 lib/librte_eal/common/arch/ppc_64/meson.build
create mode 100644 lib/librte_eal/common/include/arch/ppc_64/meson.build
diff --git a/config/meson.build b/config/meson.build
index 4d755323f4..6f9228c874 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -9,7 +9,13 @@ else
endif
dpdk_conf.set('RTE_MACHINE', machine)
machine_args = []
-machine_args += '-march=' + machine
+# ppc64 does not support -march=native
+if host_machine.cpu_family().startswith('ppc') and machine == 'native'
+ machine_args += '-mcpu=' + machine
+ machine_args += '-mtune=' + machine
+else
+ machine_args += '-march=' + machine
+endif
toolchain = cc.get_id()
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
@@ -84,6 +90,8 @@ if host_machine.cpu_family().startswith('x86')
arch_subdir = 'x86'
elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
arch_subdir = 'arm'
+elif host_machine.cpu_family().startswith('ppc')
+ arch_subdir = 'ppc_64'
endif
subdir(arch_subdir)
dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build
new file mode 100644
index 0000000000..e207c438bf
--- /dev/null
+++ b/config/ppc_64/meson.build
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+
+dpdk_conf.set('RTE_ARCH', 'ppc_64')
+dpdk_conf.set('RTE_ARCH_PPC_64', 1)
+dpdk_conf.set('RTE_ARCH_64', 1)
+
+# overrides specific to ppc64
+dpdk_conf.set('RTE_MAX_LCORE', 256)
+dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
+dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
diff --git a/lib/librte_eal/common/arch/ppc_64/meson.build b/lib/librte_eal/common/arch/ppc_64/meson.build
new file mode 100644
index 0000000000..40b3dc533a
--- /dev/null
+++ b/lib/librte_eal/common/arch/ppc_64/meson.build
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+
+eal_common_arch_sources = files('rte_cpuflags.c',
+ 'rte_cycles.c', 'rte_hypervisor.c')
diff --git a/lib/librte_eal/common/include/arch/ppc_64/meson.build b/lib/librte_eal/common/include/arch/ppc_64/meson.build
new file mode 100644
index 0000000000..00f9611768
--- /dev/null
+++ b/lib/librte_eal/common/include/arch/ppc_64/meson.build
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+
+install_headers(
+ 'rte_atomic.h',
+ 'rte_byteorder.h',
+ 'rte_cpuflags.h',
+ 'rte_cycles.h',
+ 'rte_io.h',
+ 'rte_memcpy.h',
+ 'rte_pause.h',
+ 'rte_prefetch.h',
+ 'rte_rwlock.h',
+ 'rte_spinlock.h',
+ 'rte_vect.h',
+ subdir: get_option('include_subdir_arch'))
--
2.18.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] build: add PPC64 Meson build
2018-09-10 11:32 ` [dpdk-dev] [PATCH v2] " Luca Boccassi
@ 2018-09-10 13:28 ` Bruce Richardson
2018-09-17 10:22 ` Thomas Monjalon
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2018-09-10 13:28 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev, chaozhu, christian.ehrhardt, thomas
On Mon, Sep 10, 2018 at 12:32:43PM +0100, Luca Boccassi wrote:
> This has been only build-tested for now, on a native ppc64el POWER8E
> machine running Debian sid.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: fix indentation, drop march_opt in ppc build file
>
LGTM
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] build: add PPC64 Meson build
2018-09-10 13:28 ` Bruce Richardson
@ 2018-09-17 10:22 ` Thomas Monjalon
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2018-09-17 10:22 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dev, Bruce Richardson, chaozhu, christian.ehrhardt
10/09/2018 15:28, Bruce Richardson:
> On Mon, Sep 10, 2018 at 12:32:43PM +0100, Luca Boccassi wrote:
> > This has been only build-tested for now, on a native ppc64el POWER8E
> > machine running Debian sid.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > v2: fix indentation, drop march_opt in ppc build file
> >
> LGTM
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread