From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0078.outbound.protection.outlook.com [104.47.40.78]) by dpdk.org (Postfix) with ESMTP id 63FE8374F for ; Thu, 4 May 2017 08:57:14 +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=j5xfLTeeOU0oJy6ZvB9nw1szAS5X7ZUawrmNfqdd2m8=; b=VcuitcBc0uO/TYtjQF6xeS5+IdHnEMK3EHOxRuGe4zgNU8GHsHOsyJdAdm4UD8XkupOiStPeBoMmCevaiW7ZcmAyrrlDteGd2zubgL7jzOu8BQ+/C/51gxRnT6PCjpzj7oC58r0zXcGNhvxBhVDkpqRcrdALyfMnLMVtgosQnIg= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.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.1061.12; Thu, 4 May 2017 06:57:10 +0000 From: Ashwin Sekhar T K To: cristian.dumitrescu@intel.com, thomas@monjalon.net, jasvinder.singh@intel.com, viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, jianbo.liu@linaro.org Cc: dev@dpdk.org, Ashwin Sekhar T K Date: Wed, 3 May 2017 23:56:59 -0700 Message-Id: <20170504065702.22404-1-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.13.0.rc1 In-Reply-To: <20170427140618.35897-1-ashwin.sekhar@caviumnetworks.com> References: <20170427140618.35897-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CY1PR03CA0028.namprd03.prod.outlook.com (10.174.128.38) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8cdac918-ac40-4f4b-dab6-08d492bac9db X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:ZEWD/LkOL9VVPSCY/9F33wGS5SP/14trVK1T1YcsPrvCuC8K7i+ToLdQixhzk8l8pxNqBqVkN4kSBpEuneNolnmT9n78Z80jjtv1GkWGuPA2zqKTNLyswsaDKSIcZUbBoQ/8ipEOi2W2Cui5WqUDYr6LJ5osMmkbSHvnhBoVM5IA41cSf6kOVo4OmW7MJErHgq2n5n49PpBXfUug6PbriT5kaUOrok/jL8aFWMEOMhGTL6SyhgEUQF/d+4W4Bmq13GosakdTeQxwF0Isg1tDFRXEi34FSLzP8jBhMWFqij0LKg/uUMEM3Zy8THeQqiEHFhHHU65JXx5VH38bgkr0eQ==; 25:xTA/OJhZ3hSrNDRG10QKT4nNuCgi4qhfthfWVMquW0wjpCdICE3FATTlnaMTseM5BK/HakpoIwMdCPXXTfcWP2sfDcIB3NGvfysys8NP1qlm/o3yxtZMdaPY63NCPUDEwogsyAGl/ErAlEpZ34NcjCegrWAnCwAsv+bwU3qVkcpuQkiZ7VzSJ64ki/xYHSjr12CWF1lx3/cyzKGHlH1hT9/cqWiiu2XeAsdrWbrqNYqWEMF5MbyD27c41b9Ag7W63aOfSbScyU9mjspvGv/Qc/AiLDZFXN7o1gM1Ddlsp3fA0n12HRSWNN+RjUm4p5yoMEr1BXNc0+quCJrNgOVc4yKS2pFD7q6vZKZZP1x/ruLElMkbG6mYnAWvkEcgLr/Sb35lEIusQwtZs/7ePJgKAYy1hHEO2OkdJGx7tLE1iEU+VctPkXwk+TFp9DUApu5SiTeln2pjwOof8n2whHYIog== X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:C23sxLoZlC0FTWO1kud1ojRYfE6cdGwv75tKnK+kltvHw+UkX5Jqmp1wtynhTUu5qvlXd8t+Pygx9rI53ZKMZQ+zJFl640A4AR29uQdiivonY7s8L/NoI8/SK0KaGpiOBryb78SbfuVr7t96CEaNUJCLAISE5qdxpWRlEqe/0aTMsa1sicH171O+D/EPvcaSAKMm8O493gdP+NKTiJyK3Y0G7w+6RTpazdmxKiJI+Oo=; 20:WcoVGQ7kzEFzEohAIK88HQ6gesS7Bt+xZ7EvS8iR1v+00OrzSMiBY67vpHpkV/AJs7E6eTyvByVdduwdXN6PK6I9TSKSfnckIoWO0g18Ht7aGEf0Ulh4t90DlI5fEbveU34loSG1djEnhCBESyaJdOXC1XL4rvNyVyS7qJSTNiog7LszjgmtVscFMtZoDb07/kGpQzzlj6HdMigJQfg9jXeOsGfNhE/J1+tLsoG+ZK3YcKmLTpB60fy2TV7SiRqE8Q3O4J87mefcE37b9aAeoi0EnmxsIXtm4qVOgh4r7EFpRgIXo81nTKMD3aAlemJEz0k298X/3oCrpZI+rPypjv2WHUrdiMhjAyEIkpxJiQ1pqCG6IBk29jA/rpdNuXbn1I31ldFnp80iIhLJieGdyo80rYlVpyr2rBnh0vhjoXHVFt9rTd3Rj3AvveU8KBxZscn0OTE07oW6beXD5a8dH3uexalJ9sGi14Mx+HdE8+S78T5RRYoTuJpzrUtFdAxyMMG42lHAa1JW2oH/bL8ohZb6rgO0TYbNH/V0WeMaTToV1wIXQOCqE9eL1tb80xeCwUWMm9EVz9nUjpK8tuYppxOzS7yD3bAOBqh7YKGJNE4= 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)(3002001)(93006095)(6041248)(20161123555025)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:AA5vWw6kGfVjtstpyLI+8LyAFN+au+3FuTT0s/+5VpZpIHKLbpk5DOnUAcvizwWE/RAfflXMH2cSn2GBGtEJ+zD3pX/JiFmwxnWgCPLI+1WseRmk/gUC1g9YQTcpJUEkn87DEJq+nPEm43k+H771eWYoMgLv7Vx3wPBKwaweRyBEOr+K5axCeYxPTuxjKJICvJ5unpSN+cCmYQC07MmZ+3e5dlh1Z8rAtj+8r1ZlmkE9yme10j3DWIDmmhwXgqveFSBWeKsvxpgzbbQLHpjoxNjnBLTPNOd3oGkgRyCxItf2Iu7Lk9sind+TWJzWWhv8ItWfnSyw71ih+NqWfBvSDk8LpM/2C55vb97JxvCYkYC3/Y4iM5V/xFokHwnrRPvjPRpWbYyZrxVxurN8RPuHdp06r0xGRM9rznJusqAanI9iOJZqSvWliF+5ATeEuNQH3OndXPp6s9qGVVUnNlZSxerTyINVYsT9eSYwKhEoFcgovfiw1c7wkYoVvJYP/vNwKM4PAHMg5ND6VkkTVy2mmwftLN9Nilp4QOdwmqu4bzKSY1c7Ar/to2TP/N/u3hMKe73IteylRxBBpERduQySRgpfbjlQUs/ta/J7UmjHveuY+JvKoV4LSG6oZXhM33Cjn6R7fws7TRLO4s8Laqch+gOvsjJuKYGZNCwHYktYZH5Lb6ROsva0vZX1fbQJKjYd5KmNKP/MgpnfWTcReiCRV+dQ94JQ5badjTydObR+vE4JMekF3AGQI+9XqywkCKOjP7e+gbHh1Z6vnKS0TxiAXg== X-Forefront-PRVS: 02973C87BC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39400400002)(39840400002)(39410400002)(39450400003)(76176999)(8676002)(50986999)(5003940100001)(50226002)(6486002)(36756003)(48376002)(50466002)(3846002)(81166006)(6116002)(1076002)(66066001)(6506006)(47776003)(189998001)(25786009)(53416004)(42186005)(4326008)(2906002)(33646002)(53936002)(5660300001)(305945005)(478600001)(7736002)(110136004)(107886003)(2950100002)(6666003)(42882006)(6512007)(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:UpNribQbqjSqBbryZwQSqfVnoJsYVU02ugaIcYOsj?= =?us-ascii?Q?cArBZ1sXsJjcepXKg5WlDNEq4B3GRvyu5WTUS5ucRAWRm1ph0rFF1rZsqrQl?= =?us-ascii?Q?rdx19cTHYOKLYAH9BaHwTmqTt7aN94JxLc1sxqCmwDtZ604SECO+Im82wQjg?= =?us-ascii?Q?A/MkXOP8AU0aj+K4a1bE6aLeMw6XW9U2lCuSJAfwQs8y9NeTa1jIbTlbMNZW?= =?us-ascii?Q?P5SW7UZu2sNfOHTwG1/cpWoFe3OYZAt8i4/L4EL56JlKj9/a0xU7sjqB4SxH?= =?us-ascii?Q?Qw4izVBvnxQeLNj8qi6zQOm6bZCkp9FnMunDx+ZtGhQNkMNqQCktObDT57NQ?= =?us-ascii?Q?ZdReFHunSBzrG6OFRpqw/wpFIlAr7XQWfEB9z3Jg20wTMQFaGt7XQ03TvWz0?= =?us-ascii?Q?+mm3reDS9Jq+UOTalph2h8+kVZVXJ4gIz5vLAyZVEe0dwW1UFbkR0c/wrwUa?= =?us-ascii?Q?xFKnRJxl4BanIHuN4ZMnzTiuGu00Yxwf86pwM7lsLSy2zthYL4Ev1pVQgzqt?= =?us-ascii?Q?renGRHkLUHfozidMpytrwAwZgItJmCzf5/qNVGDl0fQepaN3TgmBjlGpH0QE?= =?us-ascii?Q?RqbE2PvtKNVluqGeoYE+cDwNs+mMSEuHve4qXiuVK5tmX4rcV2yqXffvsA3n?= =?us-ascii?Q?HfRxTH5Wuc9V6jj7rpSGgD8CFdJwIh3z/YsxNh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B0EsjyzGja07M2hRjm0OETf6wtkfQ==; 5:rrQZBkpH3B85wNWzYqJNcj2e5gjGLNzX7DF0LIgs2icZVbHQSmpWxI7d/kDmxv0F8ijVBVoFfRw34M7zcHAdYNwSEF65jM0YVtn8lRY5guVyD7XuyGbGO7Cwkl22QmS1yJ7aggxiuF2PGXz2I3k+ww==; 24:fDwpU7xGCxMpd68BpvVrOBmvoyk0PCAf34zuX0vWeNFF1lWCgJ8MMV8D0IJ2G8vqzTWeNG+U4YMfdZxammIvZhOba+DI6uKZOvW0JJRPwUk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:v1w9UqyFqSV5hGMtRNsazVT9zJxwa5JhsyE/1rIsUWPMaA4XnMa55FrYO5WKQMdlhtoOY/1Mz+L9QFEPSC3VGXsK2gqEH2iWiBCQLPQBqDANf6ew9trf8zqZFdiUeW5zaROmKYN2VzrpBJ5ZuXJ/WucBDLbVgTaMjvMCxdv4nQCYct6ZCcZZCIeKa5B6psC23ITNvF42B1hdxC1/ND2Wdri45GH+VM16SDs0QFCDaEfKWveYk0GK0g4Yia82PG/sOv9j12iNCadYfKwV1yV2DwTeLJlusLoG3NCffvc0Sm9vFGFZPiD7ssXtNK7kORC5u5//p1TtNcXTut225dwn2w== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2017 06:57:10.8368 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v3 1/4] mk: add crypto capability for generic armv8a and thunderx 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, 04 May 2017 06:57:15 -0000 armv8-a has optional CRYPTO extension which adds the AES, PMULL, SHA1 and SHA2 capabilities. -march=armv8-a+crypto enables code generation for the ARMv8-A architecture together with the optional CRYPTO extensions. added the following flags to detect the corresponding capability at compile time * RTE_MACHINE_CPUFLAG_AES * RTE_MACHINE_CPUFLAG_PMULL * RTE_MACHINE_CPUFLAG_SHA1 * RTE_MACHINE_CPUFLAG_SHA2 at run-time, the following flags can be used to detect these capabilities * RTE_CPUFLAG_AES * RTE_CPUFLAG_PMULL * RTE_CPUFLAG_SHA1 * RTE_CPUFLAG_SHA2 Signed-off-by: Ashwin Sekhar T K --- v3: * Moved the feature detection changes into separate commit * Added the AES, SHA1, SHA2 capabilities also under the CRYPTO flag along with PMULL mk/machine/armv8a/rte.vars.mk | 2 +- mk/machine/thunderx/rte.vars.mk | 2 +- mk/rte.cpuflags.mk | 6 ++++++ mk/toolchain/gcc/rte.toolchain-compat.mk | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mk/machine/armv8a/rte.vars.mk b/mk/machine/armv8a/rte.vars.mk index d5049e1..51966a5 100644 --- a/mk/machine/armv8a/rte.vars.mk +++ b/mk/machine/armv8a/rte.vars.mk @@ -55,4 +55,4 @@ # CPU_LDFLAGS = # CPU_ASFLAGS = -MACHINE_CFLAGS += -march=armv8-a+crc +MACHINE_CFLAGS += -march=armv8-a+crc+crypto diff --git a/mk/machine/thunderx/rte.vars.mk b/mk/machine/thunderx/rte.vars.mk index ad5a379..6784105 100644 --- a/mk/machine/thunderx/rte.vars.mk +++ b/mk/machine/thunderx/rte.vars.mk @@ -55,4 +55,4 @@ # CPU_LDFLAGS = # CPU_ASFLAGS = -MACHINE_CFLAGS += -march=armv8-a+crc -mcpu=thunderx +MACHINE_CFLAGS += -march=armv8-a+crc+crypto -mcpu=thunderx diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index 4288c14..a813c91 100644 --- a/mk/rte.cpuflags.mk +++ b/mk/rte.cpuflags.mk @@ -125,6 +125,12 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_FEATURE_CRC32),) CPUFLAGS += CRC32 endif +ifneq ($(filter $(AUTO_CPUFLAGS),__ARM_FEATURE_CRYPTO),) +CPUFLAGS += AES +CPUFLAGS += PMULL +CPUFLAGS += SHA1 +CPUFLAGS += SHA2 +endif MACHINE_CFLAGS += $(addprefix -DRTE_MACHINE_CPUFLAG_,$(CPUFLAGS)) diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk index 280dde2..01ac7e2 100644 --- a/mk/toolchain/gcc/rte.toolchain-compat.mk +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk @@ -60,6 +60,7 @@ else # ifeq ($(shell test $(GCC_VERSION) -le 49 && echo 1), 1) MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc,-march=armv8-a+crc -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS)) + MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc+crypto,-march=armv8-a+crc+crypto -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS)) endif ifeq ($(shell test $(GCC_VERSION) -le 47 && echo 1), 1) MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS)) -- 2.7.4