[PATCH] build: add missing arch define for Arm

Ruifeng Wang Ruifeng.Wang at arm.com
Wed Jan 19 10:44:33 CET 2022


> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes at pantheon.tech>
> Sent: Monday, January 17, 2022 9:12 PM
> To: Ruifeng Wang <Ruifeng.Wang at arm.com>; thomas at monjalon.net
> Cc: dev at dpdk.org; stable at dpdk.org; viktorin at rehivetech.com;
> bruce.richardson at intel.com; stephen at networkplumber.org; Honnappa
> Nagarahalli <Honnappa.Nagarahalli at arm.com>; nd <nd at arm.com>; nd
> <nd at arm.com>
> Subject: RE: [PATCH] build: add missing arch define for Arm
> 
> 
> 
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang at arm.com>
> > Sent: Friday, January 14, 2022 10:05 AM
> > To: thomas at monjalon.net
> > Cc: dev at dpdk.org; stable at dpdk.org; viktorin at rehivetech.com;
> > bruce.richardson at intel.com; stephen at networkplumber.org; Juraj Linkeš
> > <juraj.linkes at pantheon.tech>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli at arm.com>; nd <nd at arm.com>; nd <nd at arm.com>
> > Subject: RE: [PATCH] build: add missing arch define for Arm
> >
> > > -----Original Message-----
> > > From: Thomas Monjalon <thomas at monjalon.net>
> > > Sent: Friday, January 14, 2022 1:33 AM
> > > To: Ruifeng Wang <Ruifeng.Wang at arm.com>
> > > Cc: dev at dpdk.org; stable at dpdk.org; viktorin at rehivetech.com;
> > > bruce.richardson at intel.com; stephen at networkplumber.org;
> > > juraj.linkes at pantheon.tech; Honnappa Nagarahalli
> > > <Honnappa.Nagarahalli at arm.com>; nd <nd at arm.com>
> > > Subject: Re: [PATCH] build: add missing arch define for Arm
> > >
> > > 17/12/2021 09:54, Ruifeng Wang:
> > > > As per design document, RTE_ARCH is the name of the architecture.
> > > > However, the definition was missing on Arm with meson build.
> > > > It impacts applications that refers to this string.
> > > >
> > > > Added for Arm builds.
> > > >
> > > > Fixes: b1d48c41189a ("build: support ARM with meson")
> > > > Cc: stable at dpdk.org
> > > >
> > > > Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > > > ---
> > > >                  ['RTE_ARCH_ARMv8_AARCH32', true],
> > > > +                ['RTE_ARCH', 'arm64_aarch32'],
> > >
> > > Why not armv8_aarch32?
> >
> > Thanks for the comments.
> > Agreed. armv8_aarch32 is consistent with the RTE_ARCH_xx macro above.
> >
> > >
> > > [...]
> > > >          dpdk_conf.set('RTE_ARCH_ARMv7', true)
> > > > +        dpdk_conf.set('RTE_ARCH', 'armv7')
> > > [...]
> > > >      # armv8 build
> > > > +    dpdk_conf.set('RTE_ARCH', 'arm64')
> > >
> > > Why not armv8?
> > >
> > > What I prefer the most in silicon industry is the naming craziness
> > > :)
> >
> > While armv8 usually refers to one generation of the Arm architecture,
> > arm64 is more generic for 64-bit architectures.
> > And what defined for armv8 build is RTE_ARCH_ARM64. So for
> > consistency,
> > arm64 is better?
> >
> 
> Using armv8_aarch32 along with arm64 doesn't seem right. We should unite

Thanks for providing your thoughts.
I have no strong opinion on this. armv8 indeed is better aligned with armv8_aarch32.
I will change in next version.

> these and I think armv8 makes sense. As you mentioned arvm8 is an arm64
> architecture and using the more precise identification is better in my opinion
> (as that gives more information). As for the consistency with
> RTE_ARCH_ARM64, I think the problem is that we don't have the
> RTE_ARCH_ARMv8 flag (which would provide the consistency, but won't be
> used):
> The current code is, accurately, written for 64bit arm architectures (all of
> them).
> There is currently no need to differentiate between 64bit arm architectures
> which is why RTE_ARCH_ARMv8 doesn't exist.
> However, armv8 exists and we know how to identify it which is why I think
> setting RTE_ARCH to armv8 is the way to go.
> 
> So my thinking is RTE_ARCH should be set to armv8, which implies
> RTE_ARCH_ARMv8 which in turn implies RTE_ARCH_ARM64. We're just
> missing the middle part since there's no use for it now.
> 
> And to be fully consistent, we could add RTE_ARCH_ARM32 to armv7 (as a
> superset of RTE_ARCH_ARMv7, but that likely won't be of much use).



More information about the stable mailing list