* [dpdk-dev] [PATCH] hash: add neon support for thash
@ 2017-04-27 8:08 Ashwin Sekhar T K
2017-04-27 12:33 ` [dpdk-dev] [PATCH v2] " Ashwin Sekhar T K
0 siblings, 1 reply; 4+ messages in thread
From: Ashwin Sekhar T K @ 2017-04-27 8:08 UTC (permalink / raw)
To: bruce.richardson, pablo.de.lara.guarch, jerin.jacob, jianbo.liu
Cc: dev, Ashwin Sekhar T K
Tested using thash_autotest
Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
---
lib/librte_hash/rte_thash.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h
index a4886a8..60d58c6 100644
--- a/lib/librte_hash/rte_thash.h
+++ b/lib/librte_hash/rte_thash.h
@@ -56,7 +56,7 @@ extern "C" {
#include <rte_ip.h>
#include <rte_common.h>
-#ifdef __SSE3__
+#if defined(__SSE3__) || defined(RTE_MACHINE_CPUFLAG_NEON)
#include <rte_vect.h>
#endif
@@ -176,6 +176,11 @@ rte_thash_load_v6_addrs(const struct ipv6_hdr *orig, union rte_thash_tuple *targ
ipv6 = _mm_loadu_si128((const __m128i *)orig->dst_addr);
*(__m128i *)targ->v6.dst_addr =
_mm_shuffle_epi8(ipv6, rte_thash_ipv6_bswap_mask);
+#elif defined(RTE_MACHINE_CPUFLAG_NEON)
+ uint8x16_t ipv6 = vld1q_u8((uint8_t const *)orig->src_addr);
+ vst1q_u8((uint8_t *)targ->v6.src_addr, vrev32q_u8(ipv6));
+ ipv6 = vld1q_u8((uint8_t const *)orig->dst_addr);
+ vst1q_u8((uint8_t *)targ->v6.dst_addr, vrev32q_u8(ipv6));
#else
int i;
for (i = 0; i < 4; i++) {
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] hash: add neon support for thash
2017-04-27 8:08 [dpdk-dev] [PATCH] hash: add neon support for thash Ashwin Sekhar T K
@ 2017-04-27 12:33 ` Ashwin Sekhar T K
2017-04-28 3:39 ` Jianbo Liu
0 siblings, 1 reply; 4+ messages in thread
From: Ashwin Sekhar T K @ 2017-04-27 12:33 UTC (permalink / raw)
To: bruce.richardson, pablo.de.lara.guarch, jerin.jacob, jianbo.liu
Cc: dev, Ashwin Sekhar T K
Verified the changes with thash_autotest unit test case
Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
---
v2:
* Slightly modified the content of the commit message body
* Added prefix [dpdk-dev] to the email subject line
lib/librte_hash/rte_thash.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h
index a4886a8..60d58c6 100644
--- a/lib/librte_hash/rte_thash.h
+++ b/lib/librte_hash/rte_thash.h
@@ -56,7 +56,7 @@ extern "C" {
#include <rte_ip.h>
#include <rte_common.h>
-#ifdef __SSE3__
+#if defined(__SSE3__) || defined(RTE_MACHINE_CPUFLAG_NEON)
#include <rte_vect.h>
#endif
@@ -176,6 +176,11 @@ rte_thash_load_v6_addrs(const struct ipv6_hdr *orig, union rte_thash_tuple *targ
ipv6 = _mm_loadu_si128((const __m128i *)orig->dst_addr);
*(__m128i *)targ->v6.dst_addr =
_mm_shuffle_epi8(ipv6, rte_thash_ipv6_bswap_mask);
+#elif defined(RTE_MACHINE_CPUFLAG_NEON)
+ uint8x16_t ipv6 = vld1q_u8((uint8_t const *)orig->src_addr);
+ vst1q_u8((uint8_t *)targ->v6.src_addr, vrev32q_u8(ipv6));
+ ipv6 = vld1q_u8((uint8_t const *)orig->dst_addr);
+ vst1q_u8((uint8_t *)targ->v6.dst_addr, vrev32q_u8(ipv6));
#else
int i;
for (i = 0; i < 4; i++) {
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] hash: add neon support for thash
2017-04-27 12:33 ` [dpdk-dev] [PATCH v2] " Ashwin Sekhar T K
@ 2017-04-28 3:39 ` Jianbo Liu
2017-07-03 13:02 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Jianbo Liu @ 2017-04-28 3:39 UTC (permalink / raw)
To: Ashwin Sekhar T K
Cc: Bruce Richardson, pablo.de.lara.guarch, Jerin Jacob, dev
On 27 April 2017 at 20:33, Ashwin Sekhar T K
<ashwin.sekhar@caviumnetworks.com> wrote:
> Verified the changes with thash_autotest unit test case
>
> Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
> ---
> v2:
> * Slightly modified the content of the commit message body
> * Added prefix [dpdk-dev] to the email subject line
>
> lib/librte_hash/rte_thash.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h
> index a4886a8..60d58c6 100644
> --- a/lib/librte_hash/rte_thash.h
> +++ b/lib/librte_hash/rte_thash.h
> @@ -56,7 +56,7 @@ extern "C" {
> #include <rte_ip.h>
> #include <rte_common.h>
>
> -#ifdef __SSE3__
> +#if defined(__SSE3__) || defined(RTE_MACHINE_CPUFLAG_NEON)
> #include <rte_vect.h>
> #endif
>
> @@ -176,6 +176,11 @@ rte_thash_load_v6_addrs(const struct ipv6_hdr *orig, union rte_thash_tuple *targ
> ipv6 = _mm_loadu_si128((const __m128i *)orig->dst_addr);
> *(__m128i *)targ->v6.dst_addr =
> _mm_shuffle_epi8(ipv6, rte_thash_ipv6_bswap_mask);
> +#elif defined(RTE_MACHINE_CPUFLAG_NEON)
> + uint8x16_t ipv6 = vld1q_u8((uint8_t const *)orig->src_addr);
> + vst1q_u8((uint8_t *)targ->v6.src_addr, vrev32q_u8(ipv6));
> + ipv6 = vld1q_u8((uint8_t const *)orig->dst_addr);
> + vst1q_u8((uint8_t *)targ->v6.dst_addr, vrev32q_u8(ipv6));
> #else
> int i;
> for (i = 0; i < 4; i++) {
> --
> 2.7.4
>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] hash: add neon support for thash
2017-04-28 3:39 ` Jianbo Liu
@ 2017-07-03 13:02 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-07-03 13:02 UTC (permalink / raw)
To: Ashwin Sekhar T K
Cc: dev, Jianbo Liu, Bruce Richardson, pablo.de.lara.guarch, Jerin Jacob
28/04/2017 05:39, Jianbo Liu:
> On 27 April 2017 at 20:33, Ashwin Sekhar T K
> <ashwin.sekhar@caviumnetworks.com> wrote:
> > Verified the changes with thash_autotest unit test case
> >
> > Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>
> > ---
> > v2:
> > * Slightly modified the content of the commit message body
> > * Added prefix [dpdk-dev] to the email subject line
>
> Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-03 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 8:08 [dpdk-dev] [PATCH] hash: add neon support for thash Ashwin Sekhar T K
2017-04-27 12:33 ` [dpdk-dev] [PATCH v2] " Ashwin Sekhar T K
2017-04-28 3:39 ` Jianbo Liu
2017-07-03 13:02 ` 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).