DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Ruifeng Wang <ruifeng.wang@arm.com>,
	hemant.agrawal@nxp.com, jerinj@marvell.com,
	viktorin@rehivetech.com, dev@dpdk.org,
	honnappa.nagarahalli@arm.com, phil.yang@arm.com, nd@arm.com
Subject: Re: [dpdk-dev] [RFC PATCH] config: remap flags used for Arm platforms
Date: Tue, 18 Aug 2020 19:48:17 +0100	[thread overview]
Message-ID: <7db307d0-bdc7-6a5b-125f-0a4542f19056@intel.com> (raw)
In-Reply-To: <20200818145310.GI500@bricha3-MOBL.ger.corp.intel.com>

On 8/18/2020 3:53 PM, Bruce Richardson wrote:
> 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 <honnappa.nagarahalli@arm.com>
>>> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
>>> Reviewed-by: Phil Yang <phil.yang@arm.com>
>>> ---
>>
>> <...>
>>
>>> @@ -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.
> 

Just to be more explicit, other than that same as '!ARCH_64'.

  reply	other threads:[~2020-08-18 18:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14  6:03 Ruifeng Wang
2020-08-14  8:13 ` Bruce Richardson
2020-08-14  9:05   ` Ruifeng Wang
2020-08-14 10:01     ` Bruce Richardson
2020-08-14 10:42       ` Ruifeng Wang
2020-08-18 14:36 ` Ferruh Yigit
2020-08-18 14:53   ` Bruce Richardson
2020-08-18 18:48     ` Ferruh Yigit [this message]
2020-08-19  8:01   ` Ruifeng Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7db307d0-bdc7-6a5b-125f-0a4542f19056@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=phil.yang@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=viktorin@rehivetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).