DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__ is defined
@ 2018-08-22 15:01 Honnappa Nagarahalli
  2018-08-29  7:01 ` Gavin Hu
  2018-08-29  7:21 ` Jerin Jacob
  0 siblings, 2 replies; 3+ messages in thread
From: Honnappa Nagarahalli @ 2018-08-22 15:01 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, gavin.hu, rasland, therbert, honnappa.nagarahalli

GCC version 4.8.5 does not pre-define __ARM_NEON. NEON is not
optional for ArmV8. Hence NEON related code can be enabled
when __aarch64__ is defined.

Bugzilla ID: 82

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Reported-by: Thomas F Herbert <therbert@redhat.com>
---
 config/arm/meson.build | 3 ++-
 mk/rte.cpuflags.mk     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 40dbc87f7..94cca490e 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -157,7 +157,8 @@ else
 endif
 message(machine_args)
 
-if cc.get_define('__ARM_NEON', args: machine_args) != ''
+if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
+    cc.get_define('__aarch64__', args: machine_args) != '')
 	dpdk_conf.set('RTE_MACHINE_CPUFLAG_NEON', 1)
 	compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
 endif
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 60713137d..43ed84155 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -89,7 +89,7 @@ CPUFLAGS += VSX
 endif
 
 # ARM flags
-ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_NEON),)
+ifneq ($(filter __ARM_NEON __aarch64__,$(AUTO_CPUFLAGS)),)
 CPUFLAGS += NEON
 endif
 
-- 
2.17.1

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

* Re: [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__ is defined
  2018-08-22 15:01 [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__ is defined Honnappa Nagarahalli
@ 2018-08-29  7:01 ` Gavin Hu
  2018-08-29  7:21 ` Jerin Jacob
  1 sibling, 0 replies; 3+ messages in thread
From: Gavin Hu @ 2018-08-29  7:01 UTC (permalink / raw)
  To: Honnappa Nagarahalli, bruce.richardson
  Cc: dev, rasland, therbert, Honnappa Nagarahalli, nd



> -----Original Message-----
> From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Sent: Wednesday, August 22, 2018 11:01 PM
> To: bruce.richardson@intel.com
> Cc: dev@dpdk.org; Gavin Hu <Gavin.Hu@arm.com>; rasland@mellanox.com;
> therbert@redhat.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>
> Subject: [PATCH] build: enable Arm NEON flags when __aarch64__ is defined
> 
> GCC version 4.8.5 does not pre-define __ARM_NEON. NEON is not optional
> for ArmV8. Hence NEON related code can be enabled when __aarch64__ is
> defined.
> 
> Bugzilla ID: 82
> 
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Reported-by: Raslan Darawsheh <rasland@mellanox.com>
> Reported-by: Thomas F Herbert <therbert@redhat.com>
Acked-by: Gavin Hu <gavin.hu@arm.com>
> ---
>  config/arm/meson.build | 3 ++-
>  mk/rte.cpuflags.mk     | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> 40dbc87f7..94cca490e 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -157,7 +157,8 @@ else
>  endif
>  message(machine_args)
> 
> -if cc.get_define('__ARM_NEON', args: machine_args) != ''
> +if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
> +    cc.get_define('__aarch64__', args: machine_args) != '')
>  	dpdk_conf.set('RTE_MACHINE_CPUFLAG_NEON', 1)
>  	compile_time_cpuflags += ['RTE_CPUFLAG_NEON']  endif diff --git
> a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index 60713137d..43ed84155
> 100644
> --- a/mk/rte.cpuflags.mk
> +++ b/mk/rte.cpuflags.mk
> @@ -89,7 +89,7 @@ CPUFLAGS += VSX
>  endif
> 
>  # ARM flags
> -ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_NEON),)
> +ifneq ($(filter __ARM_NEON __aarch64__,$(AUTO_CPUFLAGS)),)
>  CPUFLAGS += NEON
>  endif
> 
> --
> 2.17.1

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

* Re: [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__ is defined
  2018-08-22 15:01 [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__ is defined Honnappa Nagarahalli
  2018-08-29  7:01 ` Gavin Hu
@ 2018-08-29  7:21 ` Jerin Jacob
  1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2018-08-29  7:21 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: bruce.richardson, dev, gavin.hu, rasland, therbert

-----Original Message-----
> Date: Wed, 22 Aug 2018 10:01:07 -0500
> From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> To: bruce.richardson@intel.com
> CC: dev@dpdk.org, gavin.hu@arm.com, rasland@mellanox.com,
>  therbert@redhat.com, honnappa.nagarahalli@arm.com
> Subject: [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__
>  is defined
> X-Mailer: git-send-email 2.7.4
> 
> External Email
> 
> GCC version 4.8.5 does not pre-define __ARM_NEON. NEON is not
> optional for ArmV8. Hence NEON related code can be enabled
> when __aarch64__ is defined.
> 
> Bugzilla ID: 82
> 
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Phil Yang <phil.yang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> Reported-by: Raslan Darawsheh <rasland@mellanox.com>
> Reported-by: Thomas F Herbert <therbert@redhat.com>

Fixes:
Cc: stable
blank line
Reported-by:
Suggested-by:
Signed-off-by:

In general, Please follow the above order.

With above change:
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> ---
>  config/arm/meson.build | 3 ++-
>  mk/rte.cpuflags.mk     | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index 40dbc87f7..94cca490e 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -157,7 +157,8 @@ else
>  endif
>  message(machine_args)
> 
> -if cc.get_define('__ARM_NEON', args: machine_args) != ''
> +if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
> +    cc.get_define('__aarch64__', args: machine_args) != '')
>         dpdk_conf.set('RTE_MACHINE_CPUFLAG_NEON', 1)
>         compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
>  endif
> diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
> index 60713137d..43ed84155 100644
> --- a/mk/rte.cpuflags.mk
> +++ b/mk/rte.cpuflags.mk
> @@ -89,7 +89,7 @@ CPUFLAGS += VSX
>  endif
> 
>  # ARM flags
> -ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_NEON),)
> +ifneq ($(filter __ARM_NEON __aarch64__,$(AUTO_CPUFLAGS)),)
>  CPUFLAGS += NEON
>  endif
> 
> --
> 2.17.1
> 

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

end of thread, other threads:[~2018-08-29  7:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22 15:01 [dpdk-dev] [PATCH] build: enable Arm NEON flags when __aarch64__ is defined Honnappa Nagarahalli
2018-08-29  7:01 ` Gavin Hu
2018-08-29  7:21 ` Jerin Jacob

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