build: add PPC64 Meson build
PATCH 1/1 build: add PPC64 Meson build
This has been only build-tested for now, on a native ppc64el POWER8E machine running Debian sid.
---
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
config/meson.build +8 -0
@@ -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))
config/ppc_64/meson.build new file +15 -0
@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +# 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)
lib/librte_eal/common/arch/ppc_64/meson.build new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +eal_common_arch_sources = files('rte_cpuflags.c', + 'rte_cycles.c', 'rte_hypervisor.c')
lib/librte_eal/common/include/arch/ppc_64/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +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'))
Signature · 1 line
2.18.0
Checked on ppc64, the build process is successful.
Quoted 9 lines
-----Original Message-----
From: Luca Boccassi [mailto:[email protected]]
Sent: 2018年9月8日 2:35
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH] build: add PPC64 Meson buildThis has been only build-tested for now, on a native ppc64el POWER8E
machine
Quoted 6 lines
running Debian sid.
Signed-off-by Luca Boccassi <[email protected]>---
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
Quoted 98 lines
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.buildconfig/meson.build index renamed from config/meson.build +0
-0
4d755323f4..8e87b344c2100644config/meson.build +6
-0@@ -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 @@ ifhost_machine.cpu_family().startswith('x86')
arch_subdir= 'x86'
elif host_machine.cpu_family().startswith('arm') or
host_machine.cpu_family().startswith('aarch')config/meson.build +2
-0arch_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
config/ppc_64/meson.build new file +15
-0@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca +Boccassi <[email protected]> + +# 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)lib/librte_eal/common/arch/ppc_64/meson.build new file +5
-0@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca +Boccassi <[email protected]> + +eal_common_arch_sources = files('rte_cpuflags.c', + 'rte_cycles.c', 'rte_hypervisor.c')lib/librte_eal/common/include/arch/ppc_64/meson.build new file +16
-1@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca +Boccassi <[email protected]> + +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')) --
Quoted 1 line
2.18.0
Quoted 23 lines · Luca Boccassi
This has been only build-tested for now, on a native ppc64el POWER8E machine running Debian sid.
Signed-off-by Luca Boccassi <[email protected]>---
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.buildconfig/meson.build +0
-0
config/meson.build else · line 18
Quoted 10 lines
config/meson.build +6
-0@@ -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?
Quoted 18 lines
config/meson.build +2
-0toolchain = 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))config/ppc_64/meson.build new file +0
-0
config/ppc_64/meson.build line 5
Quoted 5 lines
config/ppc_64/meson.build new file +5
-0@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +# 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"?
config/ppc_64/meson.build line 15
Quoted 10 lines
config/ppc_64/meson.build new file +10
-0+ +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
Quoted 35 lines · Bruce Richardson
Quoted 34 lines · Luca Boccassi
This has been only build-tested for now, on a native ppc64el POWER8E
machine running Debian sid.Signed-off-by Luca Boccassi <[email protected]>---
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 100644lib/librte_eal/common/arch/ppc_64/meson.buildcreate mode 100644lib/librte_eal/common/include/arch/ppc_64/meson.buildconfig/meson.build +0
-0@@ -9,7 +9,13 @@ elseendif
dpdk_conf.set('RTE_MACHINE', machine)
machine_args = []config/meson.build +2
-0+# ppc64 does not support -march=native +if host_machine.cpu_family().startswith('ppc') and machine ==
Quoted 8 lines
Quoted 6 lines
'native'
config/meson.build +3
-0+machine_args += '-mcpu=' + machine +machine_args += '-mtune=' + machine +elsemachine_args += '-march=' + machine
+endifIndentation?
Was left in the keyboard
Quoted 21 lines
Quoted 21 lines
toolchain =cc.get_id()
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)config/meson.build +0
-0@@ -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'config/meson.build +2
-0+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))config/ppc_64/meson.build new file +1
-0@@ -0,0 +1,15 @@ +# SPDX-License-Identifier: BSD-3-Clause
Quoted 8 lines
config/ppc_64/meson.build line 5
Quoted 4 lines
config/ppc_64/meson.build new file +4
-0+# Copyright(c) 2018 Luca Boccassi <[email protected]> + +# 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
Signature · 2 lines
Kind regards, Luca Boccassi
PATCH v2 1/1 build: add PPC64 Meson build
In reply to Luca BoccassiThis has been only build-tested for now, on a native ppc64el POWER8E machine running Debian sid.
---
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
config/meson.build +9 -1
@@ -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))
config/ppc_64/meson.build new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +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)
lib/librte_eal/common/arch/ppc_64/meson.build new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +eal_common_arch_sources = files('rte_cpuflags.c', + 'rte_cycles.c', 'rte_hypervisor.c')
lib/librte_eal/common/include/arch/ppc_64/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Luca Boccassi <[email protected]> + +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'))
Signature · 1 line
2.18.0
Quoted 7 lines · Luca Boccassi
This has been only build-tested for now, on a native ppc64el POWER8E machine running Debian sid.
Signed-off-by Luca Boccassi <[email protected]>---
v2: fix indentation, dropmarch_optin ppc build file
LGTM
Thomas Monjalon
Applied10/09/2018 15:28, Bruce Richardson:
Quoted 11 lines · Luca Boccassi
Quoted 7 lines
This has been only build-tested for now, on a native ppc64el POWER8E machine running Debian sid.
Signed-off-by Luca Boccassi <[email protected]>---
v2: fix indentation, dropmarch_optin ppc build fileLGTM
Acked-by Bruce Richardson <[email protected]>
Applied, thanks