patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] build: add missing arch define for Arm
@ 2021-12-17  8:54 Ruifeng Wang
  2022-01-13 17:32 ` Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ruifeng Wang @ 2021-12-17  8:54 UTC (permalink / raw)
  To: dev
  Cc: viktorin, bruce.richardson, stephen, juraj.linkes,
	honnappa.nagarahalli, nd, stable, 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@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 213324d262..3e1d7836df 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -49,6 +49,7 @@ implementer_generic = {
                 ['RTE_ARCH_ARM_NEON_MEMCPY', false],
                 ['RTE_ARCH_STRICT_ALIGN', true],
                 ['RTE_ARCH_ARMv8_AARCH32', true],
+                ['RTE_ARCH', 'arm64_aarch32'],
                 ['RTE_CACHE_LINE_SIZE', 64]
             ]
         }
@@ -432,11 +433,13 @@ if dpdk_conf.get('RTE_ARCH_32')
     else
         # armv7 build
         dpdk_conf.set('RTE_ARCH_ARMv7', true)
+        dpdk_conf.set('RTE_ARCH', 'armv7')
         # the minimum architecture supported, armv7-a, needs the following,
         machine_args += '-mfpu=neon'
     endif
 else
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')
     update_flags = true
     soc_config = {}
     if not meson.is_cross_build()
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] build: add missing arch define for Arm
  2021-12-17  8:54 [PATCH] build: add missing arch define for Arm Ruifeng Wang
@ 2022-01-13 17:32 ` Thomas Monjalon
  2022-01-14  9:05   ` Ruifeng Wang
  2022-01-17  7:15 ` [PATCH v2] " Ruifeng Wang
  2022-01-20  2:38 ` [PATCH v3] " Ruifeng Wang
  2 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2022-01-13 17:32 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: dev, stable, viktorin, bruce.richardson, stephen, juraj.linkes,
	honnappa.nagarahalli, nd

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@dpdk.org
> 
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>                  ['RTE_ARCH_ARMv8_AARCH32', true],
> +                ['RTE_ARCH', 'arm64_aarch32'],

Why not armv8_aarch32?

[...]
>          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 :)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] build: add missing arch define for Arm
  2022-01-13 17:32 ` Thomas Monjalon
@ 2022-01-14  9:05   ` Ruifeng Wang
  2022-01-14 12:50     ` Thomas Monjalon
  2022-01-17 13:12     ` Juraj Linkeš
  0 siblings, 2 replies; 12+ messages in thread
From: Ruifeng Wang @ 2022-01-14  9:05 UTC (permalink / raw)
  To: thomas
  Cc: dev, stable, viktorin, bruce.richardson, stephen, juraj.linkes,
	Honnappa Nagarahalli, nd, nd

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, January 14, 2022 1:33 AM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> bruce.richardson@intel.com; stephen@networkplumber.org;
> juraj.linkes@pantheon.tech; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; nd <nd@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@dpdk.org
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@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?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] build: add missing arch define for Arm
  2022-01-14  9:05   ` Ruifeng Wang
@ 2022-01-14 12:50     ` Thomas Monjalon
  2022-01-17 13:12     ` Juraj Linkeš
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2022-01-14 12:50 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: dev, stable, viktorin, bruce.richardson, stephen, juraj.linkes,
	Honnappa Nagarahalli, nd

14/01/2022 10:05, Ruifeng Wang:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 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@dpdk.org
> > >
> > > Signed-off-by: Ruifeng Wang <ruifeng.wang@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?

I don't really care as long as we can have fun of this naming :)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] build: add missing arch define for Arm
  2021-12-17  8:54 [PATCH] build: add missing arch define for Arm Ruifeng Wang
  2022-01-13 17:32 ` Thomas Monjalon
@ 2022-01-17  7:15 ` Ruifeng Wang
  2022-01-19  9:01   ` Thomas Monjalon
  2022-01-20  2:38 ` [PATCH v3] " Ruifeng Wang
  2 siblings, 1 reply; 12+ messages in thread
From: Ruifeng Wang @ 2022-01-17  7:15 UTC (permalink / raw)
  To: dev
  Cc: viktorin, bruce.richardson, stephen, thomas, juraj.linkes,
	honnappa.nagarahalli, nd, stable, 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@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
v2:
Renamed string for aarch32 to keep consistency with RTE_ARCH_xx defines. (Thomas)

 config/arm/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 16e808cdd5..0066ab5f18 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -49,6 +49,7 @@ implementer_generic = {
                 ['RTE_ARCH_ARM_NEON_MEMCPY', false],
                 ['RTE_ARCH_STRICT_ALIGN', true],
                 ['RTE_ARCH_ARMv8_AARCH32', true],
+                ['RTE_ARCH', 'armv8_aarch32'],
                 ['RTE_CACHE_LINE_SIZE', 64]
             ]
         }
@@ -432,11 +433,13 @@ if dpdk_conf.get('RTE_ARCH_32')
     else
         # armv7 build
         dpdk_conf.set('RTE_ARCH_ARMv7', true)
+        dpdk_conf.set('RTE_ARCH', 'armv7')
         # the minimum architecture supported, armv7-a, needs the following,
         machine_args += '-mfpu=neon'
     endif
 else
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')
     update_flags = true
     soc_config = {}
     if not meson.is_cross_build()
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] build: add missing arch define for Arm
  2022-01-14  9:05   ` Ruifeng Wang
  2022-01-14 12:50     ` Thomas Monjalon
@ 2022-01-17 13:12     ` Juraj Linkeš
  2022-01-17 13:50       ` Morten Brørup
  2022-01-19  9:44       ` Ruifeng Wang
  1 sibling, 2 replies; 12+ messages in thread
From: Juraj Linkeš @ 2022-01-17 13:12 UTC (permalink / raw)
  To: Ruifeng Wang, thomas
  Cc: dev, stable, viktorin, bruce.richardson, stephen,
	Honnappa Nagarahalli, nd, nd



> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Friday, January 14, 2022 10:05 AM
> To: thomas@monjalon.net
> Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> bruce.richardson@intel.com; stephen@networkplumber.org; Juraj Linkeš
> <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>; nd <nd@arm.com>
> Subject: RE: [PATCH] build: add missing arch define for Arm
> 
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Friday, January 14, 2022 1:33 AM
> > To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> > bruce.richardson@intel.com; stephen@networkplumber.org;
> > juraj.linkes@pantheon.tech; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; nd <nd@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@dpdk.org
> > >
> > > Signed-off-by: Ruifeng Wang <ruifeng.wang@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 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).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] build: add missing arch define for Arm
  2022-01-17 13:12     ` Juraj Linkeš
@ 2022-01-17 13:50       ` Morten Brørup
  2022-01-19  9:44       ` Ruifeng Wang
  1 sibling, 0 replies; 12+ messages in thread
From: Morten Brørup @ 2022-01-17 13:50 UTC (permalink / raw)
  To: Juraj Linkeš, Ruifeng Wang, thomas
  Cc: dev, stable, viktorin, bruce.richardson, stephen,
	Honnappa Nagarahalli, nd, nd

> From: Juraj Linkeš [mailto:juraj.linkes@pantheon.tech]
> Sent: Monday, 17 January 2022 14.12
> 
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Friday, January 14, 2022 10:05 AM
> >
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Friday, January 14, 2022 1:33 AM
> > >
> > > 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@dpdk.org
> > > >
> > > > Signed-off-by: Ruifeng Wang <ruifeng.wang@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 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).
> 

DPDK already has the cross-platform RTE_ARCH_64 and RTE_ARCH_32 to indicate 64/32 bit word size.

You don't need ARM-specific versions of these!



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] build: add missing arch define for Arm
  2022-01-17  7:15 ` [PATCH v2] " Ruifeng Wang
@ 2022-01-19  9:01   ` Thomas Monjalon
  2022-01-19  9:51     ` Ruifeng Wang
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2022-01-19  9:01 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: dev, stable, viktorin, bruce.richardson, stephen, juraj.linkes,
	honnappa.nagarahalli, nd, stable

17/01/2022 08:15, Ruifeng Wang:
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -49,6 +49,7 @@ implementer_generic = {
>                  ['RTE_ARCH_ARM_NEON_MEMCPY', false],
>                  ['RTE_ARCH_STRICT_ALIGN', true],
>                  ['RTE_ARCH_ARMv8_AARCH32', true],
> +                ['RTE_ARCH', 'armv8_aarch32'],
>                  ['RTE_CACHE_LINE_SIZE', 64]
>              ]
>          }
> @@ -432,11 +433,13 @@ if dpdk_conf.get('RTE_ARCH_32')
>      else
>          # armv7 build
>          dpdk_conf.set('RTE_ARCH_ARMv7', true)
> +        dpdk_conf.set('RTE_ARCH', 'armv7')
>          # the minimum architecture supported, armv7-a, needs the following,
>          machine_args += '-mfpu=neon'
>      endif
>  else
>      # armv8 build
> +    dpdk_conf.set('RTE_ARCH', 'arm64')

Juraj commented on v1 that it should be armv8.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] build: add missing arch define for Arm
  2022-01-17 13:12     ` Juraj Linkeš
  2022-01-17 13:50       ` Morten Brørup
@ 2022-01-19  9:44       ` Ruifeng Wang
  1 sibling, 0 replies; 12+ messages in thread
From: Ruifeng Wang @ 2022-01-19  9:44 UTC (permalink / raw)
  To: Juraj Linkeš, thomas
  Cc: dev, stable, viktorin, bruce.richardson, stephen,
	Honnappa Nagarahalli, nd, nd, nd

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Monday, January 17, 2022 9:12 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; thomas@monjalon.net
> Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> bruce.richardson@intel.com; stephen@networkplumber.org; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>; nd
> <nd@arm.com>
> Subject: RE: [PATCH] build: add missing arch define for Arm
> 
> 
> 
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Friday, January 14, 2022 10:05 AM
> > To: thomas@monjalon.net
> > Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> > bruce.richardson@intel.com; stephen@networkplumber.org; Juraj Linkeš
> > <juraj.linkes@pantheon.tech>; Honnappa Nagarahalli
> > <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>; nd <nd@arm.com>
> > Subject: RE: [PATCH] build: add missing arch define for Arm
> >
> > > -----Original Message-----
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Friday, January 14, 2022 1:33 AM
> > > To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > > Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> > > bruce.richardson@intel.com; stephen@networkplumber.org;
> > > juraj.linkes@pantheon.tech; Honnappa Nagarahalli
> > > <Honnappa.Nagarahalli@arm.com>; nd <nd@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@dpdk.org
> > > >
> > > > Signed-off-by: Ruifeng Wang <ruifeng.wang@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).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH v2] build: add missing arch define for Arm
  2022-01-19  9:01   ` Thomas Monjalon
@ 2022-01-19  9:51     ` Ruifeng Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Ruifeng Wang @ 2022-01-19  9:51 UTC (permalink / raw)
  To: thomas
  Cc: dev, stable, viktorin, bruce.richardson, stephen, juraj.linkes,
	Honnappa Nagarahalli, nd, stable, nd

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, January 19, 2022 5:01 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: dev@dpdk.org; stable@dpdk.org; viktorin@rehivetech.com;
> bruce.richardson@intel.com; stephen@networkplumber.org;
> juraj.linkes@pantheon.tech; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>; stable@dpdk.org
> Subject: Re: [PATCH v2] build: add missing arch define for Arm
> 
> 17/01/2022 08:15, Ruifeng Wang:
> > --- a/config/arm/meson.build
> > +++ b/config/arm/meson.build
> > @@ -49,6 +49,7 @@ implementer_generic = {
> >                  ['RTE_ARCH_ARM_NEON_MEMCPY', false],
> >                  ['RTE_ARCH_STRICT_ALIGN', true],
> >                  ['RTE_ARCH_ARMv8_AARCH32', true],
> > +                ['RTE_ARCH', 'armv8_aarch32'],
> >                  ['RTE_CACHE_LINE_SIZE', 64]
> >              ]
> >          }
> > @@ -432,11 +433,13 @@ if dpdk_conf.get('RTE_ARCH_32')
> >      else
> >          # armv7 build
> >          dpdk_conf.set('RTE_ARCH_ARMv7', true)
> > +        dpdk_conf.set('RTE_ARCH', 'armv7')
> >          # the minimum architecture supported, armv7-a, needs the following,
> >          machine_args += '-mfpu=neon'
> >      endif
> >  else
> >      # armv8 build
> > +    dpdk_conf.set('RTE_ARCH', 'arm64')
> 
> Juraj commented on v1 that it should be armv8.
> 
Thanks, I will send out v3.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v3] build: add missing arch define for Arm
  2021-12-17  8:54 [PATCH] build: add missing arch define for Arm Ruifeng Wang
  2022-01-13 17:32 ` Thomas Monjalon
  2022-01-17  7:15 ` [PATCH v2] " Ruifeng Wang
@ 2022-01-20  2:38 ` Ruifeng Wang
  2022-01-20 14:09   ` Thomas Monjalon
  2 siblings, 1 reply; 12+ messages in thread
From: Ruifeng Wang @ 2022-01-20  2:38 UTC (permalink / raw)
  To: dev
  Cc: viktorin, bruce.richardson, stephen, thomas, juraj.linkes,
	honnappa.nagarahalli, nd, stable, 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@dpdk.org

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
v3:
Use armv8 instead of arm64. (Thomas, Juraj)
v2:
Renamed string for aarch32 to keep consistency with RTE_ARCH_xx defines. (Thomas)

 config/arm/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 16e808cdd5..c3a3f2faaf 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -49,6 +49,7 @@ implementer_generic = {
                 ['RTE_ARCH_ARM_NEON_MEMCPY', false],
                 ['RTE_ARCH_STRICT_ALIGN', true],
                 ['RTE_ARCH_ARMv8_AARCH32', true],
+                ['RTE_ARCH', 'armv8_aarch32'],
                 ['RTE_CACHE_LINE_SIZE', 64]
             ]
         }
@@ -432,11 +433,13 @@ if dpdk_conf.get('RTE_ARCH_32')
     else
         # armv7 build
         dpdk_conf.set('RTE_ARCH_ARMv7', true)
+        dpdk_conf.set('RTE_ARCH', 'armv7')
         # the minimum architecture supported, armv7-a, needs the following,
         machine_args += '-mfpu=neon'
     endif
 else
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'armv8')
     update_flags = true
     soc_config = {}
     if not meson.is_cross_build()
-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v3] build: add missing arch define for Arm
  2022-01-20  2:38 ` [PATCH v3] " Ruifeng Wang
@ 2022-01-20 14:09   ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2022-01-20 14:09 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: dev, stable, viktorin, bruce.richardson, stephen, juraj.linkes,
	honnappa.nagarahalli, nd, stable

20/01/2022 03:38, 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@dpdk.org
> 
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>

Applied, thanks




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-01-20 14:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17  8:54 [PATCH] build: add missing arch define for Arm Ruifeng Wang
2022-01-13 17:32 ` Thomas Monjalon
2022-01-14  9:05   ` Ruifeng Wang
2022-01-14 12:50     ` Thomas Monjalon
2022-01-17 13:12     ` Juraj Linkeš
2022-01-17 13:50       ` Morten Brørup
2022-01-19  9:44       ` Ruifeng Wang
2022-01-17  7:15 ` [PATCH v2] " Ruifeng Wang
2022-01-19  9:01   ` Thomas Monjalon
2022-01-19  9:51     ` Ruifeng Wang
2022-01-20  2:38 ` [PATCH v3] " Ruifeng Wang
2022-01-20 14:09   ` Thomas Monjalon

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).