From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0081.outbound.protection.outlook.com [104.47.41.81]) by dpdk.org (Postfix) with ESMTP id 4FD6AD075 for ; Thu, 27 Apr 2017 10:09:04 +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=9OJqPGHeG/bZNxThiAZP/S99Q67fcfKSlxci+f+Vl9M=; b=jwAB7zjtvewfm+txxNf4zmFRknGCVHWislSrrFXCaiqugDS/ZOAJQ4mSqAQQWNp7q9Dt/1sZnLfirlmJuOWM12tIujpQis9loOWWrIiWjnUuirTaCsaHsYQD2OJ42+4rbsMRn2t9dJW3Rs1Rdg2X6wlCBF/21FXWUhMw5oywLH4= 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 SN1PR07MB2430.namprd07.prod.outlook.com (10.169.127.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 08:09:00 +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 01:08:50 -0700 Message-Id: <20170427080850.31032-1-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.13.0.rc1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR10CA0069.namprd10.prod.outlook.com (10.169.238.31) To SN1PR07MB2430.namprd07.prod.outlook.com (10.169.127.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98e24779-357e-4d14-db29-08d48d44a9aa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:SN1PR07MB2430; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2430; 3:t59aaTo10zYLk4W5U0DSfm8yGbRIChUVhaR9HKWbwN2Sh76W2aPdQSvoIg6huISaW237wDgH/clc6FAJaH6ZyqJUxQMAOmQWUfaV++LkIY7veTZVaB1n48gD97hxgaK6q4tXhjF/cNkNTdKBTa2PcXj2HIOnKq384hXPW6lmJjJ52HaIolJDnoKfO4hAWja8UJ/hYQz9XC6KwnpA6socQz95rDAwwFTRBdfMvtRw8mZcReML3t7mYTD0udb8BTW2tJTi2v56BOI+wKiBsw9p0MsDHtlHqKJWx2jzeJArLjXeRHLo+zWZLpu91WdWXKQ5FcvlwtYqPhGtFBM9R17pIw==; 25:/WdFzyGd5ivR7r21sNtTsnCb/s8AXLmAYFnr3ndvgfvY+WdSMugZGfENkAXpre6HxBF0P/PQ/v1rqnU7tvsw9XbPpprNxachD794mT3huBalddwQiKlNQXlLx1vTBwom2WkCM82+ok/DmDlbwIHjyZbYIK2F70mVbxGPwG/iS7STIIryWcaVtgLysvICBwoXr7m9zsUvfzzX734cfQym02UtnWi2oqB+Q/h7MVDW7UQ7mHIYXu0UV4AP9BH9uzSdSOaivfh8jwvmWfGqbZITudaynJoP2pQCqLXmcw4cIIvkzsUcgnT2bBJMJ2DbbZNVO6u9wvmnlvOlS2hTfFl2DpKBLAb8mnxsHkQLbQQu+ymySCFMrqCQCxHczYeNuhxoU+U1+IfJtqomMqDOUDzkZiBe1tJpo7gfoA9oN+76Nf5CekBscuOg+cEn7b5Cb1EF2rqTjpT+RNJGtCHGYOB/cg== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2430; 31:qrePQHLdVHp0xmN2L7F+Eq6v41MZjVMBwK6zo17JNtNpKNcCHgicQSIoxa+3bKkEKwi6BmWj6SNDEakQ/GmBC2aPK/fddzCjxWJUiEW/Yv4LjNZiZY28MkAdFpl1CoSA63O1VNr/QAovNb/uCP6iNP2sbhOTmMOW6/Kk6Zy5pUtYJkaKpwBiBpdPw9mYl0MPhKeVPySCFe8a6d0uEdo+9X6+ipfRaCxVc19Mck7+PUI=; 20:xHM5Gw1K3nXNZTSP52rQttXDGaDv7aWBkeqCBPJOee3OTbZwn4PUDQrnnKSPf6Pm/0xNt8+gIltaleqwYgqTLUwnH5SUnwSR1HEwaQlIzjeOXxYDMVgzy209NdrDrz0nYCpkdztxwJfJWMIVkx5OjbRhfJTWB428+qjh5imPrQ5NhgshBBMztPblpVfH31Ac8Yof51h/wv36CgY45GEkS/qLVdki89I3Qg7HhVdJqqjjeGmdfg2T/aiss8Mb5uxoH3+LZUMH8Ok2xpORr9AeG99wTcl3beOc68ZdU+Go+SRDjeCv5M8l9qIpgLTtKJ5phrpMNmxmQNEQ/qb0rzDbL4lcIXJy1Wem3efDfxFu6x+Z39vkRzE9t6hp0dRXdks/ERjJp8QQ3RkIFKx3wQm0ZdHlsphx1fQW7fu05Mbroe4OOs1FSYwS/YRLTa60wHwc8TX7Jn7KbY6t/5Pt+7AJ9y3FKOx3VEY9eZZ3QZm5VlZX9QdHRSQGyOla2dEJl5KXJ2AjTYuCzwFQSKtMxUwvMH3QM6ibmzYF01LMySA3hJbZk3K7ChI5wgxsT8TdYgqHEczoWbsBf+UrBV1ozNCL4gmLbqUhLIvsCgjSeqD/YaA= 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)(93006095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148); SRVR:SN1PR07MB2430; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2430; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2430; 4:V/Nl6pvDhEv27FE4jKG1TFOQBXbk1zKuTidu/cbKCPh+4Rsnx2cY0tLHrIJehNF/OmDQR7D+lE0VqTYvFE8/G8XWsricD1NNlSKRep5TGMnwv87fgk2cxf8tvtamiUhbS1BAs1TrrMwvoPeaqjFWE2T78kvImreJuw3AQgJcLeviBL95mRLtrWk3HxN02Uf5HpB0n4DUz0+Hx8aNgYGMA28udFub4mMDQ38gMv09GaY08gZhoJos2i36PGR4LK2Z7JcppAdxU8+VOin6L1+//LOx7f4FfHvFblg1ZkSRKyXcR6kCejBqnWzSxpbC1dB02VUrue5pq/GB7x0jAI3kiaOkfjquZAB+w3CRe+AQsp94vA4rtHWQdCQclbF5uXMr4vIUvrabdjNhqK5XWmeDYm7lOsFeNY+SyutaRxefJOZpvfkzEKspctC6DtMRpeROaCHHQ5+qE/OzVhBG3zI4XcuDk/BKh2eq2GK+Lc1nHZ5tzba9S2LcCQ9tE5Y+aWhKWo6r5lHAYTi0sFLOdI6z5IIorMrVIq/917YoGnJMNXG+LcOA1dkZKFXSuB+Bw2llrFez00eKUV1u7SkV2k++7J3QI+9o3L9+a3ELi871JIZNzoBVw9DyICEns9Ke6nQiogoo5ryp6ZsWygpmyQaAYQ8ske21AtCg100Ar9Z/elTIwTdM8SJ03uxjTW6D1lSZ X-Forefront-PRVS: 029097202E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39850400002)(39450400003)(39840400002)(39410400002)(48376002)(6486002)(25786009)(36756003)(6506006)(66066001)(47776003)(50466002)(6512007)(3846002)(1076002)(50226002)(33646002)(6666003)(53416004)(189998001)(42186005)(6116002)(42882006)(81166006)(7736002)(305945005)(110136004)(5660300001)(5003940100001)(2906002)(107886003)(4326008)(53936002)(50986999)(8676002)(38730400002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2430; H:1scrb-1.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnost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iagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2430; 7:rsbRObajWQt4rWRdeC9t62Y9ZzMgprLQbbeYNG5Sh1JRannbFheh20tZZum76II+cuvnAypxUjQHW+9i6/vRjcvtHy0aBgOFHJBPQj3V1rrOq99ZHuO7qWdBTF18zAV6g+s4H+pGfC6+8x4cfmNWAlNnjj+uwgehPZtllhPlUpgVs05N7+v1COH9LL8RvJncbr0RdvklyC7M7NRCYDPi5GqiFr9nX6sHsaeGldgxzSH4kEU8bDX5NBoZtZtD7bYRJ7p1SWHlgnWzxwAM1xDOP6B67tALy1NZj2zpG7GN1/h1Qx1rDSvgWvrd0U3GtSqqM+qMcUx0+XZcFu7BEV353Q== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2017 08:09:00.4387 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2430 Subject: [dpdk-dev] [PATCH] 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 08:09:04 -0000 Tested using thash_autotest Signed-off-by: Ashwin Sekhar T K --- 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