From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C449BA04DD; Thu, 26 Nov 2020 17:02:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A421DC9D6; Thu, 26 Nov 2020 17:02:52 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8A961C9CE for ; Thu, 26 Nov 2020 17:02:50 +0100 (CET) IronPort-SDR: FloEktD18k1t/vTpq63p1ELMyOx9HKlWsZ7uU8oAWr7J+kIfGS0eEdG9+M+NIUGUxLFx2q8J4g tEDsDecLEtgA== X-IronPort-AV: E=McAfee;i="6000,8403,9817"; a="236431228" X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="236431228" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 08:02:44 -0800 IronPort-SDR: k2HJ42Z6sBJJQRbuqYG/klIMrJ/zm5vbzR1QCc4fbVv29OqeCnWe6zYYu8h5WQFfv2X8uqQmui qBphbc5pDeWA== X-IronPort-AV: E=Sophos;i="5.78,372,1599548400"; d="scan'208";a="479389070" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.21.198]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 26 Nov 2020 08:02:43 -0800 Date: Thu, 26 Nov 2020 16:02:38 +0000 From: Bruce Richardson To: Juraj =?utf-8?Q?Linke=C5=A1?= Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, dev@dpdk.org Message-ID: <20201126160238.GE1340@bricha3-MOBL.ger.corp.intel.com> References: <1606405649-4308-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1606405649-4308-1-git-send-email-juraj.linkes@pantheon.tech> Subject: Re: [dpdk-dev] [RFC PATCH v1] build: add platform meson option 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Nov 26, 2020 at 04:47:29PM +0100, Juraj Linkeš wrote: > The current meson option 'machine' should only specify the ISA, which is > not sufficient for Arm, where setting ISA implies other setting as well. > Add a new meson option, 'platform', which differentiates the type of the > build (native/generic) and sets machine accordingly, unless the user > chooses to override it. > > Signed-off-by: Juraj Linkeš > --- > config/arm/meson.build | 2 +- > config/meson.build | 14 +++++++++++++- > meson_options.txt | 6 ++++-- > 3 files changed, 18 insertions(+), 4 deletions(-) > > diff --git a/config/arm/meson.build b/config/arm/meson.build > index 42b4e43c7..ac680956f 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -6,7 +6,7 @@ > march_opt = '-march=@0@'.format(machine) > > arm_force_native_march = false > -arm_force_default_march = (machine == 'default') > +arm_force_default_march = (platform == 'generic') > > flags_common_default = [ > # Accelarate rte_memcpy. Be sure to run unit test (memcpy_perf_autotest) > diff --git a/config/meson.build b/config/meson.build > index c02802c18..41d32e63e 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -63,6 +63,8 @@ if not is_windows > pmd_subdir_opt) > endif > > +platform = get_option('platform') > + > # set the machine type and cflags for it > if meson.is_cross_build() > machine = host_machine.cpu() > @@ -70,13 +72,23 @@ else > machine = get_option('machine') > endif > > +if platform == 'native' > + if machine == 'auto' > + machine = 'native' > + endif > +elif platform == 'generic' > + if machine == 'auto' > + machine = 'default' > + endif > +endif > + > +if machine == 'default' > # machine type 'default' 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 == 'default' > if host_machine.cpu_family().startswith('x86') > # matches the old pre-meson build systems default > machine = 'corei7' > diff --git a/meson_options.txt b/meson_options.txt > index e384e6dbb..1a5e47fd3 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -20,14 +20,16 @@ option('kernel_dir', type: 'string', value: '', > description: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir/build. Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.') > option('lib_musdk_dir', type: 'string', value: '', > description: 'path to the MUSDK library installation directory') > -option('machine', type: 'string', value: 'native', > - description: 'set the target machine type') > +option('machine', type: 'string', value: 'auto', > + description: 'set the target machine type/ISA') > option('max_ethports', type: 'integer', value: 32, > description: 'maximum number of Ethernet devices') > option('max_lcores', type: 'integer', value: 128, > description: 'maximum number of cores/threads supported by EAL') > option('max_numa_nodes', type: 'integer', value: 4, > description: 'maximum number of NUMA nodes supported by EAL') > +option('platform', type: 'string', value: 'generic', > + description: 'Platform to build for, either "native" or "generic".') As well as this short description option, I think we need more comprehensive coverage of this option in the docs. Presumably for ARM systems this will have other options for various SOC's rather than just generic/native? /Bruce