From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0084.outbound.protection.outlook.com [104.47.37.84]) by dpdk.org (Postfix) with ESMTP id E5495F94 for ; Thu, 27 Apr 2017 14:34:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zek7SrbwOMEPljJSckKMo2AdTFzWIzGOLUAXHHgCRYc=; b=cnEu7GdBysOMNNLuIERFjUY/fCat4H0yVrh2JkB2oRVfaerzbEpGoPzu6yye0IG6awaaA6tH0FU9Q65vzb91vpl14jGt/GvmDF8X/E56/a4KjNFhvGSaSGfffdkTChTj2N0unp/gTphWERdRtC1EoXj6LPdtwrO0U/LvA+boJiI= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from 1scrb-1.caveonetworks.com (50.233.148.156) by BL2PR07MB2418.namprd07.prod.outlook.com (10.167.101.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Thu, 27 Apr 2017 12:33:59 +0000 From: Ashwin Sekhar T K To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org Cc: dev@dpdk.org, Ashwin Sekhar T K Date: Thu, 27 Apr 2017 05:33:49 -0700 Message-Id: <20170427123349.32554-1-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.13.0.rc1 In-Reply-To: <20170427080850.31032-1-ashwin.sekhar@caviumnetworks.com> References: <20170427080850.31032-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: DM5PR2001CA0009.namprd20.prod.outlook.com (10.172.43.19) To BL2PR07MB2418.namprd07.prod.outlook.com (10.167.101.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2685cd6a-b490-42ef-39a4-08d48d69ae69 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BL2PR07MB2418; X-Microsoft-Exchange-Diagnostics: 1; BL2PR07MB2418; 3:B+5ZGWIw0f5KjjkCdDJs1w29dHpYEewJOHoUs0umZrP+oJiQzAS0BKm3cPKslngroek42VGxTgfMliU88vHuSV2N8R7JdfEqb29Y13pPLVLBus1J4lZMjBW/tZYSmpE2fW9zrQcByYUEdCtifAAisspf9b9ogyHyYb/CQ2dTjUd42SlXWL11N5l4LYBiVyNm/xppAWJaR8uZGtxeDGlrOQqgGr9FoHzO+fRIEHp97MtrP0aqWGRpRw3RseeJ7uZ3WlOwq+HtpCCzJsIWsVcrJMZ5qZCjyPKg3dpB9AXsDUb7xYqNXEy1c3TsDLmUqgvjRI0B7tHKLR33/PASlsfz5g==; 25:3w0b65u6epqSRvnrQeAqZtROhjOko4Y6JaQ3ccTpXjz11LmBqXvXIpxqgv9gpVXj/CKGaBO832GSrB33y5z+PfYdM9gF6wwSbgx3mOz29x5sYKBjU6EYmqTrsAMut4i59oF+CQ7gzS0wNYFx4FdkaQD7fwmzy5WscTgqIxGdppIz584jv/5BhMbHjLxZnwAMwF3GNJv8Cv8OF27WeuO0gJaHE6FnDz4/kTL4fU99tf9di8i2BVTv7A5tkIKBKR3tAs3z9zGCcA59kySZk7IGRhEAj5JcfovJANRdY3x4AZ2dcfoGnCLD75u7dsCYUNyyezILB57XqFtzBXB+XA04V7Ek4iazJr9ApjsTB0+PoqG2o/+HKT4hTevmRJcSbI9NXri2SitiuFKqIWugQPEeYkFuEp1BVg3fXdBxT1Pn4rVLEfxHmO9hLBV4bvfk8ShMWvqBlJDBQ4CWiw3Kd6uRDQ== X-Microsoft-Exchange-Diagnostics: 1; BL2PR07MB2418; 31:iF1xFB0JeUGIE1v2XGUNxs0RxKoVqL2YCCNec0cjSu7UCZo0S7qOIwWFvRuRIk/uESkxPjqewmEpD/KCxc/wcGR67JyWEI/AFrVSdV1X7ssj7IGakps5O5aOl0P6FlffspblVwB6+14C1oAaE1+fYH1eZAM9+msZp7eExhz3SIz0EV8xPwQ3k4Wg5THBvDbCD6m+qfP2xwTAEYmbvuPO6wSqtwbi+lqyO/IohUqeQSI=; 20:YXGzlHq4TVU2hbq08dTsmXexfEiPTj7/qd6grzjlYRn1DhC/ykbfEU7mP/rdSKKX9N1OsfQ7Um0MnDNpjrJBsB4gpMdZxnBknLjq+/Eaqbq+AoWL/WnIn+gT1CZrL9LWMF2yUtpyv2GTNWFoyU3OCEmoKr5jvmlTi19k9V49+9CPkQsOT7aSWEi2FxK4RWvq4MjSik9eFHxLUa58OvEpIgeBqr0SWIpgzybtbx2Ht8Y7s6G6nTjOtZc2sGFy10kH6p3scCadXPrk1YOLBiCL+ye0fWWez5+ZuSu3vKh0OFfrKwNn9A8lT4nT+zw1jP8qY06NM9ldKIJ8KmYS8FVzy5fGu48ICt7aKVZwdQrdsO8FU5embJxQFe7eVObUE7PfbeK0EWyKNswNX8Y84vFab1JUPe0FpejR92zAfNUD7kU4vJ3hl9IR2+PNiJAY5qg8lWIiaSiwLJP3dZq0u3YMhLkkIzdc69Hs9csFJ9bwswLpplCEdqJ6WOKrfo16wozUhWv7gUwOugQ5170YMs7SdkKKwDTq8FptQM1XiX2VBx0OT4rmghgMO1ufhpd9+r9tGWPJpdGQBAOG8+KLz2TPkboxVBHOLEpMB42aaIyx/mE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BL2PR07MB2418; BCL:0; PCL:0; RULEID:; SRVR:BL2PR07MB2418; X-Microsoft-Exchange-Diagnostics: 1; BL2PR07MB2418; 4:THdFWlnd1zg30tTqtIETSeSDo7n02d/1iXCptKdObU8JFbRYH1DNY2SvJ222gPvQ+M5KgPWjby/X530I7V2zVGT8ztc34ZRaNokNoBkaj/JwXBy0tEI+spD6i14wOTgTXoA6xJeOlAY3WNyS27D5vJwsFwa6io0uw/lI17Cm7RJEIpDyfMLJ0NNjX65aFX68t8dB6JsuyPREZ7joTbLcIudspVXyYkNOQxh5b/IO4eE0kFc0eFD8tEuUB0AHVi9KRAgbFXNrZ6NQwuULkMsCmEbFXdG5oXeFPTqRqAWl00iXLcHpt7vCqMEhTpOiTsdXpeqZ9l36FObqzdoDCDIPupetilOOlBHjglb7rS7o/7EXrbdRKO+JKeaBnFPdUEsIlcYfvxSdAa8FA5RAYL3qH0IiYMD5gCBdoZn5ZLR6LMgDFU8jBDjoRAMMYg9xZc6xcDTY65y/8sgz6djqq5D6kHsd6PVuUHaZ18AaZSFzw1dj66Fj2629HGZDzjJuj7lVsaR4wxqwe5udUlIcDLf0MnQXkyXyJ43VVHXpyOOfZNb+9e53uRhwGytchi+q5LNWu87xkmmInMgsQkWniKFgFP4nxkb7F+SxKjCJkCHORUxrrOtDABuEM/ETe+0G6LR32+W+iMK2nAuEuTmlvfE3oy+WZXjY4kNPATC+ul0Fo2xbmZfoHXpFQV9M1OuuzYxr X-Forefront-PRVS: 029097202E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(50226002)(25786009)(1076002)(50466002)(48376002)(2950100002)(42882006)(6666003)(36756003)(4326008)(50986999)(76176999)(66066001)(81166006)(47776003)(8676002)(38730400002)(107886003)(110136004)(33646002)(42186005)(53416004)(2906002)(6116002)(3846002)(5660300001)(6486002)(189998001)(6506006)(53936002)(6512007)(5003940100001)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR07MB2418; H:1scrb-1.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR07MB2418; 23:1Ea9RxdcyGgrdjJjImA/qL3LgJE8LN7SJDw5IIWrR?= =?us-ascii?Q?IfHQ75nDEQ/mdTgyoYWgl/Rqk/MmfdrTPOUTzymGw7Nf3OU150vCW5i1p8bo?= =?us-ascii?Q?ilECf+d7gRdAeJIGSFbyXceikn1Ryh0vv4GGFsW7/acMg5XVXDJn9l6EO+yq?= =?us-ascii?Q?zkKifV7ciQbCQ2lXSUqkh9uusiSglaNcqeO20jZDpeo34j4eDjZTTqIkLUPz?= =?us-ascii?Q?z1L1wkrZQb3pHruw1m1169CXU1CNCMg3FkW57tO+R+DyOj54GgLQkDiBQeOc?= =?us-ascii?Q?8OY5835eCUcD7iQ0c5gIw9HAPsZjGrbEc6f/0Ad14KojFynoP2kSdpAVKIex?= =?us-ascii?Q?RDgVYthEay+GAUeudcaeTgllnixj+XWX+03HjwQzJftpzS5zmDldvu2QE5fs?= =?us-ascii?Q?4Z814YbMXPh5IQkzqY5vFr0bbemm+WOzqZEjfFUDOQsCGYIPlDcGodewZ62M?= =?us-ascii?Q?ZAaYY5b+J7cVxczM+zsF21clI/ytFkZZx6xyKfAeMXOEry1xO5AJsO/BpDhY?= =?us-ascii?Q?anQUGkucxn/z50lWEDIjhhVrRzme3ojz4Xm7coAA0rIqQxSqv7z4sJq5FC5R?= =?us-ascii?Q?9BVpLf6QHQJkKDGmERHTSod5yuhWpprwJs7HkLYqhAGG3vb9WgFUTXi03aJB?= =?us-ascii?Q?GQk85IMFYUJeAt1In3wpAw0NFOBVaDcrXScBY/UkYuxRwKme+KNtb552H9Il?= =?us-ascii?Q?pP9Na2A3Ttqi62cPz4nJJ+B8/seCEuT4bi0JvpBR1ph4FH62+gg4Hle5fzn4?= =?us-ascii?Q?COS4cDBJ1YPF54A89o+As7ssRL8t8K2eo9NER5MTXS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h/nnAwceDSfPEzEed42bB14ePCh96+4YL1WvGyBai+4cCy8iRTzFdzZetlEVcp2wEnDhGDJt4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR07MB2418; 7:Z4i5DH8ubqW6obpFBPco5oH311LqI1StkYyCtMhiKGUTzZgqt0u0aJUUfMiLboRMu1Fmnw1fv7T4IlfxDhA3xbdl+UAK1xQQ4S5JFvYxJfPa4R3oVHUvunOqiu9hyyLqIoQl2FYOiLCnmrO8FW8WdyQ3xzCW57+8ZTzx+TBVU48Q1mJPy/t+1txVmVoT4+I7JbXbUYPSUnsq9hnMmY1w6hjmxwTEHfjyt9ZsqZ6dfA06dZavkjj2woshIvHgve6Nrj5VptSrLloFCxuOZ09ticbGzEWs4AaZWCq5x/srDI6V2aU8D3qJfVRkz8gyNWaTn5nZfERGOyiq6Z9Mj44g/g== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2017 12:33:59.6951 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR07MB2418 Subject: [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: Thu, 27 Apr 2017 12:34:02 -0000 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