From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id BCFF34CBB for ; Wed, 14 Nov 2018 12:53:00 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 03:52:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,232,1539673200"; d="scan'208";a="89207435" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by orsmga007.jf.intel.com with SMTP; 14 Nov 2018 03:52:57 -0800 Received: by (sSMTP sendmail emulation); Wed, 14 Nov 2018 11:52:57 +0000 Date: Wed, 14 Nov 2018 11:52:56 +0000 From: Bruce Richardson To: Luca Boccassi Cc: Christian Ehrhardt , dev Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1542195611.11515.10.camel@debian.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) 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:53:01 -0000 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). > > > > It defaults to the per arch agreed common minimal baseline > > needed for DPDK to reasonable work. > > > > That might not be the most optimized, but the most portable > > version while still being able to support the CPU features > > required for DPDK. > > > > Going forward this can be bumped up by the DPDK project, but it > > can never be an invariant like 'native'. > > > > Distributions and other needing portable code are expected to > > define the machine as 'baseline'. > > > > Signed-off-by: Christian Ehrhardt > > --- > >  config/meson.build | 21 +++++++++++++++++++++ > >  1 file changed, 21 insertions(+) > > > > 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() > >  else > >   machine = get_option('machine') > >  endif > > + > > +# 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 == 'baseline' > > + if host_machine.cpu_family().startswith('x86') > > + # matches the old pre-meson build systems default > > + machine = 'corei7' > > + elif host_machine.cpu_family().startswith('arm') > > + machine = 'armv7a' > > + elif host_machine.cpu_family().startswith('aarch') > > + # arm64 manages defaults in config/arm/meson.build > > + machine = 'default' > > + elif host_machine.cpu_family().startswith('ppc') > > + machine = 'power8' > > + endif > > +endif > > + > >  dpdk_conf.set('RTE_MACHINE', machine) > >  machine_args = [] > > Acked-by: Luca Boccassi > 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? /Bruce