From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f176.google.com (mail-yw0-f176.google.com [209.85.161.176]) by dpdk.org (Postfix) with ESMTP id 226389E3 for ; Fri, 28 Apr 2017 05:39:41 +0200 (CEST) Received: by mail-yw0-f176.google.com with SMTP id 203so25266541ywe.0 for ; Thu, 27 Apr 2017 20:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bDRacuXm7GzVXWDParlSPmUoXfefVEUZZXVn4HQnjRk=; b=ALfrNT2m2LjgRwNW92MCi8119xHhVtGodHOcowW117mjM0mXr+KIYGI28QRd1I8NEn xbpjS5v2RDzvTfIZKd/JxYADaHnQobIt9R22Y0Mt2O8R9o7p3ePd+xiptoVVc869GWOV UCQNvnTrpQORKFLlQouCNwupn/3SZ1Yt7rvv8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bDRacuXm7GzVXWDParlSPmUoXfefVEUZZXVn4HQnjRk=; b=fgXSvjHeiW9EtuyAoqOSfuNsUZF8f9KWAyzciBH3NLm0Ej3dasYOfkFko3o+A4k19I YpeHgLQNx8av5sG85PUI9rsi3uyKwH7j43AsfK0x2nhPawi68Vj0u1f+4oVlLYGi+Y2I FE3380hq3NOfJdRAgXfLE/yKfLQcZVnbHaaXALqyQxqpVO2HOaWImaPL198x3VZk9Jpn y2wk7XDOVl6AiuYo+qIcdq0Z0JSRrZ5YRaUhAwyPOylocECGDaMbALWOnTV8NBrFlPPx ExsRBT8GdIIW4ZADoH6K0Dpr9X7s5VZtnk5OxZw++HR/tgzeDG0ICc702Uypm0LgBWAt 0JBQ== X-Gm-Message-State: AN3rC/42kd9N8fmrPU6x8qswrT7iV/TJ0BfOVaCd6cNZbasiiO/lawxx TnIfU3wWPsesifviCIRanja03Vfo+hl8 X-Received: by 10.13.230.86 with SMTP id p83mr6071656ywe.207.1493350780419; Thu, 27 Apr 2017 20:39:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.4.16 with HTTP; Thu, 27 Apr 2017 20:39:39 -0700 (PDT) In-Reply-To: <20170427123349.32554-1-ashwin.sekhar@caviumnetworks.com> References: <20170427080850.31032-1-ashwin.sekhar@caviumnetworks.com> <20170427123349.32554-1-ashwin.sekhar@caviumnetworks.com> From: Jianbo Liu Date: Fri, 28 Apr 2017 11:39:39 +0800 Message-ID: To: Ashwin Sekhar T K Cc: Bruce Richardson , pablo.de.lara.guarch@intel.com, Jerin Jacob , dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH v2] hash: add neon support for thash X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2017 03:39:41 -0000 On 27 April 2017 at 20:33, Ashwin Sekhar T K wrote: > Verified the changes with thash_autotest unit test case > > Signed-off-by: Ashwin Sekhar T K > --- > 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 > #include > > -#ifdef __SSE3__ > +#if defined(__SSE3__) || defined(RTE_MACHINE_CPUFLAG_NEON) > #include > #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