From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0049.outbound.protection.outlook.com [104.47.42.49]) by dpdk.org (Postfix) with ESMTP id 9D8E0532E for ; Wed, 10 May 2017 12:17:01 +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=v/Mmx0bDnU51u6OztLRKj3eWSwBhTJ3j1f2yuiRWGOg=; b=BqjPqdXXDigoTVna+JHwbWvM2QnAOVoSD4q3+foLOHEwrHuMVZpM+yWJ4LSuTnguuhJPxobkHIzrv9M6WRneNtLXKQb3iP+bkTKnDEj4Z9Ohd5Y9koCBCIVey8WbFXGeQssaUkKLhtVD4f2QlTN/vxo5OZtwxO25eOwKtgbpjEM= 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.1084.16; Wed, 10 May 2017 10:16:58 +0000 From: Ashwin Sekhar T K To: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, 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: Wed, 10 May 2017 03:16:38 -0700 Message-Id: <20170510101643.30556-2-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.13.0.rc1 In-Reply-To: <20170510101643.30556-1-ashwin.sekhar@caviumnetworks.com> References: <20170510101643.30556-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: DM5PR2001CA0008.namprd20.prod.outlook.com (10.172.43.18) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ecef5cc9-78b1-4d01-350a-08d4978db19f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:BfeEXiDIKjvQ7bAvhhJ1QCMWP2S4bYCLRsTJgqa/rC2harq//WXINKQTzZgghEEr9MxhU4ZJPvpQO7ryQCrJPebg16kSzUybJzVBvoDmeGwOMkwVp1b6vvfLle8u7M8+mJi6ejFi7uS5n7+kjckwePMX9XYE+LqBPXqGaohFMbkquDNtEiZPLq8K0BqRQl1pUYGIKpgqdOFtfOF4YCSHk0itxEJ80gMtnYojkiKcQEGPHEBeuWfzDcc6QyE9vVn3/IrbKy0pd/BhvkY1ufX8vNvvIQOfeSPVDErkle/x/nYLPZglmZACoLU5hKTguIdTRh+vteXvnj+CVFyn7IJyew==; 25:Z+hLrft6TWg/QQkvJ7AatBj5b+ZLG1YAYlgPni2P527TLjqPkeUn1a6TURtLw4rjjaHG2zoeLO9vwsA9IZVV8AfBaltHujB9Yt6o6xRGIh1vXuM586QTXBHVgJ5K/kWdtUu2p8CB48iYKvo+kP1jratG+aZrZfrcghVjXx2Ip/nJw4dL9PQIS9bFxiAXI7YETxMJpa8zHess2bMX3rxahi1o3K/zcgmyMdvD7DHyJgJVtTxs4c9VrBJWJaZ8fY4ZQgzaQb5kghb2gTIaHqScNOSlRre/9fIbpVYemBK3UJldMjbwkuMReS1hAbKBJB8PwToR6h2Ty5HpsKPZgXZnKFsA34/gxx3NOEG/96oOIPXAarPFhWgGRr6NMkYG3uULrrpmqARr6QPeURv0mgNLmVw735rpkS//1Uvw8kmcfWLyCzPZV5jFGm9Wq/eft0JaURTMibV9OtKV9jWhVu/hkKPd9NatYQKfS4f4aPAtcoY= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:lvE3t6kBT5HWnsmVWUa0tXgtZEhjxIsnwM82RIZ7ZAdxafWrhsm6VsAvSnL+3YrlTymWxWZzFD32VWnmhfAT8YK07JXTmIFiJhnTR25vi0alewHbThDVDRo4N/LgwgWPafeQTZiRkD7flS988gXFjjCSBehOuRRC9nip3IzARt9+UCiSdHmyUS8TtcHyWDsOWCcyGktvR6g/q0aEB+VZgooAgi0OqErzC9chF6aKGJQhgJKoEl18moDfTqYMkybw; 20:nKZjAVbJZcPDXdDTYXfvAM6UhltT/jjY40BcJZcckaTHVKuBbhX6X8aN4O71VA2bzm9d6cNrFhkPKKBCFWFAzvg+5RgOx25uvwJu6jBm3tzAJIa5nkXnr2+EhEcxvrvE1nb7eT9BP45wSzOHECbtB/FB+QZsEVfgtkeY0/FRJMDIIGE/s7xT4gEwOr15259LNeb9ueVQPHWbWBjMXWbS+6Zzoq9hkkpVSWuxy0Ro8maIgGVcLTDAGwbcj8oMZjQbMJqgD8AbxSz7sZrk3Pf3KxQ3wQBfcm8bxctDDchZzcUQmjvfeRoJh3gPDgNNzuXGJJ/Rkl/NK2bJI7CXCYtWgl+fHS6aNsuf3HI+FejKc+pfkExp9R6JGw4f++o0zQPtxFryfTQTT5h9aEaJ68Z7/9Urkw/EUIuk3/4eDsBUH7HEnqqOir0UCAfUlebW9KQAFVOJ7VueirRIx4Uflz0O9rB3D5UhvY9GuhLCjWqPPbrzTl/otlrP865+y1n/64V0m+UYZWkRi2enXQfpz9rnwWIzPSo11+8vGa13KPizec1As2hqT0XFFa/xYDlLuc5GEVLqSeFMZUgbnB4X/CoBPa8fLeKHhqALVl93X6YW560= 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)(10201501046)(93006095)(3002001)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:FPLHWOKeUkucpaDvobAfRG965n+8/KUOm3YWRMubLqAlFrKfVNyfnBWIBtVvbR9dq28h1ic5jJmWlw6MtjValx8pwPhuaM2/vRhlQSD6ZezDmSZ0boFW+S3+4feVpawKrbD8bO3EMtrJBIzixnSo30eI0hhQ0zvDLXjw9AFPby+FNzSdIf6aVNawb/z+eTWohNPv0yRcdCzCFLqwWtVlMvCMXsznsQXUgH+Z0Mp4CcoR8lqjHyNH86SNMr5wUUwY7XQHYDA2jNHTKQZPpcbCpfAXKfGRXedlVIttTewEXfKZp3gbR30TcgXY904Fl5HuZGgYJRMF3TEbZURIJHyHnE1VYnJfWh9OgMgKKv/Tqd6c4NcWyHvHUqQbgpm1Y5/mOkEGvzRnVPBXFgwQ7mMHhAajniB3Ya7PZR2SAuwtlVXcsyObOpFIlPEi5scADKziWUQWbQ4+jX3qeAPJjemVzgmb5IXyvVDgrB4VwarksKWZGqd5PcqESZshsXPef7BxaaO4FcPee4EWVVcseDLpj50v0s37GqHW2pPdPeNj1AFR5CpCAT9lfXgL+vcqIuEcxWxizl/lDoO12DtpSsI9rJSFGarpCg0wkIc/1JOBNuF7ynsER/Ub/ksMj13yhIjpYVNqMZVgdGIpThoiRMJ3B+dh85SU7gb8msQazBgpIFkkDU7raz/w3R5wFX/7ro6JvShuEno5oNRPLNjE/VGAPmTs051ktO47pifLCRaATk7e/Qrl7AHKxshB0Z/9X2ZMcAMhriTfPTtjdlIxsMAmhw== X-Forefront-PRVS: 03030B9493 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(39850400002)(6486002)(5003940100001)(6506006)(8676002)(81166006)(48376002)(50986999)(25786009)(76176999)(42186005)(2906002)(47776003)(66066001)(189998001)(33646002)(53416004)(50466002)(4326008)(7736002)(478600001)(53936002)(42882006)(305945005)(50226002)(6512007)(3846002)(6116002)(2950100002)(38730400002)(5660300001)(107886003)(110136004)(72206003)(36756003)(6666003)(1076002)(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:uZo4ZRNDlMqyM9ChFwb3/ZJDZvdQDFz0LgU/cgCEF?= =?us-ascii?Q?3cU4yq8o4jajVJhRVR0gQtD3aTR8lyJOAmiyzieqLd1KfC5IUSulr1ziaEmO?= =?us-ascii?Q?AlodkyUvhQRER/KgCb/Yeho/gkHrDWB1hXKR1wdbYM99z+IDDqLu6OrijRBE?= =?us-ascii?Q?CSrT/T4gS2n9Wj91HgOPlNLm4213Sjurw4gA8o7Mt4sVUHSi2tKMjbtJqs02?= =?us-ascii?Q?i6mLZN4u6yezTfT5f65pTzbYXmkKQumNAhYGcE4a7vftU7s7wLwpasb5QQo/?= =?us-ascii?Q?ZwBitHO7xGug6cpBg2ssPDcdEzmBBIsRyIAIrxza7p3G5Ss/X4R7+TRl+mHM?= =?us-ascii?Q?rCWNzSJJDYtXCobfMuQoP/E/roClJ6ovMtr7Y8eo3M+9QGSB9/NprpuJOrVq?= =?us-ascii?Q?LmIbbdqYrOv10ZUdwRs5Z4DvZmtkCI5Av+Ico2ugYZuqPMYVO5tJU2i5KmNA?= =?us-ascii?Q?sbjgvftl1BM/B2C9S2/OYGmEFtyV6p6qeVzjQJmGzSSzPiBUqxr60tCymUxW?= =?us-ascii?Q?zyxWcX5oDV2AhVi4m6layxIvhn3iaRY6WsJilV6GT3coZftr2cwxb3LMFFPH?= =?us-ascii?Q?DsHVCYSRXuko/E8cy1nevac2qK2CmTOw68FAKeud5RwysXCy9in7Jt1h6K3G?= =?us-ascii?Q?KQGwsI5vRLdXeRcb88AcYU9B43Xhgwc31OVPqBoC96ikx2RKJgoh4RwskzSp?= =?us-ascii?Q?LuWJjvX2E9yIPr/EDBeGU8RxYHuHKWfxRN/z8mfBEPyxx4m1q7NHJDZlU4Gu?= =?us-ascii?Q?3nz/kOsguo0X0e2rZD4fYEwbXTEhQZxJnIv2jNOlXI3B6FIVick2oWE8838M?= =?us-ascii?Q?r8ye3bDC50X8NFgH0vym4flc0KC8T2yAEk3i/YeaBANfUGREiehNPHriM1+S?= =?us-ascii?Q?GsHxM8iOMECqDmWawWB3j85od04DTLKDzMMGFtP/fD8aJDQ7nHGgVIYob4YV?= =?us-ascii?Q?wwI6wYwFEmrco9S8jU22G6utMOFIS097huTlrv1WAB8vqNJ+CsMnpFOXCR+E?= =?us-ascii?Q?NenMSK4J+iC7vf34lRHU2OyYwM9fi+mwMto1dS9KVtU8YwIMexqpJqTvgU65?= =?us-ascii?Q?EevWDceI0bWRiemR3euLEanMGnTU1rBJCeJWXDt5eU/B7MmkFWQF7wszRyyr?= =?us-ascii?Q?mFiEHYQrJM=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 6:a8YCNoilBhnky4oez5vMbZGHKv+H0my485kmvelu3LqJXhbqiIpHWYQQy6FfjkbjI1/gblU2g4XduOk/9AkNwIpq690v8datkSGn2Ls8OUrhbPukIbXDDUB2/1rX2ig6kvY1ALdUog+k8OX0QJCvv6KuMbmfLM0sVgrwQzM55xFfacuRBjR/KlgRPz5YyMoAsg0/jhz2zzCZLHmyxZKrQTdKIAa2DqJyDAA/Lkc8m2BsX0AhjOX8kS4TGgBFqCwJH1x+YFe76ETcREwOBk1kdnLzOxTOIelrEHUa+56F7Byw3CQrlxYVucNNSYPDWQ1wSMXq1m4JomL9VF6p2ef5w0atLWvFLwyfvPXu/HPpTdQaaki+au+Le0NiCeQPIo4PWxM+av5FFoD6/zDx6ayR8B92W5eYgt6uB4/c6oa7vihy1FQ1xTpirFgTNnt0TaC8s27Vku/VdlFDCCV4DXyUrMLTC0nyq/TsxDTcbEoljRUqzBypMewSdu08cn2PW99Hqj6xTgtZMVlJY3+w+BXU6Q==; 5:f67toAXxik25v9aGjzyh7wm7bZNkvo/hKhBn0Sr3qQu6A/j53E2bBxvVcZos75Q5GDYcj2HHNzut8zENCZR9lLBqZyrdoS4kZ33kSWjesHdMCN3jN3Mc5V+6lHmj5lgp/tWajlxMtq3/e/0N+b8g5g==; 24:yMootWe2HxmnUXJ7zfeSiQcDd1jYSiMttMXazAJ0D5wyfik98YjD7u9Jiug+6OATqIYA2ZWEzUH0qb153v8ddWkMBkNI1ht9jpB8iLMqx0M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:Km79qF0yLG/0k/UMThONKhJQ6GhtJZfZpvA/LUakzRQuabzGmWCjK2idtpGoCKYY+smSO5tzajJ/P76qaQTN19/VhXZcX9Bf4ohiRvurLF6YDdWDU4CAe+zkRqrki2+rB4/Qg5DayEZJN8PaED4s9oo+z0w3u5IwxwSNRNLRqmYDcE/2/lNPalW/po4OVhaPqH/Aa9AK/AZJvuNwPyC5172qdT2s32mG4i2CfVXj6gx+4nU+EZN8wmfm31lhWNkK3JO7UnZikLflL8y2pevJ3CxM7ilcLFL8pGbPMUu/84Pz6sUYmTaXQr4Jr4SShDza/rlo5FrG38CLy+q0AiuSNw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 10:16:58.1016 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH 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: Wed, 10 May 2017 10:17:02 -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 --- 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.13.0.rc1