From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0050.outbound.protection.outlook.com [104.47.38.50]) by dpdk.org (Postfix) with ESMTP id 6AFB65920 for ; Fri, 12 May 2017 07:46:05 +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=QAMSrfDMiJlulqzHWKDVgkP1E68LJRpfJuUf8ArWswM=; b=GXMY+KGsyDlP6GhZFVRiIOKh1JBQ0oALY1y4udp+kgK/DDx/gUsDSfwBS9XN83ZesEgsXdsmBAin6631zLLM5AUYMO/3dFcz1wLk3UBd4ahSWO5mxW+XRT1ZU9CNYAKEmiCChKL4ysD1CRchZ2f8FowHsrCUHVs2tv715piDvhY= Authentication-Results: caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.com; 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.1084.16; Fri, 12 May 2017 05:46:02 +0000 From: Ashwin Sekhar T K To: jerin.jacob@caviumnetworks.com, thomas@monjalon.net, maciej.czekaj@caviumnetworks.com, viktorin@rehivetech.com, jianbo.liu@linaro.org, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, Ashwin Sekhar T K Date: Thu, 11 May 2017 22:45:43 -0700 Message-Id: <20170512054547.753-3-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170512054547.753-1-ashwin.sekhar@caviumnetworks.com> References: <20170510101643.30556-1-ashwin.sekhar@caviumnetworks.com> <20170512054547.753-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CY4PR04CA0039.namprd04.prod.outlook.com (10.172.133.25) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da6bc904-c482-4e5d-be5f-08d498fa2d21 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:UXE/zACO4cDBnXeEGAX4VbDWWebkEiet7N9YqXL9m8XD+1YXAvpUP2SPvwWy6p2+cq0cPQwrp//QGIg7jMaDdEwv0hGc1zHzBpCjdfhQrAIH4V4JlD+W4JXHq+K58FUKLgNHPpv+LwgNmzAsmYpDAio69I8aTMZRUo9Z61+fW8w+RWRK4aPLB3dbsddgobBE1QVOAP7InaSQqI/1m04tYHVFJzYhFk+GFd4OghK2Ec+BuXAGoHQ/n6vkbOK+W6Fp3C3bzZd64voUlnsWLvfXE5gyinn88xsN337/f5cvo5rSSS3JTUrD2w3W0GtTP+uw7bOnSDYwmwpL0SjZmMNEBg==; 25:/IUHjK6tjiU0WeouviCrBPwRypwY6WVMJ9jL/qxYaFhE4mNs0Uua8UI4hffjJY9UgWQ2vik1LbhnjP3eYy39M87XdJdkkMDkcMacOwfN6hfxUOJA3X1mBRQi61E+B+NTOg2rb30lDLY79ZY0JRU7kT8U7j28zsY5pX/TnN3Y9h/mgvuj6/atNEd3oJQ42mbKW5Ow/Q7u6Ipl2BEUUHRNn2dSXWGyJNvn3u67lg/wu4/7SsHwG3EABz6HINuV5np5rQSxHYScUP5lLtKJeTYLTzrEY7pA4OKTGVSg8Xyg+ZvZhWxqZb3r1I+gq07R66CF1UScrFkDxlBuFser4tvpaTXw0XDljrBHGfvbJd6dAa4EibNq1/KIE40oqoQIinBZ5Av0zWMi8ZpVk6DfsFy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; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:WYSCrdU6qL8dHPUkJNay2GMz9hQjnUNSF2Q4rAlNVd8Amhr7ZxBHTqKFaGKTUZIaCCL+DpiVgiR8o3lBAR9b5TI6wvBSAFznmSwdebTXxCnBqyUPYeAnJKBrnXcC8AFudF/V5q2mJfZ//pf1d0k5chTPfV9E8C6mCWLE3EUdr7KOAQURZ05GUttlR4t7Zy/MYp2HVuFTGkbNMM/6lknW5ZcXEqH++w3TmcQcTkosYUhG4Y0lVW+yyZRssHkM6dfmcMbdyHL3qcrZ55IOaW9PW1hoJ18FJQGU+rT2fOTztOOkfmUQtR3skfxiFWdNlUbgMxz/LVJfhivVcxmyTe2tWRE/WTV7KcsC2cJPijkn/LtLQKUTiKP2BtUavRcibHyh4bMlb1NjYyLLCSQMsMvGF2KpoPs1p7mvPsrLoj4Fb6sOFHnW4CE+ORM++4E+EmGBAda12Y7vQQvqeWInXJzsSuM/28HBtZlAYnNq9p93vk60iU/NC/LMd9XUuVOqJp6SodHKmwmDQnv6yA2/vBGFjBRTWG3JiDDZbVVfhO345JFKQgt+henWGaQOkVHwDf4gcs5KrkfKSi6qUVcbwOiljc8Hj16w7i6hQL5hWZL2bwY8BMPdqODHD2m2eAYlHFcqSCROxB/Kt/TwGSSQZeVlk8ghud9xIH2S26a3JODR0vSoCEhtrypNNaYyJgx0TEDiB0s9z3VTs0XBr2hdGInQk22XMN/M9IczHsOSHnQNzyoWn8O7XUdkmEn3WR80dLSHFSnHra2QEWIRM6IYm5TblQ== X-Forefront-PRVS: 0305463112 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39400400002)(39450400003)(39850400002)(39840400002)(6486002)(8676002)(6506006)(25786009)(81166006)(76176999)(42186005)(2906002)(189998001)(47776003)(66066001)(33646002)(48376002)(50986999)(53416004)(50466002)(53936002)(7736002)(4326008)(478600001)(305945005)(6512007)(50226002)(6116002)(3846002)(2950100002)(42882006)(72206003)(110136004)(107886003)(36756003)(5660300001)(6666003)(1076002)(38730400002)(32563001); 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-ascii?Q?1; BY2PR07MB2421; 23:+3PmB9cjz4SEsJuj2yo2+gbMdFMoEu9mX8pwZc+yT?= =?us-ascii?Q?67BJ9pWFsgbtaefTuzisZBXNCqIUQavroWFPKSd0pCOoL6noOTK26q4stw9y?= =?us-ascii?Q?EetOTa8Lq6Py5/5MBaMKatgYwVuxOGwTnhed+JHReO4YrWf726E4Suf/AM4n?= =?us-ascii?Q?H4ro0wI1Y5VrhgERgPk4nIAx9DBKhfrBGSAEryjaH2xdlHnHdW4YKS98AFEf?= =?us-ascii?Q?E2ZyYIWAsDikjGWqvWsGUJ0Tz815n5ZHwbpPbwRaic9T3czqmD40wJ3Ri0lq?= =?us-ascii?Q?Jw5AE5GF+Pdx0cTflo69OLkoWgMt4Syv4K1uw1RkOTq/Tf5xUzzkB1quxbpT?= =?us-ascii?Q?sLM2ryVz6++9t9BCsTOWvCsyjYEpDCAObU5Afv2ka/pk+pKlsGsvIW768c/o?= =?us-ascii?Q?P6VcucDLZxVwojrZfXlK7pkYCyB3iuWmQXl7i8WWNxGkqu6e6LxKmh3D5AuW?= =?us-ascii?Q?yyrOrYT3VugQxi9mqqmIcGG4WgBp2xFL0J4urwUybieeD1oIXUNgi7u5uGxD?= =?us-ascii?Q?QT9CAnoDAQRqTO4k4O+z8ExJThx00yW3zlgJWDn9jsDLd+eO4f7IYo6L0sip?= =?us-ascii?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eHVKHFt1iHBeEQpZmQDH+yMr4vvklA7/WrYqHwHRO+9zIWqyKIy7oheaD8HnAZhdcMtQCfgwji8LJD6XzwAG1bmcztX/IAL26uOmiKyXMDNAsKnA==; 5:xICAHgJm3bnS6IHy6PX4KtSy8eLi0jg+F0aDb2bKAX/DUb3InzPuJNGJlJTVQw9oObsJjYk0XcE21/JFWIlcnInqNDg99+FpOQo8SWwdFUVkesu6p1htJ4ZpWPh9K0zG9SugVIOSEtgl8EGn0dG5xA==; 24:70c5u0ghIa+psGh4xNRAoLyeTfBcwrjjEXLY5iCfn2SJy9kGrbOIguvpBAMDXNJ9UYYVubYgu7M1TjYQfVlpa9TIpNVYhJJH1lfkwL5VCks= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:Pm0JYL01qTShzVmJmv3NqTd7f/GGZ5wmLGE+r3ntF86tFkL5qchxk5mO5b8OKJHb2KUWjF3r5kClTtHx1JkW4/oAoP3YnhCTyCv+pS2dfe1wi1oDRTIbPcLB+yW3Lo+scVIcoyhbXjSUNC1+HK+DTZVMEhAfxDwpQIvMpHl/XA9dt2lFFZBdK6Lg1UBimJPDxDaj/EuQGTn8M6fHQpNY19JDBfxNXULFc4PrIwzU+2r2W/wHbMAKnPqXrnqXw1nKnparGSwVpB85AKoeX+ROWi7TQKkzARMC23/8BLCdyXry31zLnqMk8LexD293D8dvkAoQFXnvI1K+eBTLHPXodA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2017 05:46:02.5326 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v3 2/6] hash: compile armv8a CRC32 support conditionally 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, 12 May 2017 05:46:06 -0000 Compile the armv8a CRC32 support only if the machine has the CRC extensions i.e if RTE_MACHINE_CPUFLAG_CRC32 is defined. Removed the .arch assembly directives as these are no more necessary. Signed-off-by: Ashwin Sekhar T K Reviewed-by: Jerin Jacob --- lib/librte_hash/Makefile | 2 ++ lib/librte_hash/rte_crc_arm64.h | 4 ---- lib/librte_hash/rte_hash_crc.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile index d856aa26d..9cf13a045 100644 --- a/lib/librte_hash/Makefile +++ b/lib/librte_hash/Makefile @@ -49,8 +49,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_hash_crc.h ifeq ($(CONFIG_RTE_ARCH_ARM64),y) +ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),) SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h endif +endif SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h diff --git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h index 7dd6334ee..91cde3b9d 100644 --- a/lib/librte_hash/rte_crc_arm64.h +++ b/lib/librte_hash/rte_crc_arm64.h @@ -52,7 +52,6 @@ extern "C" { static inline uint32_t crc32c_arm64_u8(uint8_t data, uint32_t init_val) { - asm(".arch armv8-a+crc"); __asm__ volatile( "crc32cb %w[crc], %w[crc], %w[value]" : [crc] "+r" (init_val) @@ -63,7 +62,6 @@ crc32c_arm64_u8(uint8_t data, uint32_t init_val) static inline uint32_t crc32c_arm64_u16(uint16_t data, uint32_t init_val) { - asm(".arch armv8-a+crc"); __asm__ volatile( "crc32ch %w[crc], %w[crc], %w[value]" : [crc] "+r" (init_val) @@ -74,7 +72,6 @@ crc32c_arm64_u16(uint16_t data, uint32_t init_val) static inline uint32_t crc32c_arm64_u32(uint32_t data, uint32_t init_val) { - asm(".arch armv8-a+crc"); __asm__ volatile( "crc32cw %w[crc], %w[crc], %w[value]" : [crc] "+r" (init_val) @@ -85,7 +82,6 @@ crc32c_arm64_u32(uint32_t data, uint32_t init_val) static inline uint32_t crc32c_arm64_u64(uint64_t data, uint32_t init_val) { - asm(".arch armv8-a+crc"); __asm__ volatile( "crc32cx %w[crc], %w[crc], %x[value]" : [crc] "+r" (init_val) diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h index 0f485b854..808a082c5 100644 --- a/lib/librte_hash/rte_hash_crc.h +++ b/lib/librte_hash/rte_hash_crc.h @@ -453,7 +453,7 @@ crc32c_sse42_u64(uint64_t data, uint64_t init_val) static uint8_t crc32_alg = CRC32_SW; -#if defined(RTE_ARCH_ARM64) +#if defined(RTE_ARCH_ARM64) && defined(RTE_MACHINE_CPUFLAG_CRC32) #include "rte_crc_arm64.h" #else -- 2.12.2