Skip to contentSkip to conversation

build: add missing arch define for Arm

PATCH Superseded Ruifeng Wang 4 participants 12 messages Dec 17, 2021 – Jan 20, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: add missing arch define for Arm

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")
---
 config/arm/meson.build | 3 +++
 1 file changed, 3 insertions(+)
config/arm/meson.build +3 -0
index 213324d262..3e1d7836df 100644
@@ -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()
Signature · 1 line
2.25.1
#1 lore raw

17/12/2021 09:54, Ruifeng Wang:

Quoted 6 lines

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.

Quoted 7 lines
Fixes b1d48c41189a ("build: support ARM with meson")

---

                 ['RTE_ARCH_ARMv8_AARCH32', true],

+ ['RTE_ARCH', 'arm64_aarch32'],

Why not armv8_aarch32?

[...]

Quoted 2 lines
         dpdk_conf.set('RTE_ARCH_ARMv7', true)

+ dpdk_conf.set('RTE_ARCH', 'armv7')

[...]

Quoted 2 lines
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')

Why not armv8?

What I prefer the most in silicon industry is the naming craziness :)

#2 lore raw
Quoted 20 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, January 14, 2022 1:33 AM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>
Subject: Re: [PATCH] build: add missing arch define for Arm

17/12/2021 09:54, Ruifeng Wang:

Quoted 9 lines

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")
Quoted 6 lines
Quoted 4 lines

---

                 ['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.

Quoted 11 lines

[...]

Quoted 2 lines
         dpdk_conf.set('RTE_ARCH_ARMv7', true)

+ dpdk_conf.set('RTE_ARCH', 'armv7')

[...]

Quoted 2 lines
     # 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?

#3 lore raw

14/01/2022 10:05, Ruifeng Wang:

Quoted 29 lines

From: Thomas Monjalon <[email protected]>

Quoted 10 lines

17/12/2021 09:54, Ruifeng Wang:

Quoted 9 lines

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")
Quoted 6 lines
Quoted 4 lines

---

                 ['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.

Quoted 8 lines

[...]

Quoted 2 lines
         dpdk_conf.set('RTE_ARCH_ARMv7', true)

+ dpdk_conf.set('RTE_ARCH', 'armv7')

[...]

Quoted 2 lines
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')
Quoted 6 lines
Quoted 3 lines

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

#4 lore raw
In reply to Ruifeng Wang
Quoted 50 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Friday, January 14, 2022 10:05 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Juraj Linkeš <[email protected]>; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: RE: [PATCH] build: add missing arch define for Arm

Quoted 20 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, January 14, 2022 1:33 AM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>
Subject: Re: [PATCH] build: add missing arch define for Arm

17/12/2021 09:54, Ruifeng Wang:

Quoted 9 lines

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")
Quoted 6 lines
Quoted 4 lines

---

                 ['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.

Quoted 8 lines

[...]

Quoted 2 lines
         dpdk_conf.set('RTE_ARCH_ARMv7', true)

+ dpdk_conf.set('RTE_ARCH', 'armv7')

[...]

Quoted 2 lines
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')
Quoted 9 lines
Quoted 3 lines

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

#5 lore raw
Quoted 64 lines

From: Juraj Linkeš [mailto:[email protected]]
Sent: Monday, 17 January 2022 14.12

Quoted 21 lines

From: Ruifeng Wang <[email protected]>
Sent: Friday, January 14, 2022 10:05 AM

Quoted 18 lines

From: Thomas Monjalon <[email protected]>
Sent: Friday, January 14, 2022 1:33 AM

17/12/2021 09:54, Ruifeng Wang:

Quoted 13 lines

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

---

                 ['RTE_ARCH_ARMv8_AARCH32', true],

+ ['RTE_ARCH', 'arm64_aarch32'],

Quoted 16 lines
Quoted 1 line

Why not armv8_aarch32?

Thanks for the comments.
Agreed. armv8_aarch32 is consistent with the RTE_ARCH_xx macro above.

Quoted 11 lines

[...]

Quoted 2 lines
         dpdk_conf.set('RTE_ARCH_ARMv7', true)

+ dpdk_conf.set('RTE_ARCH', 'armv7')

[...]

Quoted 2 lines
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')

Why not armv8?

What I prefer the most in silicon industry is the naming craziness

:)

Quoted 2 lines

While armv8 usually refers to one generation of the Arm architecture,

arm64 is

Quoted 2 lines

more generic for 64-bit architectures.
And what defined for armv8 build is RTE_ARCH_ARM64. So for

consistency,

Quoted 2 lines

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.

Quoted 7 lines

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!

#6 lore raw
In reply to Juraj Linkeš
Quoted 65 lines

-----Original Message-----
From: Juraj Linkeš <[email protected]>
Sent: Monday, January 17, 2022 9:12 PM
To: Ruifeng Wang <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: RE: [PATCH] build: add missing arch define for Arm

Quoted 53 lines

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: Friday, January 14, 2022 10:05 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Juraj Linkeš <[email protected]>; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; nd <[email protected]>
Subject: RE: [PATCH] build: add missing arch define for Arm

Quoted 20 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, January 14, 2022 1:33 AM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>
Subject: Re: [PATCH] build: add missing arch define for Arm

17/12/2021 09:54, Ruifeng Wang:

Quoted 9 lines

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")
Quoted 6 lines
Quoted 4 lines

---

                 ['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.

Quoted 12 lines

[...]

Quoted 2 lines
         dpdk_conf.set('RTE_ARCH_ARMv7', true)

+ dpdk_conf.set('RTE_ARCH', 'armv7')

[...]

Quoted 2 lines
     # armv8 build
+    dpdk_conf.set('RTE_ARCH', 'arm64')

Why not armv8?

What I prefer the most in silicon industry is the naming craziness :)

Quoted 8 lines
Quoted 6 lines

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.

Quoted 19 lines

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

#7 lore raw

PATCH v2 1/1 build: add missing arch define for Arm

In reply to 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")

---
v2:
Renamed string for aarch32 to keep consistency with RTE_ARCH_xx defines. (Thomas)

 config/arm/meson.build | 3 +++
 1 file changed, 3 insertions(+)
config/arm/meson.build +3 -0
index 16e808cdd5..0066ab5f18 100644
@@ -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()
Signature · 1 line
2.25.1
#8 lore raw

17/01/2022 08:15, Ruifeng Wang:

Quoted 11 lines
config/arm/meson.build +1 -0
@@ -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]
             ]
         }

config/arm/meson.build if dpdk_conf.get('RTE_ARCH_32') · line 442

Quoted 10 lines
config/arm/meson.build +2 -0
@@ -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.

#9 lore raw
Quoted 26 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, January 19, 2022 5:01 PM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>; nd <[email protected]>; [email protected]
Subject: Re: [PATCH v2] build: add missing arch define for Arm

17/01/2022 08:15, Ruifeng Wang:

Quoted 15 lines
config/arm/meson.build +2 -0
@@ -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')
Quoted 9 lines

config/arm/meson.build if dpdk_conf.get('RTE_ARCH_32') · line 442

Quoted 6 lines
config/arm/meson.build +1 -0
         # 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.

#10 lore raw

PATCH v3 1/1 build: add missing arch define for Arm

In reply to 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")

---
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(+)
config/arm/meson.build +3 -0
index 16e808cdd5..c3a3f2faaf 100644
@@ -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()
Signature · 1 line
2.25.1