From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0071.outbound.protection.outlook.com [104.47.40.71]) by dpdk.org (Postfix) with ESMTP id F040D2935 for ; Fri, 28 Apr 2017 08:16:02 +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=HxpNWvG2EsVmPhxQYvdvVMdL3e3Y9DTgnVs/FKR+iqs=; b=m7hNWO6X3+5qcQ3+CCWxhpYBslzJxNDbtSkvDUYCGVjUAbyhgq0DkgqG2VnvpbNbgujPFHE6uq1XbQUBnI/dhZcDQ4Yv8vZk9lXHizgdxEUSLoEBRsFHOhHqsjBKuxFU7tnlAP9lrK6yk7ohRKi2UbX2UkBK+c+KtJbtudJ5A9k= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=caviumnetworks.com; Received: from 1scrb-1.caveonetworks.com (50.233.148.156) by CY1PR07MB2428.namprd07.prod.outlook.com (10.166.195.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Fri, 28 Apr 2017 06:16:00 +0000 From: Ashwin Sekhar T K To: thomas@monjalon.net, cristian.dumitrescu@intel.com, jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org Cc: dev@dpdk.org, Ashwin Sekhar T K Date: Thu, 27 Apr 2017 23:15:48 -0700 Message-Id: <20170428061548.44424-1-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.13.0.rc1 In-Reply-To: <20170427130007.33210-1-ashwin.sekhar@caviumnetworks.com> References: <20170427130007.33210-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR10CA0071.namprd10.prod.outlook.com (10.169.238.33) To CY1PR07MB2428.namprd07.prod.outlook.com (10.166.195.17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4301783b-07cc-4ab3-b74b-08d48dfe0af7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR07MB2428; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2428; 3:OkQ2F1yMp/gnGZXwcW/Sk6IxyJ18BLvoShuepzyimS/Y3dRADXWdNsR+X49c7e5ra/29uo5XFgbkzRVVwdmazp6a2dyBOkVfSISDvAsW/pjfA7Z9NX6a6jhuBfgUC9feQeuHJAAc0KiVgm7hy+401SUERpuLTepVsyFI8WDcelaswRABRunNnSCEcofIx+Dfu0p6yfWGa7qRZpe0hf/DMC8k2BpJEqQe4U2xzmadG7gEU24s38DXIDV1qiYCW9LCf3J1d9KPbEmcBX7SsKLWWzy2W14ouKB5ozxDnnF46mWh0VLtYcjzyYaYvvvI0lpqN+8UPj/fKtmCTsawhnoggQ==; 25:S5lfHioyqeWQMxF+uxYccT2LyRbigPPr3SkfTLThK7M8SBdsBWYn+aqNILUtJKtfkKQBf6BZPlVxxWIMuUkEHI7cGJCto+hsUQURkLYo8x60cJL9Fcvzmrxgyvo4gS8C/TvycduTTiLUOW1TyC/J177CLHh3LKYEdZdwzZ7QkOQlDifntQXa++GW0yxUZjc/oh2apmdgPjwuEMowAnVTLNGWumg0f3hceXPq+t01cUs9t6P9yArJuZVPd22e14uVuXwXT/k0dkniiGH37cg7SGpMTbMLAftv53CCfB02gKIJ065JEJrCcvA55Dbv06jZX8SMk1P0FzLJYy1iy3ndCLINvCBVz2mOAm4hhL2kK0igSn+8c8IHz4o16GcUxTIeRAvCo3Mtjr0d94ovKS55enBKSsF+vzQ9L52ftIDDhNCgC76V38RPJSzXhVoqMsJVh0DPFTX3XGPlTfXyxutViA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2428; 31:edCmFT4dqPu3ibII2tvu3kQdWXbxL2NapzGAse3oJoD/u6cJqaTr3uN7KU5U8PlKIoTXJAOkCRtRHqfcYaeK30nv/m+K6+La6/WLRRDqZ/fN07i0AKRMBR3a23GfCwwIuYesIO+cD2eWIwF+sMewP8SthqjugQpOVhcJSpc69c+TMu/6SUVJVXB81ACD5q71kw7UuwKsxAVtFds6vsjmjLh9Bv5cxGtCRAeCH8vcPqU=; 20:4XBwjAmzcia/LwptGkW9N6/gUJKhAZE7b5M7VMAwl+C/5FDdx7W1Ako4yOXp8IYcOCQU6ekbTVWdr7vQcl7N9iIcAKmq439o4pS3DVs5v09/n6FkmL08cyzZ6aZ3JaEu4mox2PtxfUZwOsDdQL+r7GY24CYydnIBB6u1uGP0dHZt6t4OFtJVM+4HtpkEfYnymczeWKfh/z3HyKPMnRI+uVOej845T/jZwdiv+lpof0Hd6Je+Vj8e92uLInPz95eV5ezzQT00qmkl2Uh9rS6FoCsAxQ2Z5e4rpwvpqtcS0lqGnuGedOBDiaEm4YwqhyIsdO2AuWMyw4zX7fAAawhOKosEGWHSLLafrTTGnrpuVZSOlq75xoZ1PMvY6lF135SiD7VT03m60F0m/z3eE0sXjufyEqzBP8e5zwy27ZQDD9bppHzaG9NEYyk4xQOWwACv/2NZx+MQaQEpC8jCK4BjHT4XiHMikT6AGpOrKda3xr2RKguVBDBmguUhuPdfH0QHWlEj7zG99JexTIpyR7lLJHFNT3zAEhkWSKmG2ARCR2YIQJyK/DSXiZVyMze+XhceDN3oFxvaYrpMEfF8zP1mFskgYjVr9n1RWbDYVC6L59U= 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)(93006095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:CY1PR07MB2428; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2428; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2428; 4:7bEXzFwk70PM4Zh0CT2gjWYporCVnJeQ2iHw4tWAGMdYa3nnQu8DTNA80gdlGHajnQ7TKISiAVasNLd/4A/9fi2ZkKZ42QpUcmjW5IrPPeAlbM2lnXLfY2XzpYLPm8DVziw/BcDBC48Twg00+0/LHTc9HTaIntMNnSTGRFnUITDu6qGqkfbUtbqwh7mCgfGAhcLKWpGwwAl6k6FFhIPAcIj8xC1KtNgiIPD9sWDDDLBr+CrgcsgfPp9RAzr3G0G9NcKcsYISbS3Ha2lhMY+nT1ad5lbdc0Xor2BecDBiAEgue3LwH1YsYWntffoN412znMgx/NjWJ5YMO+9uXHTNKnVbRie69iMMXvHhz+qgi6r1LRyyThbt9cAv1LMuVpLAhgEoAzs+DOi61M2AOTwpZ3B7sDEa74wyEO2WAQ4qH+G6cvIrvNJTGG5QYtHGQs75J9NGoEKq0tSDLxuluQIx28vR1slU/NnvNhZvYjE8XeY4/nyHx4KfTYmrSOoIfCsJiRiS7cvIzp3OR21CPGmDeU8EVzUHXkGP3s6Zky4NhIX7I7XS64ZlPCGqy3uj2zJcYMhBQT5FxrDzkBT9EuhYWpvUuYuhe5Jo692q77N1TWy0KgqsrXo3Bh5eqstktpTqIowa4loUAtDbCP5FtTOZptH6LBSr2ZMFmYN7u5/Vbt03BK89a8TwFMIMnDPqv5HM X-Forefront-PRVS: 029174C036 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39450400003)(39850400002)(39410400002)(39840400002)(50466002)(48376002)(4326008)(25786009)(6666003)(38730400002)(2950100002)(42882006)(107886003)(110136004)(47776003)(66066001)(53416004)(42186005)(76176999)(50986999)(5003940100001)(33646002)(189998001)(2906002)(5660300001)(3846002)(1076002)(50226002)(6116002)(305945005)(7736002)(81166006)(8676002)(53936002)(6486002)(6506006)(6512007)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2428; H:1scrb-1.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2428; 23:6qdPB/RMNMPwRSzP1yvmUhuYU8HAHVjGZiAy65WVF?= =?us-ascii?Q?XbInmAXupRsRiiM1zsisi21fUn+xo0Uh+G7TwygxOvJ4vkIro9Rl1vVRU1pZ?= =?us-ascii?Q?tKbJrGPRjMBqj5xwUTZHSSbcZx4h/Zl+B0pyYvwuzsHEKZQTSTkE637Uumjd?= =?us-ascii?Q?Cz5pcpLs9lApIlPc2/ar8VK1BbUCCzzY2YNtlTSSYB/fPpDonYz7IrqYLK73?= =?us-ascii?Q?stGfTiCeMYqtYv6ZseMH33WAvyDA+d1e0HO6kaVpi7NhPZZmqND801BUzxWP?= =?us-ascii?Q?1DmF3vskZLennPH8ixH+Rwc8ck8vmNRqqg70GTFKUVRIved5hCTs5FGQElZm?= =?us-ascii?Q?Xh8dbUXBrdBWyQidEEFj0H8ERqLC3gSk5cqJNuor6pbVQ2F+JmCz5yo777l9?= =?us-ascii?Q?b4LlJ+GshzZPlwCFmxo+q+ukaMBTcG7z9FI93+iZVk5CB7PXOOsoUESgv9IL?= =?us-ascii?Q?AD+CX5wDGvn25yP5tyI+Mhn0nQPxwFquVJp5L0u2a2PcpkBaIJx63Tj9O54x?= =?us-ascii?Q?nYDRO3JwBduQotUpAh/hzp2LF/mQKgFgf/yY2kWxBhWTkgUFao7cdGLtsDRx?= =?us-ascii?Q?wXr+xVFDCI5GBJMRBGSBiMnYrURh5VgNhpyZRtc5c4MAUM18mcJRJOmdSbIA?= =?us-ascii?Q?ymjiixIYryg0VhbgnR0o3oJy+qwYGrW/qAPgWezMt1ONxeC1JOmIntkfvqy1?= =?us-ascii?Q?HsecFACi32GhfClkOUEHJjM91QbGZ5H99NetOKgEMBkfEi1rnAZi6vK+OEPe?= =?us-ascii?Q?s/b74fHFB5vO4B+kTm4oaQAvo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mmrZA==; 24:LZzZlKRvVDvEp1rDjFugjsSGoBtS4HWA9QZ2v/zyc/kpUjoctmcJ5tXUaVuS382cynMnTbC6+e5B2Px7cwtMSqh0wlQvAvDlbj14Luyln1I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2428; 7:EPu6ZMpjazK5n6eg8TWjUNz42ngKpRW6sC4VLwlXKXuQpVlaRBTlyIoXEBklaP7xi+TKbdSwYidnL8XAwHpSypt7VdluOrIMWWpBpXM8ipmEZuRNHmzT5WT5I8CuYJY7B7z18gjzc6MXVJKq8s8rgpmSIhgkioa7YsAt8VCcyPhtO3TBERCcLGyFw+nC80qUCuxLt3VRfvzE6sX9qwUAvbvFUlSOO+zxb7OpsP9t9Sv00XyN5nT/YuIOpwOPGeDKY09Ad8OxaHGxHhM+g6Nt0dCuvIqEajN65TXl/ZJEkIvX/HfgQPgOVcv3RMHC6XQcMvo18JTfj1KJIAjUuQ+JaA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2017 06:16:00.7565 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2428 Subject: [dpdk-dev] [PATCH v2] sched: add neon optimizations 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 06:16:03 -0000 * Removed setting CONFIG_RTE_SCHED_VECTOR=n from armv8a config so that the setting from common_base is taken as the default setting for armv8a * Verified the changes with sched_autotest unit test case Signed-off-by: Ashwin Sekhar T K --- v2: * Removed line CONFIG_RTE_SCHED_VECTOR=n from config/defconfig_arm64-armv8a-linuxapp-gcc * Modified the commit message and body to reflect the changes config/defconfig_arm64-armv8a-linuxapp-gcc | 2 -- lib/librte_sched/rte_sched.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/config/defconfig_arm64-armv8a-linuxapp-gcc b/config/defconfig_arm64-armv8a-linuxapp-gcc index 65888ce..6415f46 100644 --- a/config/defconfig_arm64-armv8a-linuxapp-gcc +++ b/config/defconfig_arm64-armv8a-linuxapp-gcc @@ -47,5 +47,3 @@ CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_LIBRTE_FM10K_PMD=n CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n CONFIG_RTE_LIBRTE_AVP_PMD=n - -CONFIG_RTE_SCHED_VECTOR=n diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 614705d..4ba476a 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -58,6 +58,8 @@ #if defined(__SSE4__) #define SCHED_VECTOR_SSE4 +#elif defined(RTE_MACHINE_CPUFLAG_NEON) +#define SCHED_VECTOR_NEON #endif #endif @@ -1732,6 +1734,26 @@ grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe) return 1; } +#elif defined(SCHED_VECTOR_NEON) + +static inline int +grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe) +{ + uint32x4_t index, pipes; + uint32_t *pos = (uint32_t *)port->grinder_base_bmp_pos; + + index = vmovq_n_u32(base_pipe); + pipes = vld1q_u32(pos); + if (!vminvq_u32(veorq_u32(pipes, index))) + return 1; + + pipes = vld1q_u32(pos + 4); + if (!vminvq_u32(veorq_u32(pipes, index))) + return 1; + + return 0; +} + #else static inline int -- 2.7.4