From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id EC77A1041 for ; Mon, 10 Sep 2018 12:50:48 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 03:50:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,355,1531810800"; d="scan'208";a="90400110" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by orsmga002.jf.intel.com with SMTP; 10 Sep 2018 03:50:31 -0700 Received: by (sSMTP sendmail emulation); Mon, 10 Sep 2018 11:50:29 +0100 Date: Mon, 10 Sep 2018 11:50:29 +0100 From: Bruce Richardson To: Luca Boccassi Cc: dev@dpdk.org, chaozhu@linux.vnet.ibm.com, christian.ehrhardt@canonical.com, thomas@monjalon.net Message-ID: <20180910105029.GB24376@bricha3-MOBL.ger.corp.intel.com> References: <20180907183502.26164-1-bluca@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180907183502.26164-1-bluca@debian.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH] build: add PPC64 Meson build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2018 10:50:49 -0000 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 > --- > 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 > + > +# 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) /Bruce