From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0059.outbound.protection.outlook.com [104.47.34.59]) by dpdk.org (Postfix) with ESMTP id 451825599 for ; Thu, 11 May 2017 16:33:33 +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=NU/iNbzzVQqr3rAoxGhkjWBiJDAVSOmytQa8jRwemmD2G3rZoOhZKrjJ6aeFe6hGGmSM4ZUavv1nkcsPbPhLFfbaMLYS8lGmxY3iUM4Fif4/e4btjybTfUmdyDJ3VRw8KOyJfv4RDdbxQURIHcdvfYU75svQW4Kln/52lnr2DfU= 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; Thu, 11 May 2017 14:33:29 +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 07:33:11 -0700 Message-Id: <20170511143316.45835-2-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170511143316.45835-1-ashwin.sekhar@caviumnetworks.com> References: <20170510101643.30556-2-ashwin.sekhar@caviumnetworks.com> <20170511143316.45835-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: BN6PR13CA0043.namprd13.prod.outlook.com (10.171.172.29) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3cd069c-2f27-436f-5af7-08d4987ab25e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:1N4vYT5SEizr6VXEfx0EkbENopXUA/VHT1PZi8FexmmEm881hsHilOLuOMxGl/aj/Mi3Lysah2JfFF+KDbDAfWgMb98gPQuEx/ULAsL6lfTkqc5QMO/x5pjvXD80E1xaRgbJpuLrrQhW5gyPZThMdgdRrFGvBU6N7dG1wvhw8Vp4l4E12D+UxPRvwviRrYjwaH/Go+J+l+Ab8ZV/3FF31vGLPKOsmYls7eix2Z+HErJVJQRBBNcI9ZIju6NHZK91hyg+K7l3F/6UqBQpzbIaXfpNHCsZOFbY6dKH9VxtWJF1gfv0XtPFg0R8ArCyyzWR7AdL2QncuvjCbItZ8rcFPg==; 25:agR55BZ64pMRpqRsF3xJOCn9TKD8vn68p/JpVNwh/i+Okm5xCC+SMXlVb/p2EkngmnQnTOe9G20SicyvabqF+TTk3rtEZRMaYM9LEoTnw2IN7SMtCk7L/SgwB4Fck4itqfwujd4aN7iMf+H13nYVuh5YsDOgIwbY76tZxn3lgY9vh9Lu6CxwBZ0PB7m9IVwbH5wqNwI3iEN9G+seGj5oR5+7h+AIGFVfhwufNOYkhG6sMJihWE3YxDSGBf96it/woa8dPqP1Kt+6o3mUVfDY0Lgccy/9z2uba/zP/QHRV1Kmcbz2YGac34P43tyCbqmPSvIkXMclwqH7OpvcWZ6oa7i2H4AzVrsQOfa7CJSvkuDEh4ezb/MXz08Bd/rVXt5Jyzllx6v2Obm23W3GzOi0WjL3d70AilrJEj6104DbcYiyQV7PU82c1YXBvrlKKX00TKaviR6yMTN4UgX1JSgjhKMWkCX0bH9IsOIQMJ0cVuI= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:CSFEm4oyCXxYCalgm7MQSEIMXokTrALLcnJtL/6kUtKLYAPoR2koCS/uNu1xskBF3pkU+AHqxdxPe8TAuj75app4r7rSpRtJVegm9QOqhBepid5r2gZ/5rU4/xjRq+rdXHPgZ2MD0i7fQvOszRGWtlnLlOvpsQJxRBxhlsk+Cz5Z05ynI6Wk9UANhiCx5CywHiMnaV7lZexVSbo3WHOU76JBa944waZqUi+WigiJ1Bw=; 20:uPg4zZ/e2zZNC/hh1RihS/zYi4rx2HkqV4LX6NLO6OgliuUYm0KFOKa5YGPtXQxJEiAk8Qb2p+st7qPxVhgfa/X0SZD4Ha+FVzg/SN6Irl7D+VPuS1EKvKp9XLJWcvtGdat7jihB8MWFieZEFt4LJmZPuPPkwCfeekdFjShaCKT4slANtKaOqnSr+63kedbs1WxNUFUIU3eksnMfi3Qgs4OOqUWwqtWrEOQE8yHRg3K52ev8/i2RgOZOXUMiPN7aCxbhtEY6t6rEHcf6i34dWNVeId/IdfsO0O+OtQYs9gBtq21SY7ue5vz4+rl/B2NnIyxRzv2f+WsdLX0WDybSZXD0EFM/aAi6TVytuJPfPRc0b3qRtEb7Vxp68f4Ti4TLzon3f8nYKsph11leMPifx+4A0P/dcWQHLRGi/BoRc6iTTV0GhVOSHWwA93gEKF2NZsOJGA5LLZWLeT7i3GVdo7ytg7Jud2TLipc+DBD/H/9zylhMbjRvCUb3bUSzaoJAXmZQpFLJr8SgfUS5O3nWR9UGB9Y9XA0x29VCLx4UQu05ejbT8wXwd8E6WoFz9G7o6b/ibLPWMih+BLZ7TvLx+I75t1BAbP8DUPRMeFb7ijM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3002001)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:GR5edYVrkDZvDZxpGfoxB7vExNf9AP1dtOrbqvrFwVnSIQaE0Igw2Xp38T3/3gEK8WvqsKRaYYLif4FUhHvT+kXgkYLpL00SOWN0A5RM9Ejl29icgVJ1L+y+hbxgjSSndCF32iTb9CfL9xEpPPbTCq+FguIAjL2UGx3y25DxAnUXI7KBklqHQLve96l71Expf9PUs+9E9TaYHtytdLdCsm3+XvA4+Tdp5hGCREuh/pMynhWd50L/0HNu9Ckm2L2kIT1BXb4DbzfmAAFp83DLZ62/yimLW9P4yi2w5pwQK26FWdr6fwG/uhvE3mYxOtYFEEkPaEiBYfwKK5pOimR9TCguEOwlA+ayRL3uPgnx4e+fj+gRYv6sxn6nQPgxXdemuDdqS9+Zb4gv1HiszGuQ41hbSW5MvjjrgQf5K1XOaHeFx6vmcpCUvXWIWY2JLf+6mJo5kyp/Bmr+0/PixwKlqUrRnR4za1QTAP2msyU3QAC9orrAYyj9W5cTZN3zUgVv0ToEbZ2mJ27xOfhXpX5XwLEbw+/MODdp33UxatadMaEQ5d1jFw841Z48Nay1ZzvS39Jp5xKUP5Ul+AEwjuXVT+gHkzXD9KrDTUUpEFBxl6eg/rD4WMkH8Xg4Lq2zDtARYj4SzH1RtJie8NCNNDLMlAoCA/GZzYkfqyOwzWPkNrdnA4tWzK+QTo6ghrQOV+rPi7jOsr3uqFo8rsTwgkqRFDImG/YfFmzJBV0cOT0akDUGuesjUnOZWpRygyQVkBH40r5rRq1B+0W6WMgef+JeCg== X-Forefront-PRVS: 0304E36CA3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39840400002)(39400400002)(39410400002)(4326008)(7736002)(53936002)(478600001)(48376002)(50466002)(53416004)(38730400002)(72206003)(107886003)(110136004)(5660300001)(1076002)(6666003)(36756003)(6116002)(2950100002)(3846002)(305945005)(6512007)(42882006)(50226002)(76176999)(25786009)(81166006)(50986999)(6486002)(5003940100001)(8676002)(6506006)(42186005)(33646002)(47776003)(2906002)(189998001)(66066001); 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:a54MvnOTnFMc3Qfg2DGyUjQzxk5acskq4fT/v/7HS?= =?us-ascii?Q?0tj6ByDQcK1Q2o2w80DDn67L6VwV6cDdNKnVAA/m4dZTIQ+us20iji3vgFKM?= =?us-ascii?Q?UiMuuQASejyTwqaWWCgkhkGa7CaBgP01l4RaQN5EMWZM4P4JkInRLUnwNB/F?= =?us-ascii?Q?Npcy4eC6FioBCBu2YLXhKZC0v7r3bOsQZCo2Jc2Nyp9S94tuZy6f+xblmoXB?= =?us-ascii?Q?Q/uOq5kdAKCATRlNqROV0EKfR+a+ZFB37MQRjrlDA3UNH/XqF9DhW2NM1fvD?= =?us-ascii?Q?o5olNyHPIFPBZDuzSJCtIH6QZIvcF+cCGrEv1FpNItC5mhPvCixFMZnXkzfN?= =?us-ascii?Q?uI+f6jwSB6MSR/pS3ZiyVYEXDcySPgD1YtQzZ0hKAftiqcunJo+SAkkQrf/r?= =?us-ascii?Q?6CZBeM83rSsiByzwfnvgdbO+HReEpkIUSOrJZMu9upZxBdxzXjHaGxy+BFLm?= =?us-ascii?Q?I8D/X7Z+84AZbKMobPJPrgO0WwG3g4EyFCXkw3wo2WTZYrd9bUsKj/smDS4A?= =?us-ascii?Q?a2X4gGKf+vz2DzyRwPVEofaZ70/cZN267SQqLjN6CVQbX4qZ7PsJ2p3YGfdC?= =?us-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/OtC2GyplLIrKCJghodL1pQFiCu4qTASpoQBQZ471IUNLXXYc1EcUWQKcm/gIOKX3UcBWPqr2Vza02fcsrX/bEIRLKwYHzVOOOuI7qyI6OOCjERvk2Jx6qLVnh76gxgjfXgA6DerLNcLBC6VXgWWE8KpmA3Kz+DA==; 5:ZF4HcJpgIwur+ON2m9Pj+DuovMZ/7lH+Eb1cOlHYdSuf2hHnCGwbz+POIsBnrkeOLnL/Yggi2wzjKFiqzWEnZEHf8rVzFYFk8GmDvPsKVBofKKtD7/rMgHBNshlIZSI3uoTc4lmH25tRb83i6IlM8A==; 24:qbrlyI3caR/aHehq6iphSmIikarKmvCE0fGYu9efxcRTz4uzkuFbbtOCkpU0rLl6HMX/1r56MKQZweQCEW5h73omQAOooASnHtUv9yHLqQQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:qCO4PKss8MtYEeoOlGrnLhSWShzpcD00GOG9yoF4+qc6I66PJcDEhgQWjQCnR9exVdM5LDUUScSRZBpY213YrNnKt6pv5Uz41nRRcibQ0s6YfiJXBGSZuJMNI6BBW8AoEEfPYGySFA4czplPl8MAF5vAl8tAzuo+x4ll0FmesJOb3zpTBdDGw9mKgowKl1vdZ3ptHznKK0MQVPB7C57KI74zMUhicYKO67wmdRUxenlAn/bU4dtVu324hNfHCsBpKZh3V028qQzcuL2U0aK8mp2BdBP/dW/G0EWlM3Xl5kwqckPY/O5x/ZfpVRAKvpouNGkMoN54+TezynB6aGVeQA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2017 14:33:29.3448 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v2 1/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: Thu, 11 May 2017 14:33:34 -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