From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH 2/2] build: establish an invariant machine type Date: Wed, 14 Nov 2018 11:40:11 +0000 Message-ID: <1542195611.11515.10.camel@debian.org> References: <20181114113453.24852-1-christian.ehrhardt@canonical.com> <20181114113453.24852-2-christian.ehrhardt@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To: Christian Ehrhardt , dev Return-path: Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id B37535F13 for ; Wed, 14 Nov 2018 12:40:13 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id r11-v6so15072015wmb.2 for ; Wed, 14 Nov 2018 03:40:13 -0800 (PST) In-Reply-To: <20181114113453.24852-2-christian.ehrhardt@canonical.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 2018-11-14 at 12:34 +0100, Christian Ehrhardt wrote: > Add the machine definition 'baseline' which is special compared > to 'native' (most optimized for current system) or any explicit > type (external entity has to decide on the type). >=20 > It defaults to the per arch agreed common minimal baseline > needed for DPDK to reasonable work. >=20 > That might not be the most optimized, but the most portable > version while still being able to support the CPU features > required for DPDK. >=20 > Going forward this can be bumped up by the DPDK project, but it > can never be an invariant like 'native'. >=20 > Distributions and other needing portable code are expected to > define the machine as 'baseline'. >=20 > Signed-off-by: Christian Ehrhardt > --- > =C2=A0config/meson.build | 21 +++++++++++++++++++++ > =C2=A01 file changed, 21 insertions(+) >=20 > diff --git a/config/meson.build b/config/meson.build > index 1af305f46..23f612457 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -7,6 +7,27 @@ if meson.is_cross_build() > =C2=A0else > =C2=A0 machine =3D get_option('machine') > =C2=A0endif > + > +# machine type 'baseline' is special, it defaults to the per arch > agreed common > +# minimal baseline needed for DPDK. > +# That might not be the most optimized, but the most portable > version while > +# still being able to support the CPU features required for DPDK. > +# This can be bumped up by the DPDK project, but it can never be an > +# invariant like 'native' > +if machine =3D=3D 'baseline' > + if host_machine.cpu_family().startswith('x86') > + # matches the old pre-meson build systems default > + machine =3D 'corei7' > + elif host_machine.cpu_family().startswith('arm') > + machine =3D 'armv7a' > + elif host_machine.cpu_family().startswith('aarch') > + # arm64 manages defaults in config/arm/meson.build > + machine =3D 'default' > + elif host_machine.cpu_family().startswith('ppc') > + machine =3D 'power8' > + endif > +endif > + > =C2=A0dpdk_conf.set('RTE_MACHINE', machine) > =C2=A0machine_args =3D [] Acked-by: Luca Boccassi --=20 Kind regards, Luca Boccassi