From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id CCEEC5F2F for ; Wed, 14 Nov 2018 13:05:22 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id p2-v6so14450374wmc.2 for ; Wed, 14 Nov 2018 04:05:22 -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:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=veZCxmtSfqqc0aIMg/IYf3QDtaX+nhr6AY4ZD5YShzQ=; b=nog3dpa+NK+1lwUMfrbfNJjY7b37PFrW6Y4tghzcwWzLH8xT70NGYPe9LBYEU372DT OZ5OwKcwosDxO9pm9hQHg/Ehf/Awc8tcdEIYR3t1ngn2kbAP9XtCxvSGAfbLBZAUMroO Bqfzki1OVWHd+mCLS52X5kifhh2XpEU6YSL2FfSAYD2ED5DAtdKywQWPm2fKSayR5Z2I BaLdmnUXVIjvzydbCA1Z7sVvSKLbA0Eaov5UdhWgyTf4KSJW+bhkUqh/sLb21guUtXXR aTvtjLsmWo+OyaiMYIg5+WP3bmgnKdZqNAOz47B78zGdT3VjNVWfx9BfvGQ5zek+iNXp 7wnw== X-Gm-Message-State: AGRZ1gKbLQeK3q9ilJW3sx85s5gEFb+idBKN9zD1aexCJBTGGJxCrYW9 o7jOALGvEcYUwgR//PxR1aI= X-Google-Smtp-Source: AJdET5f7RbPb0wlgftkpTTCTPuulYRXbPrdZD+hTHrO9jQf/1geoLjb1FwvLtZyjlLl9DNP5DLgRag== X-Received: by 2002:a1c:2283:: with SMTP id i125-v6mr1753168wmi.42.1542197122192; Wed, 14 Nov 2018 04:05:22 -0800 (PST) Received: from localhost ([2001:1be0:110d:fcfe:70c5:32f6:c5b6:39e6]) by smtp.gmail.com with ESMTPSA id 74-v6sm20137466wmn.42.2018.11.14.04.05.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Nov 2018 04:05:21 -0800 (PST) Message-ID: <1542197120.11515.11.camel@debian.org> From: Luca Boccassi To: Bruce Richardson Cc: Christian Ehrhardt , dev Date: Wed, 14 Nov 2018 12:05:20 +0000 In-Reply-To: <20181114115256.GB17424@bricha3-MOBL.ger.corp.intel.com> References: <20181114113453.24852-1-christian.ehrhardt@canonical.com> <20181114113453.24852-2-christian.ehrhardt@canonical.com> <1542195611.11515.10.camel@debian.org> <20181114115256.GB17424@bricha3-MOBL.ger.corp.intel.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 12:05:22 -0000 On Wed, 2018-11-14 at 11:52 +0000, Bruce Richardson wrote: > On Wed, Nov 14, 2018 at 11:40:11AM +0000, Luca Boccassi wrote: > > 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 > > om> > > > --- > > > =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 [] > >=20 > > Acked-by: Luca Boccassi > >=20 >=20 > No objection in principle, but, for alignment with make build system, > do we > want to call this "default" instead? Given a clean slate, "baseline" > is more > descriptive, but make already uses "default" for this. Perhaps > support > both? >=20 > /Bruce I'm fine with both - but if make already has default, it makes sense to keep it consistent. --=20 Kind regards, Luca Boccassi