From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=j331w3ujwzdDBytY+C2GqyAuq7IgndqsIsuuhTQrigY=; b=UUvCfmDxSsVyd+GbH6QkkAHbMw00yUp/sSGHi7lBXcDy+tQ1hNQN3WSQsAZOXdejDQ Ps09NuFE+Pjx0o8QGppwVow8wJR7i+wfHF9AJOb2JJkFywiZSS/Omd1JmNoDy+VtWID8 vVgaNQom5eQe9fLEYUSWUsHKOHPVY38QHNh+JgIQT+WgQ0dkAAgrf5PLNsoKD80VgGjd QtYpfQ0BCmVaUa6eEF7drP5chcmMKrrbQkVL9feIANm3ZabGmaf3SsXeT1NUReZDqTAj aIoni860QJmM1hbJM0t1t7O4dDeQmnv4lccjH54MZ6etMJIgbKyKA2/HeL14wT0TL0Mx mUEg== X-Gm-Message-State: AGRZ1gJtzV+Q/j/7XxF5vFXbQ0IUOnBksCGK+lzLsdr0nF0Aaia0jQXv DwCLcOj2NHJQsyedlgLdE5w= X-Google-Smtp-Source: AJdET5f+SM5Lx56ROgXFtn0HA2nbzlB/zPKQcwZRYF2evswSArQt5MtacYQYnjXFpN8jewIEiVAEEg== X-Received: by 2002:a1c:154a:: with SMTP id 71-v6mr1483433wmv.83.1542195613285; Wed, 14 Nov 2018 03:40:13 -0800 (PST) Received: from localhost ([2001:1be0:110d:fcfe:70c5:32f6:c5b6:39e6]) by smtp.gmail.com with ESMTPSA id p17-v6sm10627070wmc.16.2018.11.14.03.40.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Nov 2018 03:40:12 -0800 (PST) Message-ID: <1542195611.11515.10.camel@debian.org> From: Luca Boccassi To: Christian Ehrhardt , dev Date: Wed, 14 Nov 2018 11:40:11 +0000 In-Reply-To: <20181114113453.24852-2-christian.ehrhardt@canonical.com> References: <20181114113453.24852-1-christian.ehrhardt@canonical.com> <20181114113453.24852-2-christian.ehrhardt@canonical.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] build: establish an invariant machine type 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: Wed, 14 Nov 2018 11:40:13 -0000 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