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 28030A034C; Tue, 18 Aug 2020 16:53:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 84685AAB7; Tue, 18 Aug 2020 16:53:18 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A7EF95F69 for ; Tue, 18 Aug 2020 16:53:16 +0200 (CEST) IronPort-SDR: lPbSweBAc2Xg9NTVgwLVdAJMZuzk9COkP/tWk99OuZJk+0Xiha4rENmsvS8ZDb4w7deTRT/p8N gEgWxnt5CCwA== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="142543578" X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="142543578" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 07:53:15 -0700 IronPort-SDR: 0rnnk72rxIxrvtb+kVkURZjOI6dhqZ+RMkLEEFd9MI2mhXLxFlsMmryfYQ9cZIu+DnGRsB+e0P I9X8Kmr4Eukw== X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="471836916" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.19.21]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 18 Aug 2020 07:53:13 -0700 Date: Tue, 18 Aug 2020 15:53:10 +0100 From: Bruce Richardson To: Ferruh Yigit Cc: Ruifeng Wang , hemant.agrawal@nxp.com, jerinj@marvell.com, viktorin@rehivetech.com, dev@dpdk.org, honnappa.nagarahalli@arm.com, phil.yang@arm.com, nd@arm.com Message-ID: <20200818145310.GI500@bricha3-MOBL.ger.corp.intel.com> References: <20200814060320.86238-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [RFC PATCH] config: remap flags used for Arm platforms 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 Tue, Aug 18, 2020 at 03:36:00PM +0100, Ferruh Yigit wrote: > On 8/14/2020 7:03 AM, Ruifeng Wang wrote: > > Flags are used to distinguish different platform architectures. > > These flags can be used to pick different code paths for different > > architectures at compile time. > > For Arm platforms, there are 3 flags in use: RTE_ARCH_ARM, > > RTE_ARCH_ARMv7 and RTE_ARCH_ARM64. > > RTE_ARCH_ARM64 is used to flag 64-bit aarch64 platforms, > > while RTE_ARCH_ARM & RTE_ARCH_ARMv7 are used to flag 32-bit platforms. > > RTE_ARCH_ARMv7 is for ARMv7 platforms as its name suggested. > > > > The issue is that flag name RTE_ARCH_ARM is unclear and could cause > > confusion. No info about platform word length is included in the name. > > To make the flag names more clear, a naming scheme is proposed. > > > > RTE_ARCH_ARM > > | > > +----RTE_ARCH_ARM32 > > | | > > | +----RTE_ARCH_ARMv7 > > | | > > | +----RTE_ARCH_ARMv8_AARCH32 > > | > > +----RTE_ARCH_ARM64 > > > > RTE_ARCH_ARM32 will be used for 32-bit Arm platforms. > > It includes RTE_ARCH_ARMv7 and RTE_ARCH_ARMv8_AARCH32. > > RTE_ARCH_ARMv7 is for ARMv7 platforms. > > RTE_ARCH_ARMv8_AARCH32 is for aarch32 state on aarch64 platforms. > > RTE_ARCH_ARM64 is for 64-bit Arm platforms. > > RTE_ARCH_ARM will be used for all Arm platforms, including RTE_ARCH_ARM32 > > and RTE_ARCH_ARM64. > > > > To fit into the new naming scheme, current usage of RTE_ARCH_ARM in > > project code is mapped to RTE_ARCH_ARM32. > > > > Suggested-by: Honnappa Nagarahalli > > Signed-off-by: Ruifeng Wang > > Reviewed-by: Phil Yang > > --- > > <...> > > > @@ -6,7 +6,7 @@ > > CONFIG_RTE_MACHINE="armv7a" > > > > CONFIG_RTE_ARCH="arm" > > -CONFIG_RTE_ARCH_ARM=y > > +CONFIG_RTE_ARCH_ARM32=y > > CONFIG_RTE_ARCH_ARMv7=y > > CONFIG_RTE_ARCH_ARM_TUNE="cortex-a9" > > According commit log message I thought 'RTE_ARCH_ARM' will be always set, isn't > it the case? > > Is below wrong: > aarch64 -> ARM | ARM64 | ARCH_64 > armv7a -> ARM | ARM32 | ARMv7 > aarch32 -> ARM | ARM32 | ARMv8_AARCH32 > > If so some of the 'defined(RTE_ARCH_ARM32) || defined(RTE_ARCH_ARM64)' checks > can be simplified as 'defined(RTE_ARCH_ARM)' > > > Also currently missing 'ARCH_64' flag implies the 32bit support, for all > architectures, what about having a common 'ARCH_32' flag and use for all arch, > instead of 'ARM32'? So something like below: > aarch64 -> ARM | ARM64 | ARCH_64 > armv7a -> ARM | ARMv7 | ARCH_32 > aarch32 -> ARM | ARMv8_AARCH32 | ARCH_32 > Not sure why you would need ARCH_32, since it's basically just !ARCH_64.