* [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag
@ 2021-05-21 3:33 Chengwen Feng
2021-06-21 1:17 ` fengchengwen
2021-06-21 5:56 ` Ruifeng Wang
0 siblings, 2 replies; 4+ messages in thread
From: Chengwen Feng @ 2021-05-21 3:33 UTC (permalink / raw)
To: thomas, ferruh.yigit
Cc: dev, viktorin, ruifeng.wang, jerinj, bruce.richardson
If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary
could not run on non-SVE platform else it will encounter illegal
instruction [1].
This patch fixes it by add 'RTE_CPUFLAG_SVE' to compile_time_cpuflags,
so that rte_cpu_is_supported() will print meaningful log under above
situation.
[1] http://mails.dpdk.org/archives/dev/2021-May/209124.html
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
config/arm/meson.build | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index e83a56e..9b147c0 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -480,6 +480,10 @@ if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
endif
+if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
+ compile_time_cpuflags += ['RTE_CPUFLAG_SVE']
+endif
+
if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != ''
compile_time_cpuflags += ['RTE_CPUFLAG_CRC32']
endif
--
2.8.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag
2021-05-21 3:33 [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag Chengwen Feng
@ 2021-06-21 1:17 ` fengchengwen
2021-06-21 5:56 ` Ruifeng Wang
1 sibling, 0 replies; 4+ messages in thread
From: fengchengwen @ 2021-06-21 1:17 UTC (permalink / raw)
To: thomas, ruifeng.wang, Honnappa Nagarahalli
Cc: ferruh.yigit, dev, viktorin, jerinj, bruce.richardson
Hi, ARM guys, Thomas
Could you help review this patch ?
Thanks
On 2021/5/21 11:33, Chengwen Feng wrote:
> If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary
> could not run on non-SVE platform else it will encounter illegal
> instruction [1].
>
> This patch fixes it by add 'RTE_CPUFLAG_SVE' to compile_time_cpuflags,
> so that rte_cpu_is_supported() will print meaningful log under above
> situation.
>
> [1] http://mails.dpdk.org/archives/dev/2021-May/209124.html
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> config/arm/meson.build | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index e83a56e..9b147c0 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -480,6 +480,10 @@ if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
> compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
> endif
>
> +if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
> + compile_time_cpuflags += ['RTE_CPUFLAG_SVE']
> +endif
> +
> if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != ''
> compile_time_cpuflags += ['RTE_CPUFLAG_CRC32']
> endif
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag
2021-05-21 3:33 [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag Chengwen Feng
2021-06-21 1:17 ` fengchengwen
@ 2021-06-21 5:56 ` Ruifeng Wang
2021-06-23 7:29 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Ruifeng Wang @ 2021-06-21 5:56 UTC (permalink / raw)
To: Chengwen Feng, thomas, ferruh.yigit
Cc: dev, viktorin, jerinj, bruce.richardson, nd
> -----Original Message-----
> From: Chengwen Feng <fengchengwen@huawei.com>
> Sent: Friday, May 21, 2021 11:34 AM
> To: thomas@monjalon.net; ferruh.yigit@intel.com
> Cc: dev@dpdk.org; viktorin@rehivetech.com; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; jerinj@marvell.com;
> bruce.richardson@intel.com
> Subject: [PATCH] config/arm: add checking SVE cpuflag
>
> If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary could
> not run on non-SVE platform else it will encounter illegal instruction [1].
>
> This patch fixes it by add 'RTE_CPUFLAG_SVE' to compile_time_cpuflags, so
> that rte_cpu_is_supported() will print meaningful log under above situation.
>
> [1] http://mails.dpdk.org/archives/dev/2021-May/209124.html
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> config/arm/meson.build | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> e83a56e..9b147c0 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -480,6 +480,10 @@ if (cc.get_define('__ARM_NEON', args:
> machine_args) != '' or
> compile_time_cpuflags += ['RTE_CPUFLAG_NEON'] endif
>
> +if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
> + compile_time_cpuflags += ['RTE_CPUFLAG_SVE'] endif
> +
> if cc.get_define('__ARM_FEATURE_CRC32', args: machine_args) != ''
> compile_time_cpuflags += ['RTE_CPUFLAG_CRC32'] endif
> --
> 2.8.1
Thanks for the patch.
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag
2021-06-21 5:56 ` Ruifeng Wang
@ 2021-06-23 7:29 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2021-06-23 7:29 UTC (permalink / raw)
To: Chengwen Feng
Cc: ferruh.yigit, dev, viktorin, jerinj, bruce.richardson, nd, Ruifeng Wang
> > If compiled with SVE feature (e.g. "-march=armv8.2-a+sve'), the binary could
> > not run on non-SVE platform else it will encounter illegal instruction [1].
> >
> > This patch fixes it by add 'RTE_CPUFLAG_SVE' to compile_time_cpuflags, so
> > that rte_cpu_is_supported() will print meaningful log under above situation.
> >
> > [1] http://mails.dpdk.org/archives/dev/2021-May/209124.html
> >
> > Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>
> Thanks for the patch.
> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-23 7:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 3:33 [dpdk-dev] [PATCH] config/arm: add checking SVE cpuflag Chengwen Feng
2021-06-21 1:17 ` fengchengwen
2021-06-21 5:56 ` Ruifeng Wang
2021-06-23 7:29 ` 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).