From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0042.outbound.protection.outlook.com [104.47.33.42]) by dpdk.org (Postfix) with ESMTP id 0BC88F94 for ; Thu, 27 Apr 2017 15:00:42 +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=3HhJis4DHj1X9MG81+y3t4En9MwPM8iaRjOGK4TqNWA=; b=HyGN4nw1jQBBp/jJFWDcUceexL3npd6AsnmCFA1I7CBp6hr+Q7r1U/uIFIfRySKrsM81ttg+MFbhf9Zju86Le2Lek0e+756RMeTP7MfYekugPQAg1cYE7O9xzCZNOpxWvkOSRGTjYSz1HdFombvROmzIx/4CPwuClBO3QwKy8xA= 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 BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) 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 13:00:38 +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 06:00:07 -0700 Message-Id: <20170427130007.33210-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: MWHPR10CA0061.namprd10.prod.outlook.com (10.169.238.23) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 26e0fb0b-b1b9-471d-8d77-08d48d6d676b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:KXIMGg4hrHe8/w8xeI/C0BXacagvm6Wq27fH8leL8/1rVLMX7qi9kPuWae+2Iaoos45TQzwM8qmxYDtHbpTW3lKpOmeLxA+FzDhTDJzfXLlqXswxvTYPh5e6a3bXNR1KDo1IRHWeJL/Ug4128XPAnbJluHUeLlyp9IcUYbI68NcwBHq15M70t0uTZ+xgfkJ9xHRsIQypKXKpEpsAr2xz/uvz4beR3XT1iFDQnl0+ndCszvG34URsgiPgacbOFgf8mB6N0xBlbzyy9rUty9Qnw/1+96BBJGtQF+IF6mPV7BvmsjmnZgc5OyHKu6NwD7lbUWYfQKRhkq5nb7bWeGh7gA==; 25:aBxcC19gHzAGAneo013Ws5uM0mK4UT3M2eVrudhrWtIqKsVw60nyNxdhByf2tbN+YGtBWlrnN0VV5pUyYVSSZDHvgPHW/LLf/7omlYHJaUdkrup8dx3Nh6uWxcUeTjTozVQwZ24a8dPBmfNtfvoiaJI5d27Vts61Hldc1jPAeJdhPfUy+WG2ywLTbRpRmWpxMxcxlOS+5g0134W3C1eIVPvfjm+fsApzmX2RdUyWw8grOGObC+SqrVQTxorMfN6bKbOV+ut9GFjQdPgAmB/a5CHM7fM+Artle6tq6w+4OFjJW8ImsVZWp+kFpzXttUyY8r8N5kZYoFhdXClkyV68GCFSn+0r/nix8uf6nYr2NfSVdcNhlNECWBTfFQ/CDBK6Y9WfTZr0wqDv40CQG8EXXscY6D6G4kKGwcGVgWHf1nPTSsQ06z1G3wN4aVhamejr6l5q4esjblESg7mS6KPINQ== X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:ftsIDflz+m7u7qSbEk6n8xQwoQOWKdv+nXQYdnyqPaQ2D8jBxttGvDMAcrwzJ9teXMDsEfejE97OpsDr5YKp9DN7nSaRgFQmXx80p94kLlH6LO9jOukUwXMP/sfzjZq1mwGdBB4MamnPT+4GI3Tw0EBnBx+Obj7pMiltxpB/wc3wBxV5DG3KAQ+Y4QB3Qohncg321pqd/tWuYkd0BGuEjgntD1NozTSsgA4QKthOjOMiB6uJhlSkeByy13z1EhXH; 20:Thyv2IIYmC6K87AX7+9x+/bp81TyW+Fb/Vvn84S8bsAsDccG3B0nNT98dwlu0X2TcfrscSWzyCaiNmIozzgOLHFEVq7V7Y9y9+CtAzUhTwa3CPsGw0tsg7ss2vZkb7Iy7sAZE67TsNr2UzABce9lgHXu3toDprspaeDzgpyNu+U7Vv6LYGl7iEM3WkEPgJmLOJh8PGJkc/FzUyep0C8BQ58UjkftdnKaLgYAF52IFS9FsYd8MaBpd/9AUKkXKyfylgQUrgD2UvoHdLDCWARzt3wzl4EUhbbo14+kvHeCtuF/lOQUC+vHsVGabc1I/B9id7UxMgKhnZucPqmKUr25+2Fo2BXCiEKLiqE2vo0vBlr8YWBiQ7VKC04R22Ci/y/M7oCX+5lJm/sv0vIlnc9mXi4XD8ZN7wVeM0oslvnTydCMuhfX/4NmIEEWLA+5tOS0gqUER2AK6z8Om09nphpLGLsz8u06hQJ4Rc6hASazhvAULaAXqFXmadKPFLm/37ETyqdq42mIn/tCQ58Mb3g2snhpyROtO/1DTv/byKw4IF3H2w1veJTkbKAZ+/hRSHSvL6BXXoMNgbDAsKlMWkyw63uz2lWwmGztAsfmC0L+4Ws= 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)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:2mQslot3ZQLG95DMTvLhzot0xUUCWqKIcvj969ZsCa/FG5ooeydcERmIbKbAxiJLKnAfYG24umRYiLZ2Oy7/bIny2gW1YjUKsscCeBxKo5FNiE1z0fCx5/PUEO3M7ZI8fWaaiCJcxaiD8Cr9XyR/HhoxTzOrszLhdP7YHvgOxHp68dq3edBeMzgW2O8FONX5lmT8RkIUdxPKfT+H/cr95UPzEm59jfezvFYS0tb1q/3VT+U/cuS1CRwB0D/cYtqvyqLTcUDq/zEfXamCxsmvXARGOojg2g1xX+YEz7lmQpSTgjkCgrolkIbYL1lxYIxUPyyQ9uP50p9S7dYy8kMiJEcI5r6LbKfs/yQqqkePluhm6gS8yHbkqqWOV5vL634kIjWRBRUEUSHotoystLxTGFaFAqhrieynD6IH2oQbqHIMncncxNcF+iget7xfgI3SggkejS113jksUzrvgXMGdxmk7znXW22Fq24yLMUQQh9wTGofFxDB2KYu0gbZvDLhKB2opc84CD08wdbnFWZ5iQfL7abHsMIcQ0p3Sh4nB7hUfPi42/pIo0MRWgxTAXZPzU57T6IdH/yGV5xhAwXJacNpISk7tUvB24Xf5ZtzbYDAos7C7hDPXh+4euA0XDnyVDNAaP9qV4uqQRdVP63wa7FVS9kVTG0ZRs+dj21ZDiQyhrnFEkjCcoPQkkaye6tu X-Forefront-PRVS: 029097202E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(50226002)(2906002)(50986999)(33646002)(5660300001)(25786009)(1076002)(110136004)(38730400002)(107886003)(4326008)(53416004)(42186005)(305945005)(3846002)(6512007)(5003940100001)(6116002)(53936002)(50466002)(6506006)(189998001)(42882006)(36756003)(6486002)(47776003)(48376002)(66066001)(6666003)(8676002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB2421; H:1scrb-1.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-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KMZFCinNI5IxZro+rRb/MF1KmXO?= =?us-ascii?Q?vkoNo+ULi6cRchKzeHnq39F65/gO2NsIShX/yZOtvkzY1C/ZPapE4G0rj/dn?= =?us-ascii?Q?lJVfwdSjYPMfBPjAfPg76LyIE6DeXujMLLyIO6Dq5EYcELW6iEh+w9ZX99s2?= =?us-ascii?Q?IA=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 6:nl6XFJ3WEHCbkty8YEnO6j5QgV6is+SKR7zwDvBFQl7D3ittl7PhQYX5yNOTgdvcob5M/tOOroblAj0NiJnqOACsLW7SMval8AK5oim2siheiGDqdvmn06i/9RupCLdl5xMmLJ5Abjw8fw48L3l4hIvOgNmvZGEy9SCpF8p6QvmVd1/F2sDKV4RoIWV/wytAU0Iobh02l7vz38oK1p6v7QKg4kI9X0lDVc8Vo5gz5byACCpK+lt0usZqmKCafHFd9wMhFZTsn41WaUlb8MdJc1WjHbRE8qIpyCZN/+wlyUCZf9Q17Mv52oA7szCMFx+oW4g7BwIAS66Eq69aatEWwJw8NJ0ohHMyQTFjpo619J3CDTHZDvxNg6rzjnEIzdkQk/Za+VTPyTwKjYvVH490SMSYz8vudk30GiusbQOxALbFrJh5Q2NW5s3UOyjJniNgkT6zGzMcZCicp7FrcoWb14rHe9NTNUzUwDsKeuUPQYJHc1m3dNsAiwiWF+MPAFDQM48LGMnTBz2XoU7TYkrYWg==; 5:kYrRRbOlu/1XnV0X4iI+ysUhKfjoF4t45PMhr55pJdsqO5sKoJ6abeTidKPdoswZ638EGjblWrq6bMleODlhNgBuTNaPlN9HT6Uzt4kZFBtSxmKvnODggHCaIoBf6Lg3Ly8Tcqd5fFyvHkep5pcPRw==; 24:38ISqK8/2403N3ZhOf/DYJ5mPjOFIid+en1v+ns/1jX8UOFs18KC8t/DwF1kWjkHutDx17AMo6MnOxi7kavZ21ejAYlRh7HG6w1JQgW+1zw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:5lt22zSvedTlGv5E5CD/i2uurQuuJcPz3ftyWV0DA4uMESXFl3qTE7S+ElSU0MX+7Uk5+zZSuy6F5TNJDtD81bz6dBdr7yBsZOy3w9/vO4Ixy6Bx946l+kQz6kfu96y53x1OWtATP52+gYbSvMRm+VlcET5/4rroHeQKbctBz0UX2ddUzcCA1eFgEiCOIrgimAdhMcMcNIs8eZQEyXpCpusRwIrrFdcAg4CYMlsghRhcca/t2EVzCoBofdzq/ZWyXxJNwM+y8hSUgSf4cNz8mFyrvU5/+uz0F40pIKkYCI2rKVOwkCqrSzHbBTt1ZA+RbwRsdzM0WCVQFQiVYCSgHw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2017 13:00:38.7632 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH] sched: enable 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: Thu, 27 Apr 2017 13:00:42 -0000 * Enabled CONFIG_RTE_SCHED_VECTOR for arm64 * Verified the changes with sched_autotest unit test case Signed-off-by: Ashwin Sekhar T K --- config/defconfig_arm64-armv8a-linuxapp-gcc | 2 +- lib/librte_sched/rte_sched.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/config/defconfig_arm64-armv8a-linuxapp-gcc b/config/defconfig_arm64-armv8a-linuxapp-gcc index 65888ce..021044a 100644 --- a/config/defconfig_arm64-armv8a-linuxapp-gcc +++ b/config/defconfig_arm64-armv8a-linuxapp-gcc @@ -48,4 +48,4 @@ CONFIG_RTE_LIBRTE_FM10K_PMD=n CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n CONFIG_RTE_LIBRTE_AVP_PMD=n -CONFIG_RTE_SCHED_VECTOR=n +CONFIG_RTE_SCHED_VECTOR=y 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