[dpdk-dev] [RFC PATCH] config: remap flags used for Arm platforms
Bruce Richardson
bruce.richardson at intel.com
Fri Aug 14 12:01:03 CEST 2020
On Fri, Aug 14, 2020 at 09:05:23AM +0000, Ruifeng Wang wrote:
>
> > -----Original Message-----
> > From: Bruce Richardson <bruce.richardson at intel.com>
> > Sent: Friday, August 14, 2020 4:13 PM
> > To: Ruifeng Wang <Ruifeng.Wang at arm.com>
> > Cc: hemant.agrawal at nxp.com; jerinj at marvell.com;
> > viktorin at rehivetech.com; dev at dpdk.org; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli at arm.com>; Phil Yang <Phil.Yang at arm.com>; nd
> > <nd at arm.com>
> > Subject: Re: [dpdk-dev] [RFC PATCH] config: remap flags used for Arm
> > platforms
> >
> > On Fri, Aug 14, 2020 at 02:03:20PM +0800, 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 at arm.com>
> > > Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > > Reviewed-by: Phil Yang <phil.yang at arm.com>
> > > ---
> > Just to note that for all architectures there is the RTE_ARCH_64 define which
> > is set if the system is 64-bit. That could be used instead if you didn't want to
> > have to specially define ARM32 and ARM64 macros.
> >
> Yes. Thanks for the note.
> RTE_ARCH_ARM64 is used in architecture specific cases. For example, when a processing
> path is not implemented by some of 64-bit architectures, RTE_ARCH_64 is not sufficient.
>
Yes, but is RTE_ARCH_ARM64 not identical to RTE_ARCH_ARM && RTE_ARCH_64?
More information about the dev
mailing list