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 E12E21B101 for ; Wed, 14 Nov 2018 14:08:59 +0100 (CET) Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gMuuh-0001TM-PI for dev@dpdk.org; Wed, 14 Nov 2018 13:08:59 +0000 Received: by mail-ed1-f72.google.com with SMTP id h25-v6so8234146eds.21 for ; Wed, 14 Nov 2018 05:08:59 -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=55JVOHXeap8DHUL+KZeXWjRw8kCHT+DxWHhWkjXqWbI=; b=tkDWxs0NyGZpQbfwye1jbMfPnSyjsxPLeSYCeHUoRSZbZSrMWvphdxGewUeGgkbA/M WT2dfl53F+e9yr9qpSbL4I8yNa8yX/e2rR8nlQoP6ICQeQIj4dMahLOUoYSQW6xTUXBF DKMPqhpQb3R8bYAP5FNiCSPP+lILHFaMb6gPPWT5845nvOG4P+uz8W2BvilOi2LDF7QM DUJAXrIhBdMBF4lDLMRwt8M+3wcSVtz7grlndgGsrOyxLydqGXm03EDH8SKksfcTXPqF DrZ/6d0tFu7oAtfPJtwwYfg+1IscJkaKSzIPmT2q6K9HMTG1FOMlP3EWmCqIApuNqcSn sPLQ== X-Gm-Message-State: AGRZ1gLq2D+Puiw7tKJraYxJ+l1cO7f56fv2q4OgELW9jzm/4TkOb42e s6PO1vy2FTh1aBYpF87nPxX031CanSb9aR1kH2LwS0nQKdonTHaLEQRA1RQ6azex9azqfoDk12K aVE1wIziGzfMPSkBp+KgJwzbS03eM3vWzzClX X-Received: by 2002:a05:6402:517:: with SMTP id m23mr2122086edv.243.1542200939033; Wed, 14 Nov 2018 05:08:59 -0800 (PST) X-Google-Smtp-Source: AJdET5f3SbdWZ7UHDs0amrSNR6SDcv7czzBESJOCVGu01ryeyKinQfMcXGkklHizKiQ4ACPt5EWbNwlWckNERdghPjE= X-Received: by 2002:a05:6402:517:: with SMTP id m23mr2122056edv.243.1542200938461; Wed, 14 Nov 2018 05:08:58 -0800 (PST) MIME-Version: 1.0 References: <20181114113453.24852-1-christian.ehrhardt@canonical.com> <20181114113453.24852-2-christian.ehrhardt@canonical.com> <1542200809.11515.12.camel@debian.org> In-Reply-To: <1542200809.11515.12.camel@debian.org> From: Christian Ehrhardt Date: Wed, 14 Nov 2018 14:08:31 +0100 Message-ID: To: Luca Boccassi Cc: 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:09:00 -0000 On Wed, Nov 14, 2018 at 2:06 PM 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' > > 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) Thanks will update that in a v2 > > > + 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 = [] > > > > -- > Kind regards, > Luca Boccassi -- Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd