From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id ADD751B104 for ; Wed, 14 Nov 2018 14:10:22 +0100 (CET) Received: from mail-ed1-f71.google.com ([209.85.208.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gMuw2-0001XD-Ja for dev@dpdk.org; Wed, 14 Nov 2018 13:10:22 +0000 Received: by mail-ed1-f71.google.com with SMTP id e12so7718618edd.16 for ; Wed, 14 Nov 2018 05:10: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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B/X+KzXuFhmW4j4HTL4Ztf/WaQqSGmGif/hY42w6dM0=; b=kSF1Qy+49sMtT2k8htnSMH6JXlTmkcBTh9cEtM+Bd8+eoWy4acdtHeTCQzZAjJ5GMQ xyl79UDQyLdoqP2TAz0fBwv2QJCMkoiE6PfrBiTbrlVbUrU5XAYuN+oz0/dNX197IqjF Bh2rzkmwML8qmAcaYHL+EJDl1V56fk+BOrtLYlWG52Cq70yHeUfjGCTCWofT/X3krdft skAoa1yMZz7Hue1UQ9t+sQ7TjZLe4hDuX+HpHikUuFmxBbN75+w8Ix5fS/PFjTd5Gaem zinbGj6s4pu7nJt9KPjC0+MBoDCxjk8InHZ7JDl7fzcb+X8hLxyfOD6UvV/RiOgqclF1 rojg== X-Gm-Message-State: AGRZ1gKRWVjaWiauPwtAGYlnQRDuzruivh0sGuCo1QUFcYKboCVBGEjA +Cu26F78XVthe1yjMNl1agWIViRnEhxSNKowyVyiFE6M+iPdTAo9DEZoeKNGDsOq/egVZKezWsi v32rgspH8hVwRdA2gtDvfOzsSfz9iBvc7U8uA X-Received: by 2002:a50:a9c4:: with SMTP id n62-v6mr2087464edc.187.1542201022207; Wed, 14 Nov 2018 05:10:22 -0800 (PST) X-Google-Smtp-Source: AJdET5erXEy+LPPbYikJVva2NhtYYtHD1UNg7W8ELFRaeR9wMYxIc8ObdZlDxT8e9hJqjcR+gqtXNnpgTvraBuD+6Sc= X-Received: by 2002:a50:a9c4:: with SMTP id n62-v6mr2087452edc.187.1542201021957; Wed, 14 Nov 2018 05:10:21 -0800 (PST) MIME-Version: 1.0 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> <1542197120.11515.11.camel@debian.org> In-Reply-To: <1542197120.11515.11.camel@debian.org> From: Christian Ehrhardt Date: Wed, 14 Nov 2018 14:09:55 +0100 Message-ID: To: Luca Boccassi Cc: Bruce Richardson , dev Content-Type: text/plain; charset="UTF-8" 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:10:22 -0000 On Wed, Nov 14, 2018 at 1:05 PM Luca Boccassi wrote: > > 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). > > > > > > > > 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 > > > om> > > > > --- > > > > 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 > > I'm fine with both - but if make already has default, it makes sense to > keep it consistent. Yeah I agree for consistency, I just need to check for a v2 if none of them will misuse default to become native again > -- > Kind regards, > Luca Boccassi -- Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd