DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
@ 2020-07-17 12:08 Wei Hu (Xavier)
  2020-07-17 23:04 ` Honnappa Nagarahalli
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Hu (Xavier) @ 2020-07-17 12:08 UTC (permalink / raw)
  To: dev; +Cc: xavier.huwei

From: Chengwen Feng <fengchengwen@huawei.com>

SVE is the next-generation SIMD extension of the ARMv8-A AArch64
instruction set.
The related marco definition can be found in linux kernel:
  arch/arm64/include/uapi/asm/hwcap.h

This patch supports getting cpu SVE feature on ARM64 platform.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 lib/librte_eal/arm/include/rte_cpuflags_64.h | 1 +
 lib/librte_eal/arm/rte_cpuflags.c            | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/librte_eal/arm/include/rte_cpuflags_64.h b/lib/librte_eal/arm/include/rte_cpuflags_64.h
index 95cc014..069844d 100644
--- a/lib/librte_eal/arm/include/rte_cpuflags_64.h
+++ b/lib/librte_eal/arm/include/rte_cpuflags_64.h
@@ -22,6 +22,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_SHA2,
 	RTE_CPUFLAG_CRC32,
 	RTE_CPUFLAG_ATOMICS,
+	RTE_CPUFLAG_SVE,
 	RTE_CPUFLAG_AARCH64,
 	/* The last item */
 	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */
diff --git a/lib/librte_eal/arm/rte_cpuflags.c b/lib/librte_eal/arm/rte_cpuflags.c
index caf3dc8..b1e220b 100644
--- a/lib/librte_eal/arm/rte_cpuflags.c
+++ b/lib/librte_eal/arm/rte_cpuflags.c
@@ -95,6 +95,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(SHA2,		REG_HWCAP,    6)
 	FEAT_DEF(CRC32,		REG_HWCAP,    7)
 	FEAT_DEF(ATOMICS,	REG_HWCAP,    8)
+	FEAT_DEF(SVE,		REG_HWCAP,    22)
 	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
 };
 #endif /* RTE_ARCH */
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
  2020-07-17 12:08 [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64 Wei Hu (Xavier)
@ 2020-07-17 23:04 ` Honnappa Nagarahalli
  2020-07-18  2:17   ` Wei Hu (Xavier)
  0 siblings, 1 reply; 5+ messages in thread
From: Honnappa Nagarahalli @ 2020-07-17 23:04 UTC (permalink / raw)
  To: Wei Hu (Xavier), dev; +Cc: Honnappa Nagarahalli, nd, Ruifeng Wang, nd

Hi,
	Thanks for the patch. Has this been tested on any platform (simulator, emulator etc)? Do you plan to add more code using SVE?

Thank you,
Honnappa

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Hu (Xavier)
> Sent: Friday, July 17, 2020 7:08 AM
> To: dev@dpdk.org
> Cc: xavier.huwei@huawei.com
> Subject: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
> 
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> SVE is the next-generation SIMD extension of the ARMv8-A AArch64
> instruction set.
> The related marco definition can be found in linux kernel:
>   arch/arm64/include/uapi/asm/hwcap.h
> 
> This patch supports getting cpu SVE feature on ARM64 platform.
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> ---
>  lib/librte_eal/arm/include/rte_cpuflags_64.h | 1 +
>  lib/librte_eal/arm/rte_cpuflags.c            | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/lib/librte_eal/arm/include/rte_cpuflags_64.h
> b/lib/librte_eal/arm/include/rte_cpuflags_64.h
> index 95cc014..069844d 100644
> --- a/lib/librte_eal/arm/include/rte_cpuflags_64.h
> +++ b/lib/librte_eal/arm/include/rte_cpuflags_64.h
> @@ -22,6 +22,7 @@ enum rte_cpu_flag_t {
>  	RTE_CPUFLAG_SHA2,
>  	RTE_CPUFLAG_CRC32,
>  	RTE_CPUFLAG_ATOMICS,
> +	RTE_CPUFLAG_SVE,
>  	RTE_CPUFLAG_AARCH64,
>  	/* The last item */
>  	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */ diff
> --git a/lib/librte_eal/arm/rte_cpuflags.c b/lib/librte_eal/arm/rte_cpuflags.c
> index caf3dc8..b1e220b 100644
> --- a/lib/librte_eal/arm/rte_cpuflags.c
> +++ b/lib/librte_eal/arm/rte_cpuflags.c
> @@ -95,6 +95,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
>  	FEAT_DEF(SHA2,		REG_HWCAP,    6)
>  	FEAT_DEF(CRC32,		REG_HWCAP,    7)
>  	FEAT_DEF(ATOMICS,	REG_HWCAP,    8)
> +	FEAT_DEF(SVE,		REG_HWCAP,    22)
>  	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
>  };
>  #endif /* RTE_ARCH */
> --
> 2.7.4


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

* Re: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
  2020-07-17 23:04 ` Honnappa Nagarahalli
@ 2020-07-18  2:17   ` Wei Hu (Xavier)
  2020-07-22  6:35     ` Ruifeng Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Hu (Xavier) @ 2020-07-18  2:17 UTC (permalink / raw)
  To: Honnappa Nagarahalli, dev; +Cc: nd, Ruifeng Wang, Wei Hu (Xavier)

Hi, Honnappa Nagarahalli


On 2020/7/18 7:04, Honnappa Nagarahalli wrote:
> Hi,
> 	Thanks for the patch. Has this been tested on any platform (simulator, emulator etc)? Do you plan to add more code using SVE?
We have tested it on FPGA board and will upstream some code using SVE later.

Thanks, Xavier
> Thank you,
> Honnappa
>
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Hu (Xavier)
>> Sent: Friday, July 17, 2020 7:08 AM
>> To: dev@dpdk.org
>> Cc: xavier.huwei@huawei.com
>> Subject: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
>>
>> From: Chengwen Feng <fengchengwen@huawei.com>
>>
>> SVE is the next-generation SIMD extension of the ARMv8-A AArch64
>> instruction set.
>> The related marco definition can be found in linux kernel:
>>    arch/arm64/include/uapi/asm/hwcap.h
>>
>> This patch supports getting cpu SVE feature on ARM64 platform.
>>
>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> ---
>>   lib/librte_eal/arm/include/rte_cpuflags_64.h | 1 +
>>   lib/librte_eal/arm/rte_cpuflags.c            | 1 +
>>   2 files changed, 2 insertions(+)
>>
>> diff --git a/lib/librte_eal/arm/include/rte_cpuflags_64.h
>> b/lib/librte_eal/arm/include/rte_cpuflags_64.h
>> index 95cc014..069844d 100644
>> --- a/lib/librte_eal/arm/include/rte_cpuflags_64.h
>> +++ b/lib/librte_eal/arm/include/rte_cpuflags_64.h
>> @@ -22,6 +22,7 @@ enum rte_cpu_flag_t {
>>   	RTE_CPUFLAG_SHA2,
>>   	RTE_CPUFLAG_CRC32,
>>   	RTE_CPUFLAG_ATOMICS,
>> +	RTE_CPUFLAG_SVE,
>>   	RTE_CPUFLAG_AARCH64,
>>   	/* The last item */
>>   	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */ diff
>> --git a/lib/librte_eal/arm/rte_cpuflags.c b/lib/librte_eal/arm/rte_cpuflags.c
>> index caf3dc8..b1e220b 100644
>> --- a/lib/librte_eal/arm/rte_cpuflags.c
>> +++ b/lib/librte_eal/arm/rte_cpuflags.c
>> @@ -95,6 +95,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
>>   	FEAT_DEF(SHA2,		REG_HWCAP,    6)
>>   	FEAT_DEF(CRC32,		REG_HWCAP,    7)
>>   	FEAT_DEF(ATOMICS,	REG_HWCAP,    8)
>> +	FEAT_DEF(SVE,		REG_HWCAP,    22)
>>   	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
>>   };
>>   #endif /* RTE_ARCH */
>> --
>> 2.7.4
>


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

* Re: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
  2020-07-18  2:17   ` Wei Hu (Xavier)
@ 2020-07-22  6:35     ` Ruifeng Wang
  2020-08-17 12:43       ` Wei Hu (Xavier)
  0 siblings, 1 reply; 5+ messages in thread
From: Ruifeng Wang @ 2020-07-22  6:35 UTC (permalink / raw)
  To: Wei Hu (Xavier), Honnappa Nagarahalli, dev; +Cc: nd, nd

Hi Xavier,

> -----Original Message-----
> From: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Sent: Saturday, July 18, 2020 10:18 AM
> To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> dev@dpdk.org
> Cc: nd <nd@arm.com>; Ruifeng Wang <Ruifeng.Wang@arm.com>; Wei Hu
> (Xavier) <xavier.huwei@huawei.com>
> Subject: Re: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
> 
> Hi, Honnappa Nagarahalli
> 
> 
> On 2020/7/18 7:04, Honnappa Nagarahalli wrote:
> > Hi,
> > 	Thanks for the patch. Has this been tested on any platform (simulator,
> emulator etc)? Do you plan to add more code using SVE?
> We have tested it on FPGA board and will upstream some code using SVE
> later.

For completeness, cpuflags unit test also needs an update to check for the newly added SVE flag.
BTW, is there a plan to add SVE2 flag as well?

Thanks.
Ruifeng
> 
> Thanks, Xavier
> > Thank you,
> > Honnappa
> >
> >> -----Original Message-----
> >> From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Hu (Xavier)
> >> Sent: Friday, July 17, 2020 7:08 AM
> >> To: dev@dpdk.org
> >> Cc: xavier.huwei@huawei.com
> >> Subject: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
> >>
> >> From: Chengwen Feng <fengchengwen@huawei.com>
> >>
> >> SVE is the next-generation SIMD extension of the ARMv8-A AArch64
> >> instruction set.
> >> The related marco definition can be found in linux kernel:
> >>    arch/arm64/include/uapi/asm/hwcap.h
> >>
> >> This patch supports getting cpu SVE feature on ARM64 platform.
> >>
> >> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> >> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> >> ---
> >>   lib/librte_eal/arm/include/rte_cpuflags_64.h | 1 +
> >>   lib/librte_eal/arm/rte_cpuflags.c            | 1 +
> >>   2 files changed, 2 insertions(+)
> >>
> >> diff --git a/lib/librte_eal/arm/include/rte_cpuflags_64.h
> >> b/lib/librte_eal/arm/include/rte_cpuflags_64.h
> >> index 95cc014..069844d 100644
> >> --- a/lib/librte_eal/arm/include/rte_cpuflags_64.h
> >> +++ b/lib/librte_eal/arm/include/rte_cpuflags_64.h
> >> @@ -22,6 +22,7 @@ enum rte_cpu_flag_t {
> >>   	RTE_CPUFLAG_SHA2,
> >>   	RTE_CPUFLAG_CRC32,
> >>   	RTE_CPUFLAG_ATOMICS,
> >> +	RTE_CPUFLAG_SVE,
> >>   	RTE_CPUFLAG_AARCH64,
> >>   	/* The last item */
> >>   	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */
> diff
> >> --git a/lib/librte_eal/arm/rte_cpuflags.c
> >> b/lib/librte_eal/arm/rte_cpuflags.c
> >> index caf3dc8..b1e220b 100644
> >> --- a/lib/librte_eal/arm/rte_cpuflags.c
> >> +++ b/lib/librte_eal/arm/rte_cpuflags.c
> >> @@ -95,6 +95,7 @@ const struct feature_entry rte_cpu_feature_table[]
> = {
> >>   	FEAT_DEF(SHA2,		REG_HWCAP,    6)
> >>   	FEAT_DEF(CRC32,		REG_HWCAP,    7)
> >>   	FEAT_DEF(ATOMICS,	REG_HWCAP,    8)
> >> +	FEAT_DEF(SVE,		REG_HWCAP,    22)
> >>   	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
> >>   };
> >>   #endif /* RTE_ARCH */
> >> --
> >> 2.7.4
> >


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

* Re: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
  2020-07-22  6:35     ` Ruifeng Wang
@ 2020-08-17 12:43       ` Wei Hu (Xavier)
  0 siblings, 0 replies; 5+ messages in thread
From: Wei Hu (Xavier) @ 2020-08-17 12:43 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Wei Hu (Xavier), Honnappa Nagarahalli, dev, nd

Hi, Ruifeng Wang

On 2020/7/22 14:35, Ruifeng Wang wrote:
> Hi Xavier,
>
>> -----Original Message-----
>> From: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> Sent: Saturday, July 18, 2020 10:18 AM
>> To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
>> dev@dpdk.org
>> Cc: nd <nd@arm.com>; Ruifeng Wang <Ruifeng.Wang@arm.com>; Wei Hu
>> (Xavier) <xavier.huwei@huawei.com>
>> Subject: Re: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
>>
>> Hi, Honnappa Nagarahalli
>>
>>
>> On 2020/7/18 7:04, Honnappa Nagarahalli wrote:
>>> Hi,
>>> 	Thanks for the patch. Has this been tested on any platform (simulator,
>> emulator etc)? Do you plan to add more code using SVE?
>> We have tested it on FPGA board and will upstream some code using SVE
>> later.
> For completeness, cpuflags unit test also needs an update to check for the newly added SVE flag.
> BTW, is there a plan to add SVE2 flag as well?

I will add more flags to rte_cpu_feature_table in V2, sunch as SVE2, etc.

Thanks,

Xavier

> Thanks.
> Ruifeng
>> Thanks, Xavier
>>> Thank you,
>>> Honnappa
>>>
>>>> -----Original Message-----
>>>> From: dev <dev-bounces@dpdk.org> On Behalf Of Wei Hu (Xavier)
>>>> Sent: Friday, July 17, 2020 7:08 AM
>>>> To: dev@dpdk.org
>>>> Cc: xavier.huwei@huawei.com
>>>> Subject: [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64
>>>>
>>>> From: Chengwen Feng <fengchengwen@huawei.com>
>>>>
>>>> SVE is the next-generation SIMD extension of the ARMv8-A AArch64
>>>> instruction set.
>>>> The related marco definition can be found in linux kernel:
>>>>     arch/arm64/include/uapi/asm/hwcap.h
>>>>
>>>> This patch supports getting cpu SVE feature on ARM64 platform.
>>>>
>>>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>>>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>>>> ---
>>>>    lib/librte_eal/arm/include/rte_cpuflags_64.h | 1 +
>>>>    lib/librte_eal/arm/rte_cpuflags.c            | 1 +
>>>>    2 files changed, 2 insertions(+)
>>>>
>>>> diff --git a/lib/librte_eal/arm/include/rte_cpuflags_64.h
>>>> b/lib/librte_eal/arm/include/rte_cpuflags_64.h
>>>> index 95cc014..069844d 100644
>>>> --- a/lib/librte_eal/arm/include/rte_cpuflags_64.h
>>>> +++ b/lib/librte_eal/arm/include/rte_cpuflags_64.h
>>>> @@ -22,6 +22,7 @@ enum rte_cpu_flag_t {
>>>>    	RTE_CPUFLAG_SHA2,
>>>>    	RTE_CPUFLAG_CRC32,
>>>>    	RTE_CPUFLAG_ATOMICS,
>>>> +	RTE_CPUFLAG_SVE,
>>>>    	RTE_CPUFLAG_AARCH64,
>>>>    	/* The last item */
>>>>    	RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */
>> diff
>>>> --git a/lib/librte_eal/arm/rte_cpuflags.c
>>>> b/lib/librte_eal/arm/rte_cpuflags.c
>>>> index caf3dc8..b1e220b 100644
>>>> --- a/lib/librte_eal/arm/rte_cpuflags.c
>>>> +++ b/lib/librte_eal/arm/rte_cpuflags.c
>>>> @@ -95,6 +95,7 @@ const struct feature_entry rte_cpu_feature_table[]
>> = {
>>>>    	FEAT_DEF(SHA2,		REG_HWCAP,    6)
>>>>    	FEAT_DEF(CRC32,		REG_HWCAP,    7)
>>>>    	FEAT_DEF(ATOMICS,	REG_HWCAP,    8)
>>>> +	FEAT_DEF(SVE,		REG_HWCAP,    22)
>>>>    	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
>>>>    };
>>>>    #endif /* RTE_ARCH */
>>>> --
>>>> 2.7.4

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

end of thread, other threads:[~2020-08-17 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 12:08 [dpdk-dev] [PATCH] lib/librte_eal: support SVE flag on ARM64 Wei Hu (Xavier)
2020-07-17 23:04 ` Honnappa Nagarahalli
2020-07-18  2:17   ` Wei Hu (Xavier)
2020-07-22  6:35     ` Ruifeng Wang
2020-08-17 12:43       ` Wei Hu (Xavier)

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