From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 04A8E1041 for ; Mon, 10 Sep 2018 09:26:47 +0200 (CEST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8A7Ndth038378 for ; Mon, 10 Sep 2018 03:26:47 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2mdm5e05rf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 10 Sep 2018 03:26:47 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 10 Sep 2018 08:26:45 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 10 Sep 2018 08:26:42 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8A7Qfwj60096754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Sep 2018 07:26:41 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C86A4C044; Mon, 10 Sep 2018 10:26:34 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C1324C046; Mon, 10 Sep 2018 10:26:32 +0100 (BST) Received: from ADMINIB2M8Q79C (unknown [9.186.104.45]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 10 Sep 2018 10:26:31 +0100 (BST) From: "Chao Zhu" To: "'Luca Boccassi'" , Cc: , , References: <20180907183502.26164-1-bluca@debian.org> In-Reply-To: <20180907183502.26164-1-bluca@debian.org> Date: Mon, 10 Sep 2018 15:26:41 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHf8REy/qXgjiDYHPhwes0VXJWFrqTRzMCw Content-Language: zh-cn X-TM-AS-GCONF: 00 x-cbid: 18091007-0012-0000-0000-000002A67C84 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091007-0013-0000-0000-000020DAB2E5 Message-Id: <000001d448d7$9ffea020$dffbe060$@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-09-10_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809100081 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 07:26:48 -0000 Checked on ppc64, the build process is successful.=20 > -----Original Message----- > From: Luca Boccassi [mailto:bluca@debian.org] > Sent: 2018=C4=EA9=D4=C28=C8=D5 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 >=20 > This has been only build-tested for now, on a native ppc64el POWER8E machine > running Debian sid. >=20 > 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. >=20 > 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 >=20 > 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 =3D [] > +# ppc64 does not support -march=3Dnative > +if host_machine.cpu_family().startswith('ppc') and machine =3D=3D = 'native' > +machine_args +=3D '-mcpu=3D' + machine > +machine_args +=3D '-mtune=3D' + machine > +else > machine_args +=3D '-march=3D' + machine > +endif >=20 > toolchain =3D cc.get_id() > dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) @@ -84,6 +90,8 @@ if > host_machine.cpu_family().startswith('x86') > arch_subdir =3D 'x86' > elif host_machine.cpu_family().startswith('arm') or > host_machine.cpu_family().startswith('aarch') > arch_subdir =3D 'arm' > +elif host_machine.cpu_family().startswith('ppc') > + arch_subdir =3D '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 =3D '-march=3D@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 > + > +eal_common_arch_sources =3D 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 > + > +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