From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0080.outbound.protection.outlook.com [104.47.32.80]) by dpdk.org (Postfix) with ESMTP id 162BB5A44 for ; Tue, 9 May 2017 11:53:52 +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=XkHhwmoQgPnsXv1RoSbhByGXu/zAOgMfifPTyYBOLaA=; b=D0rUNK4//SlMv0VDYtCXingI/+0hQqzNuEW/lQTyFMBdwhcfBhPda+OpIeyqBkGSk3kMwSVxZ4+7oCMfjCvCy5lfAI7am2MsRYq9T7hfYj09bCO+iuUGXCnVlTav8mH9pIvmk5DcuS4AV+RwveMN8WbBKVR+Ko5ZiXYguMVR1Tg= 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.1075.11; Tue, 9 May 2017 09:53:50 +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: Tue, 9 May 2017 02:53:38 -0700 Message-Id: <20170509095341.10734-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: MWHPR10CA0071.namprd10.prod.outlook.com (10.169.238.33) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9bfefdd8-b679-40a8-6eb0-08d496c14ba7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:vlyVn1T25QpENewAouuaA1Cc5hMN/GQJG9KA4zaWhk27KDzdpBVVEntQuk7dlrgz3kD6vpfJA0++sA79o3ILAQB0PV1SVatJ18SseNE6UTV6v/XdKPW0Ceq/VZU/00UTIqQf2PtJj2eD4+7j8D8ki7CMlFNvukcOdrVX0snBnOcJ1FI7EPEfoHqpGDttmkmaXx8/eI5HKLdqZNJUn33f3N66ueUNZFhLmhqlWnrmzy0KhqmORgLpcqW4qG3ydD3dUAVZkNIbDxh7K+dlovxIPnaufHM9ZTujmaQD4ImSCAnxY7q7MtOkjTBUNyEvX/3miBcYNuTR/sg9RlMFdIGDcw==; 25:/AxCCXbWcvAH2AUY6tOsz6FRR97u2/VkFVrm2PaXPn2WzwminsEdHYoJhTFrAHKOalhDfxQbbMrdOAh0M7oFsprv5ghvQchWFO7c+81sQBT9cbf2D0UBxBRqY449dhRoghdLC4gLRs4+4mw6IdOBpn6w8X/nonX1xjRj52tpmp/WlEd8sbuXWTq4upnsRsQzAgwSGSR0UScSVVCI5ZbTxftsjFp3Pct0WdHH+ZSUxWpFvEVNA32AbTl3sDdIjF/l/Jvpf6C+p8E+ZmTxnNLwX2+4EAdQr9rb677nQlqcyrEiTgpJ2pLuSImbsON2QYTkG0NEKu5vs8Pk9r7Q5KZZ9FHr0ESJqaDNtojNmRtMb/uM7NpBwgWiQ0rHopfRdsZh96UoPCk4CLWbW2hYZqxkDqYfb0tbVmTck6Porm+0VkB6qytxPPUaewq+gVz7W0HjwKRQHjqRqINgwLPcdgGa+G00PIy183fGNUEfXcBsWLI= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:f/fmkTtL3WeRAVeFRgS7YgFYXUnPNU831SJq3MkPRzi1HKNpp+zNeA6VgL6H59iuGM62oM66kaxV3R8LBTljpL6EGqpcnG3Vb37tPzy4CGsVYEfMlg1fY1lj4xcXnN/T5St6Y9m1k6sYyVYtJKld7zmWkunGH70Y0SvKqOWsxEHB/MuF4PuxY8x93ZafX7Meio3JbSsegVG8GOTrMg1UnxjPz81/Hgjbb8kwIxonao05wmHBV6fA9NuG58Yql6eX; 20:YhMFdBAEmlebTw5YvWwPlz5M+h4URa9t+UPFI3IuqTVF2805BYlmelr4nKMuOLSSnBcXtHcc024NHAOQT11xyyevvwqgjYGLKqjTOOHjQwezJgVksHR61f24n7NpLb9FYgdIrtDl2CkyzqhFy90pHrg3kAJloR/d7ysSZhlzSoknejF+SiqfegOG+jI9W+YjwdMWT1lWf/5Jk4EmmUIWedJz/QVU4q9Qjtzzka2WQJLkdm+C6SYbEHhvSejDiejwNSPYi8NlXxQVGFhpyq9ySVeMD9tHuDVPNTZCZ5QbhU8NNdJrY3Ns1xbJyQA7uwzwjHAqjDjKyyJXJz1JcmlwsZVq9Vy1v4XbjBA5IJGpINdl3rF+UTwpf73siZG+dXYTCdVH+9wG3sXexDdx3OlPF/CsAqpPZRf+fAbMc3Erl4+ySlsQBZNtbKD5eE8DDzZL+TsNYaLfYiTYJdcAD3UcXLQrA0NsM0pD2tnfzpsves453TGzYXnoQzm/JWv6sslKQjKwP0VPir9bcbBbOHVcEBzYZ/IFG6pF1xkBn2ep9rhxV2sdaaUN03zdTnmYRQlTrZvWfy96PDgWii0XYjc+LVRh2/ORE+hGYw6pU69RHEs= 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)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201703061421075)(201703161042150)(20161123558100)(6072148)(6042181); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:EaPkUG0PJ9E2zS4zZjgdt2K9CxaB4ACTbEf+z33/teNx64P3DcYLb8paE6B87vCKSdWg0/JhHtL+XRsCq4/0Qusb/MlrJYIcZhdxx24ZnAwVwyxoT/aPPvFQaDSQHgkBI48AourMAFILXFAFRx1SNCMYTpMbrZfq9HPMslILgJv528X1SQ6ri1teDjHYSIUAtyENImjOioXjYB+faZvQ4WXKwYuS5gW4R2LASJvH7MWPDB8uppOoJVT/kKqp9Ej0d0L2EuYV+NdmkncwZYJJjJ+zVo6MZSnxLNFflqHHheIzfbUKgKp8++f6jFvISot15tyNVASwKCwLmwxyAT3MKCwV7k7XNoHMumHWCT1EcAGWpAye06DK37ut3mWExhHnzsq5gGv88VxrARrpV9fVuEu6DugRIvAdXnfKZi9DDh16R950Kig7YQLcLGR2liKjOecQ9RUyzTEUd+gUVkyxcA/Zrb97v+npBXtWvoqS/Ro3jjW4yEGsyhVbTcJ5XrmeBPEw3huL9bgHCNHMd8QFgqcTo7rhMJoEE5iHbz7+ljx9FynJgE03uAmGmXIk77CZvbpTP1ujgTEXYmhQiviqdQUVtoUmyLehTmlJRRKO4Xit45ey1yunaSfWdWm2iD/E8prmZEQ8OC7KJ+FjmgU56nmpUmtE9JaJReojzlwPB7vFs0tXPZYkx5H2JYfYeks9jkaczZxlfCNlMDxFrK2nrbJQainq6Hio1yjss+ty4DQbQiav2pP6v1JNeeSYB35Q X-Forefront-PRVS: 0302D4F392 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(1076002)(4326008)(3846002)(50466002)(48376002)(6512007)(6116002)(66066001)(498600001)(47776003)(36756003)(189998001)(25786009)(6506006)(50226002)(5660300001)(6486002)(6666003)(38730400002)(107886003)(110136004)(50986999)(33646002)(2950100002)(42882006)(2906002)(53936002)(42186005)(81166006)(5003940100001)(305945005)(53416004)(76176999)(7736002)(8676002)(41533002)(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:R+L9ED3/S8pyyLUePnv5jCOYkoSu7MhNKF8CkpYyx?= =?us-ascii?Q?cS0Kc2Re+2Zwhkq/ERWNvtAtlWroOVIs2iA12wYIU10pfkLzAATaf7GFyi4H?= =?us-ascii?Q?KfXmcZe2d8fW624/F8fjyEmAuwL4fVWiy+cS1UUabXJ35EF/I+uxLAy7uz1W?= =?us-ascii?Q?WzeKeczsXFQoJ7WwhnMdPo2dahab3s/rZ1yxdoGJclN3WVW1DEEOjOPugkw0?= =?us-ascii?Q?s+VTUU6nDoL1vcT3sUmi0+TGuwJzOeJL1bCS8GlFngNc5eAsIo1mp3+64QNZ?= =?us-ascii?Q?GDZG803vVMRLruTrE1Pf0eaNkhuGzyf1DU/CeqFRJL3kRtyW9wWWFtqdnpeT?= =?us-ascii?Q?qkcZ3Kpab9BL1PunK7oAxOOzvkTNOOmeK9FXUN9BZgJ1ohPVvTDYbn1+7BXr?= =?us-ascii?Q?3Q+6CgX0XMEZNNmkJR7oRwGDhD70MJOBr6aPffU4WymFpE3Ge9ZxsYLFKadV?= =?us-ascii?Q?gmrzrlL3P9yT0HUpXYOQHfSx0f3JoNOtm2/6LKHnWd+B+X7uxszj0e8YL6CU?= =?us-ascii?Q?9PgJ9xwFKfn/2w0mV7ZzgZLWzH1HeDefB+qpvCIc0x00WckSjaDU1SzuSng3?= =?us-ascii?Q?wb+kGofOV0sjPiSE+dsDV/kaYRF7OYxVGZNj/nJd49tkBpKSqGtzFn0Bdej7?= =?us-ascii?Q?D0BZZKorQVp2TZMYI0qDH/HsV2I61qxPj+37Yx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bNxE+Qfpl5HrhBWg+V0yTiI75C6GnVfzHJrmKPLskPSSoupKf0mdxy952gG5is8nfsDFN4T8e1PDD0+/TcXK6TrTHQ=; 24:DSC/yQBXw2SxhKy3sAqjYYsvGv53NDblJ+8/l8ohVIdWpHHCKXFmKyvA3RG4REiu4JIR8zb5T3s2H5CPkMXFaZKef0tHlX9i4OQZ1vxc6pk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:SWVJs8CaIePU28/agpvVHIUMhDSj3AVW19owiFKHSrz7SbRpFtWnuOzGWMsBj3Sd3TjpjJFn792xGe0tAaGTQXcLve69nCheA51SCTT9qmKxtDi7KJH1sq5bu5LTnTunBbS52NgDXhhgt4fqeDuLt1CsKgifl90mhA6SyP/0U1Y/8yilayp4ovYUX3GHV79Xmx/Imaj2VxkBxu/XAykBSBezIqWB9k/W0laJ2Ny87HVAYG6Pnub0b1kZAm/0u43jliOPoDh8Y49+iBVkLaXrXPYqJMuj65qWWNlKAnCYUVpHdTIn5vJ7/bkqJSa6Lza0l7VXyUyUc00vrOiGlOn0eQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2017 09:53:50.3457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v4 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: Tue, 09 May 2017 09:53:53 -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 Reviewed-by: Jan Viktorin --- 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