* [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
@ 2017-07-07 16:26 Jerin Jacob
2017-07-08 17:08 ` Thomas Monjalon
2017-07-10 3:34 ` Jianbo Liu
0 siblings, 2 replies; 7+ messages in thread
From: Jerin Jacob @ 2017-07-07 16:26 UTC (permalink / raw)
To: dev; +Cc: thomas, jianbo.liu, viktorin, Jerin Jacob
vaddvq_u16() is not available for armv7.
Emulate the vaddvq_u16() using armv7 NEON intrinsics.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
lib/librte_eal/common/include/arch/arm/rte_vect.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
index 0670ca2ee..69fd428f3 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
@@ -77,6 +77,17 @@ vqtbl1q_u8(uint8x16_t a, uint8x16_t b)
return vld1q_u8(rte_ret.u8);
}
+
+static inline uint16_t
+vaddvq_u16(uint16x8_t a)
+{
+ uint32x4_t m = vpaddlq_u16(a);
+ uint64x2_t n = vpaddlq_u32(m);
+ uint64x1_t o = vget_low_u64(n) + vget_high_u64(n);
+
+ return vget_lane_u32((uint32x2_t)o, 0);
+}
+
#endif
#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
--
2.13.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
2017-07-07 16:26 [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant Jerin Jacob
@ 2017-07-08 17:08 ` Thomas Monjalon
2017-07-10 3:51 ` Jianbo Liu
2017-07-10 3:34 ` Jianbo Liu
1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2017-07-08 17:08 UTC (permalink / raw)
To: Jerin Jacob, jianbo.liu, viktorin; +Cc: dev
07/07/2017 18:26, Jerin Jacob:
> vaddvq_u16() is not available for armv7.
> Emulate the vaddvq_u16() using armv7 NEON intrinsics.
After implementing this function, another missing function appears:
lib/librte_sched/rte_sched.c:1747:7: error:
implicit declaration of function ‘vminvq_u32’
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
2017-07-08 17:08 ` Thomas Monjalon
@ 2017-07-10 3:51 ` Jianbo Liu
2017-07-10 7:28 ` Thomas Monjalon
0 siblings, 1 reply; 7+ messages in thread
From: Jianbo Liu @ 2017-07-10 3:51 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Jerin Jacob, Jan Viktorin, dev
On 9 July 2017 at 01:08, Thomas Monjalon <thomas@monjalon.net> wrote:
> 07/07/2017 18:26, Jerin Jacob:
>> vaddvq_u16() is not available for armv7.
>> Emulate the vaddvq_u16() using armv7 NEON intrinsics.
>
> After implementing this function, another missing function appears:
>
> lib/librte_sched/rte_sched.c:1747:7: error:
> implicit declaration of function ‘vminvq_u32’
But sched_vector is disabled in defconfig_arm-armv7a-linuxapp-gcc:
CONFIG_RTE_SCHED_VECTOR=n
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
2017-07-10 3:51 ` Jianbo Liu
@ 2017-07-10 7:28 ` Thomas Monjalon
2017-07-10 7:32 ` Thomas Monjalon
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2017-07-10 7:28 UTC (permalink / raw)
To: Jianbo Liu, Jerin Jacob; +Cc: dev, Jan Viktorin
10/07/2017 05:51, Jianbo Liu:
> On 9 July 2017 at 01:08, Thomas Monjalon <thomas@monjalon.net> wrote:
> > 07/07/2017 18:26, Jerin Jacob:
> >> vaddvq_u16() is not available for armv7.
> >> Emulate the vaddvq_u16() using armv7 NEON intrinsics.
> >
> > After implementing this function, another missing function appears:
> >
> > lib/librte_sched/rte_sched.c:1747:7: error:
> > implicit declaration of function ‘vminvq_u32’
>
> But sched_vector is disabled in defconfig_arm-armv7a-linuxapp-gcc:
> CONFIG_RTE_SCHED_VECTOR=n
Yes, I really need to fix test-build.sh which is enabling SCHED_VECTOR.
So with this patch, the error remains:
examples/l3fwd/l3fwd_neon.h:113:6: error:
implicit declaration of function ‘vaddvq_u16’
v = vaddvq_u16(dp1);
^~~~~~~~~~
We need to include rte_vect.h.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
2017-07-10 7:28 ` Thomas Monjalon
@ 2017-07-10 7:32 ` Thomas Monjalon
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-07-10 7:32 UTC (permalink / raw)
To: Jianbo Liu, Jerin Jacob; +Cc: dev, Jan Viktorin
10/07/2017 09:28, Thomas Monjalon:
> 10/07/2017 05:51, Jianbo Liu:
> > On 9 July 2017 at 01:08, Thomas Monjalon <thomas@monjalon.net> wrote:
> > > 07/07/2017 18:26, Jerin Jacob:
> > >> vaddvq_u16() is not available for armv7.
> > >> Emulate the vaddvq_u16() using armv7 NEON intrinsics.
> > >
> > > After implementing this function, another missing function appears:
> > >
> > > lib/librte_sched/rte_sched.c:1747:7: error:
> > > implicit declaration of function ‘vminvq_u32’
> >
> > But sched_vector is disabled in defconfig_arm-armv7a-linuxapp-gcc:
> > CONFIG_RTE_SCHED_VECTOR=n
>
> Yes, I really need to fix test-build.sh which is enabling SCHED_VECTOR.
>
> So with this patch, the error remains:
> examples/l3fwd/l3fwd_neon.h:113:6: error:
> implicit declaration of function ‘vaddvq_u16’
> v = vaddvq_u16(dp1);
> ^~~~~~~~~~
>
> We need to include rte_vect.h.
Forget it, I mixed up my branches :/
So the patch is OK, compilation is fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
2017-07-07 16:26 [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant Jerin Jacob
2017-07-08 17:08 ` Thomas Monjalon
@ 2017-07-10 3:34 ` Jianbo Liu
2017-07-10 7:35 ` Thomas Monjalon
1 sibling, 1 reply; 7+ messages in thread
From: Jianbo Liu @ 2017-07-10 3:34 UTC (permalink / raw)
To: Jerin Jacob; +Cc: dev, Thomas Monjalon, Jan Viktorin
On 8 July 2017 at 00:26, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> vaddvq_u16() is not available for armv7.
> Emulate the vaddvq_u16() using armv7 NEON intrinsics.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> lib/librte_eal/common/include/arch/arm/rte_vect.h | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
> index 0670ca2ee..69fd428f3 100644
> --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
> +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
> @@ -77,6 +77,17 @@ vqtbl1q_u8(uint8x16_t a, uint8x16_t b)
>
> return vld1q_u8(rte_ret.u8);
> }
> +
> +static inline uint16_t
> +vaddvq_u16(uint16x8_t a)
> +{
> + uint32x4_t m = vpaddlq_u16(a);
> + uint64x2_t n = vpaddlq_u32(m);
> + uint64x1_t o = vget_low_u64(n) + vget_high_u64(n);
> +
> + return vget_lane_u32((uint32x2_t)o, 0);
> +}
> +
> #endif
>
> #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
> --
> 2.13.2
>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
2017-07-10 3:34 ` Jianbo Liu
@ 2017-07-10 7:35 ` Thomas Monjalon
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-07-10 7:35 UTC (permalink / raw)
To: Jerin Jacob; +Cc: dev, Jianbo Liu, Jan Viktorin
10/07/2017 05:34, Jianbo Liu:
> On 8 July 2017 at 00:26, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> > vaddvq_u16() is not available for armv7.
> > Emulate the vaddvq_u16() using armv7 NEON intrinsics.
> >
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>
> Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Applied, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-07-10 7:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 16:26 [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant Jerin Jacob
2017-07-08 17:08 ` Thomas Monjalon
2017-07-10 3:51 ` Jianbo Liu
2017-07-10 7:28 ` Thomas Monjalon
2017-07-10 7:32 ` Thomas Monjalon
2017-07-10 3:34 ` Jianbo Liu
2017-07-10 7:35 ` 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).