From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id CF3011B0F7 for ; Wed, 14 Nov 2018 14:06:51 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id j17-v6so17186380wrq.11 for ; Wed, 14 Nov 2018 05:06:51 -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=mBVU9zVFrv9t8YFTjI1y7pa9u0981d7t+1ukarPghis=; b=GT8NxxNKcXdJp/M0FOEODJhwZXHni7LB8CV8tfc8hkZA2EA7SdLghYB3TAa1VOQncD E0LBqEA3mOnywpVo/e2w+FlMVCVobBRQ+h+FY/vPjsL90cS/jp6/K292c7hgj+MWpB0U MKtZ+EpOoCVOAj++mZX/QoZJgcKLc/YcnS00PLOIuwibRLAT+QWTW7zYoPeY7vc+gPAy gzZ0bLbcpQBJXzZ4xmpaw9LG7ADqiQWB2wVo6igFS0z/fB0EsbD3AU9IFhWd/owNNJ3z bMbCoDVMPjjs8aQFqpbe57UN+8qvasI8tBtXpsMwsnZZ8Oskw+4cflu+4iLHsEm8BD9X tRHA== X-Gm-Message-State: AGRZ1gJIiY4kIM4uaVhAgMO8tZqODufJAlII+a0VWotCnGEQgBE44J6E dFqa/ppnBGstW7s/gIdq4Uc= X-Google-Smtp-Source: AJdET5cC5KQ9/++kEdD5lt1m97isI4jdGXqsGf9Td8cbv/IzBqzGmNpMc2pmCHfmNp1ACrmVqBxAcQ== X-Received: by 2002:adf:b608:: with SMTP id f8mr1754480wre.120.1542200811224; Wed, 14 Nov 2018 05:06:51 -0800 (PST) Received: from localhost ([2001:1be0:110d:fcfe:70c5:32f6:c5b6:39e6]) by smtp.gmail.com with ESMTPSA id k4sm25605494wrx.91.2018.11.14.05.06.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Nov 2018 05:06:49 -0800 (PST) Message-ID: <1542200809.11515.12.camel@debian.org> From: Luca Boccassi To: Christian Ehrhardt , dev Date: Wed, 14 Nov 2018 13:06:49 +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 13:06:52 -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' gcc complains, it wants armv7-a instead (tried on a native armhf machine, with the change the meson configure passes and ninja is now _slowly_ building its way through) > + 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 [] > =C2=A0 --=20 Kind regards, Luca Boccassi