Skip to contentSkip to conversation

eal/arm: enable FreeBSD build

PATCH In review Ruifeng Wang 3 participants 6 messages Jun 4, 2021 – Jul 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal/arm: enable FreeBSD build

Build on FreeBSD on aarch64 failed with error:
lib/eal/arm/rte_cpuflags.c:86:9: error: unknown type name 'Elf64_auxv_t'

The data type is used by OS Linux auxiliary vector read, and not used by arch specific cpu flag API implementations. Hence remove it from Arm file.

---
 lib/eal/arm/rte_cpuflags.c | 2 --
 1 file changed, 2 deletions(-)
lib/eal/arm/rte_cpuflags.c +0 -2
index 845770f1e5..d84c9fc09f 100644
@@ -48,7 +48,6 @@ struct feature_entry {
 
 #ifdef RTE_ARCH_ARMv7
 #define PLATFORM_STR "v7l"
-typedef Elf32_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(SWP,       REG_HWCAP,    0)
@@ -83,7 +82,6 @@ const struct feature_entry rte_cpu_feature_table[] = {
 
 #elif defined RTE_ARCH_ARM64
 #define PLATFORM_STR "aarch64"
-typedef Elf64_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(FP,		REG_HWCAP,    0)
Signature · 1 line
2.25.1
Reviewed-by Honnappa Nagarahalli on v1 1/1
#1 lore raw

Hi Everyone,

Thanks for the help . I was able to build DPDK using this patch on a physical machine.

Best regards,
James Grant

Senior Embedded Software Engineer | CSIT | QUB.

-----Original Message-----
From: Ruifeng Wang <[email protected]>
Sent: 04 June 2021 06:49
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; James Grant <[email protected]>; [email protected]; [email protected]; Ruifeng Wang <[email protected]>; James Grant <[email protected]>; Honnappa Nagarahalli <[email protected]>
Subject: [PATCH] eal/arm: enable FreeBSD build

This message is from an external sender. Please take care when responding, clicking links or opening attachments.

Build on FreeBSD on aarch64 failed with error:
lib/eal/arm/rte_cpuflags.c:86:9: error: unknown type name 'Elf64_auxv_t'

The data type is used by OS Linux auxiliary vector read, and not used by arch specific cpu flag API implementations. Hence remove it from Arm file.

---
 lib/eal/arm/rte_cpuflags.c | 2 --
 1 file changed, 2 deletions(-)
lib/eal/arm/rte_cpuflags.c +0 -2
@@ -48,7 +48,6 @@ struct feature_entry {
 
 #ifdef RTE_ARCH_ARMv7
 #define PLATFORM_STR "v7l"
-typedef Elf32_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
        FEAT_DEF(SWP,       REG_HWCAP,    0)
@@ -83,7 +82,6 @@ const struct feature_entry rte_cpu_feature_table[] = {
 
 #elif defined RTE_ARCH_ARM64
 #define PLATFORM_STR "aarch64"
-typedef Elf64_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
        FEAT_DEF(FP,            REG_HWCAP,    0)

--
2.25.1

#2 lore raw
In reply to Ruifeng Wang
Quoted 10 lines · Ruifeng Wang

Build on FreeBSD on aarch64 failed with error:
lib/eal/arm/rte_cpuflags.c:86:9: error: unknown type name 'Elf64_auxv_t'

The data type is used by OS Linux auxiliary vector read, and not used by arch specific cpu flag API implementations. Hence remove it from Arm file.

This never worked, so this patch counts as enabling a new supported OS/arch.

If we want FreeBSD support on ARM, we will need non regression tests in some CI. A release notes update is also needed.

Signature · 1 line
David Marchand
#3 lore raw
Quoted 20 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Friday, June 11, 2021 4:59 PM
To: Ruifeng Wang <[email protected]>
Cc: Jan Viktorin <[email protected]>; [email protected]; Bruce Richardson <[email protected]>; dev <[email protected]>; nd <[email protected]>; [email protected]; [email protected]; Honnappa Nagarahalli <[email protected]>
Subject: Re: [PATCH] eal/arm: enable FreeBSD build

Quoted 6 lines · Ruifeng Wang

Build on FreeBSD on aarch64 failed with error:
lib/eal/arm/rte_cpuflags.c:86:9: error: unknown type name 'Elf64_auxv_t'

The data type is used by OS Linux auxiliary vector read, and not used by arch specific cpu flag API implementations. Hence remove it from Arm

file.

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

This never worked, so this patch counts as enabling a new supported OS/arch.

If we want FreeBSD support on ARM, we will need non regression tests in some CI.

Currently no plan to claim FreeBSD support on Arm.
I'll update commit message to treat it as removal of useless code.

Quoted 5 lines

A release notes update is also needed.

--
David Marchand

#4 lore raw

PATCH v2 1/1 eal/arm: remove irrelevant code

In reply to Ruifeng Wang

Data types Elf32_auxv_t and Elf64_auxv_t are used by OS Linux auxiliary vector read, and not used by arch specific cpu flag API implementations. Hence remove them from Arm file.

---
v2:
Update commit message to remove implication of FreeBSD support.

 lib/eal/arm/rte_cpuflags.c | 2 --
 1 file changed, 2 deletions(-)
lib/eal/arm/rte_cpuflags.c +0 -2
index 845770f1e5..d84c9fc09f 100644
@@ -48,7 +48,6 @@ struct feature_entry {
 
 #ifdef RTE_ARCH_ARMv7
 #define PLATFORM_STR "v7l"
-typedef Elf32_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(SWP,       REG_HWCAP,    0)
@@ -83,7 +82,6 @@ const struct feature_entry rte_cpu_feature_table[] = {
 
 #elif defined RTE_ARCH_ARM64
 #define PLATFORM_STR "aarch64"
-typedef Elf64_auxv_t _Elfx_auxv_t;
 
 const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(FP,		REG_HWCAP,    0)
Signature · 1 line
2.25.1
#5 lore raw

Re: [dpdk-dev] [PATCH v2] eal/arm: remove irrelevant code

Quoted 11 lines · Ruifeng Wang

Data types Elf32_auxv_t and Elf64_auxv_t are used by OS Linux auxiliary vector read, and not used by arch specific cpu flag API implementations. Hence remove them from Arm file.

---
v2:
Update commit message to remove implication of FreeBSD support.

Applied, thanks.

Signature · 1 line
David Marchand