From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0071.outbound.protection.outlook.com [104.47.41.71]) by dpdk.org (Postfix) with ESMTP id AF103DE0 for ; Fri, 12 May 2017 12:15: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=tMf0H1WVxLaW6wsJ+g1wAXwXkm3XY2EbntbYQEsvLe8=; b=ZzoZLGBP/J1EDY5MiJIeoeb4vokmUBOlhHt9VW5Tt5mKsmmzVgLeumFBXU+w961fq2LAGggqcbBdMi2Zzw760yVKk0BZaG+fYISp4HPMHZiTZ0KSzyB23KA0Y5hDMqzPVniP2avXXDMc8Thya74/Ef7yela9Wn6ptz7n2t9rUik= 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 10:15:50 +0000 From: Ashwin Sekhar T K To: jerin.jacob@caviumnetworks.com, thomas@monjalon.net, viktorin@rehivetech.com, jianbo.liu@linaro.org, jasvinder.singh@intel.com Cc: dev@dpdk.org, Ashwin Sekhar T K Date: Fri, 12 May 2017 03:15:32 -0700 Message-Id: <20170512101535.7221-2-ashwin.sekhar@caviumnetworks.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170512101535.7221-1-ashwin.sekhar@caviumnetworks.com> References: <20170427140618.35897-1-ashwin.sekhar@caviumnetworks.com> <20170512101535.7221-1-ashwin.sekhar@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: MWHPR10CA0069.namprd10.prod.outlook.com (10.169.238.31) To BY2PR07MB2421.namprd07.prod.outlook.com (10.166.115.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a7448385-523d-472c-409b-08d4991fddbe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 3:Dic5DDMPhMlv8VY/DD79HtWZYhm1+mwCMTUGamdzxhtXyOJT+Lfh5dpACfY4R2WvmYSTkWmN3j99z/dpeUSsuFdJjCb4N2fefhFqoZLe2bKicJmmWzUvwucAHz3rYEOd6EcvTgy9YgexKL3P2YTVzpKrx2YHH6oW4y5chzydLNAGXmfz5801b5dWNUu/L9tP5CVoegwDjgEnbWDTGvnJBPOcf5/lJuEOzNboHcRoIutIIibFd+tXzSOncu/a93MqdJlFAuFE4gXZDqu9XTQS3bU1QNwjpsZsreRJOAwZ3GaLrF5mwCe7idZLR6KeTJnAnDSKcZimZVbJ9yfAf9s7iw==; 25:SVYx2BIOgPIBad8JCrfR9dsC7TRr8b4o/NWnnRZ1HcCbQZReA0uYOR3rSlL/yxcwzYACp0OA7I2L5jb2q3iinZyNqS2kPs3M+WDLKoOxoDMaS/c10X8jS5w8mZW2xwc1g4zpXWOOYa9i2qbLjoDJCfYDWbyQuH7z7kI26QReQMc43VqRIQDXwjZuqIYjxfXQaBzG7A69V5ZH0XUut0BkEhx+bXfpLWawtMuAIxlc2947Xl+2gWIVO+ZWLyyCTa/ljMCIgYY1+dV8ahdZi265IifwbLtehiv8j6PAsKCkS3REfHjyNmWbqFa++nbKIxq0AZ9YZpfxANTBzU12rfi+BOp7KrmvugC2aQdDvDuf7mvpuKd+JooiuVIjenNZV0eK9GtT24lPrgu4XUT6m+Zt2rQ3TlByl28D8yB8vFfqjQpoWFzYjlOPnRfLmSOm1xADpBRGuVCkTyDK4/vd8zz579qqgKvxlIGHd66LPvOPAz4= X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 31:gXG9mrjKguDUcQNa3eK29vX9QnPhv025rxnujxfikMlJOI/Z5LeqCWEcdEreWqF1HXHDFQoliIB3xDWORV1ltX4/e5BLtOGtxp37qOJMXBjUxvq27t3tKzjgaODvloSe/j6krqobTHL38btF3rBp6xbEKAGUuYENuLaauM8Hbnr1hdk4e3m2Q9+DA8dTNwLbTGZdaQSU/QY9TSE0SDZYf0VLQI2hb7Rtdi73Q93s4l4=; 20:C6pe5T2ARf6xwCcZhsiRfezfrCGMWeN1m2WoZd+ULiVH8oXzhZDDs0ESAgnRGkSHtIaIGeuUnSAPjym2O2PkwDFY376CXLmlWLwAtZrkmxZvmwie8pkOZPhXN3kjDJDuLMyVeqzac7FwPZCIHDRKJYl5EgJJa5kFAyb1RFMfY5NUso8ng/TrhLZjKZl7Slm/Xxnm5wS9cXoUa+ZeLKf67Qw3VbH6MMwJtSRlsnpgw4ew/9lPi4wQj7JTgu8mc7Z99n9+hmKhfRrNXmwMdozrwZX+2Pi0/XPt6M00rl9hMSR5qtKNLtUqFDMbSg+1MnXqF6kvMGS2Hfh5oDm9Utl8m+5ylCuVlH/lLVSYBvxHbSRuSzQt5sI8wKx4nFcACmbM+vsyeAMvhoRYsYLdP6nFwOujjU+rkY5RPa0CAdV97YHo3spHRtgpebQmclvX0oVnsZkLB01aDuJJdK2w5xe6sJzm5gYSIsKlfJHPy0xsWWUTlzI+1Ai3G5oBoZp3Qhq+PopEtFW0dOITIDdVt98oQfoKJj/EIM0RJlQxNQLj1LWhfHq7AlXXW4V8DpWVjk37fc9gYj+CA1DQVmN6ViS+5EM2nBwd21G1o//Tk7vW0ZY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(6072148); SRVR:BY2PR07MB2421; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB2421; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 4:8L2keIIubcgkj+ay+RbviQQVJg4gA8oQ7ocqle8DVuT8RIxihNHCULlGI84nQ4r22urpt/uXiCd7qVF+Ii5F+4kY4FSlxMMGLlG0zcLs6Wf694IEmLu2aunLuJaVsu9WsG4x0cNlusU6pbLlaUYoEupozLe+jEZvuWjJcyKmbSJlXR+r//WzyTzhHrIesQ5LdwLFrHxKrzfENrGYHQ1i29IvCLujbYESKqmsT9m3DJeDJgBC4Pwcxctrdibd5fllIs94knxPU/W6KdapeyQlV7/gHXbiAGQQncakN+XfXZoPZYaxQN6kcnhkhqm/ZGL1NXSFX3D8ezvBEz7tDFOIucLisARz3x41hs0yCUEzT9YEJP1YRBMkJIdGWVpWCCIlX1fXu+reYK3kucq80xlX2Syx8xzBKglcH/CxwUkQnJQKN1m/Xnf06urX2t8Hkje/gFMMLu24rIgHUTEVyrifDgZ8shV+SzSDQY0QFoCfTm6WsuBqrbAfZXCrNUvKPo8jRfzOwvxpoCzWKd8HaLShfPuD9b7zVHbFSHjxBWlTRP3x1a+vEs3HnV1e0LdrDdSgTdt+JGtUNS5jj9q1wTO2vvADJ5MQ2Is1CUSoC7YskNgmNcyz+PP3ES7/rLDBNClt7ZTIRJaBkCyxKh9BmoVWa8sKYxPCscgFaKfnMKFnEZGo46waR4CqqB3GRrv6pR3fcDlJ+vh4TJRUUK6JsQX5ksjOy5VgOpSi/+eV0DpBEUC+fv328gqk9P+B/hXyUjJwsb1DKxHPWWTnmS7GO77Wzg== X-Forefront-PRVS: 0305463112 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39400400002)(39840400002)(39450400003)(39850400002)(6486002)(8676002)(5003940100001)(6506006)(25786009)(81166006)(76176999)(42186005)(2906002)(47776003)(189998001)(66066001)(33646002)(50986999)(48376002)(53416004)(50466002)(7736002)(4326008)(478600001)(53936002)(50226002)(305945005)(6512007)(6116002)(3846002)(2950100002)(42882006)(72206003)(110136004)(107886003)(36756003)(5660300001)(6666003)(38730400002)(1076002)(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:Mp2g7O6ejhuTuBKB0lU67rU/rAWdklkpKRikjvWJ5?= =?us-ascii?Q?2cYLv4AwtQl7veV8VaxRJa8APj9FwKTbpNcosLIKxqJf5/R+VJQnu1Jq455h?= =?us-ascii?Q?FqlMIaJcOoopctUpzFNLsNjKOXp1bfXhfc1r5I8xbOHYM3bUOwabYCCrI+jr?= =?us-ascii?Q?PFwtgfiwuGuEtdYpLUVnC/CkjLO8b7rxyGCW0nGsogqHtqce4q8LayMY1ScT?= =?us-ascii?Q?So0Y0/upnLFRJ6IWs+n8ooVPAXyLd9W5hr6/PE0ioQVq0cHuAaD82MP1WZnT?= =?us-ascii?Q?OEgSXX1+ElJfWmb8hkCcDEmIkRF+LAYqlLpbHvHu+DxqdBaN064NQPcPLF+l?= =?us-ascii?Q?n9iguAzjjPIN2M4cJG1lMAiA2h/+v5zZ2tF90oYUhjydXiwpzI1kvrDnLcIW?= =?us-ascii?Q?pyRcdmme6B3QqYid8GePXmOm4UT/RinaeHqLdeGRYxAr+60DoSlNYWWENCg4?= =?us-ascii?Q?lIrW/8b5cwaaF6nt5PcdgyBJ9I1y/Tqay8i+sN/LYZF1te0MvENdE4qnp0Uj?= =?us-ascii?Q?v7Wq+vkm0YvYi0Ba2NZ93ucXsADP84Ny+5kAaEe3s9JgTcGd76+PC88YG92c?= =?us-ascii?Q?eUzMIlPYrgkqoMEaIypui4HzH5Y4noMoBMChpLhBCp2G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qY8pcjAl+T0vL460xE+ie4t+x1LOUhOvxHdCuW1Yh8I6HsEOe+TSY3D+lsuSB5cohAjoJ+NnNXbbrtIukiHdGJzVl15UxoEuB5S1RHy4WTB3nJ4s7PLTR5VQaNBULI1/XfdCyYTro9/5r7j/Z6rHbbyKoZMibT1yG3Q==; 5:vEieJnv2GEO6gdg2wK8fbjcWSz1oN6Uce8tkPXP2/D/Une93WeWOj60DOAq7zgHUIQ9FyN2kwy/4b9fELad0z31WEjNdUYiWoKurfgRTePvsMuifckULfbPjBDYDYbIQOmew7i7eqlaxB+54eqHfIw==; 24:RtNLlrrCWZRoFgWwmpdrGdeMTd/7J6lYoZPe6t+sh6adEJzH2DCp7rH1uvUe1KNjQcf5mPNHECf6HEjJtQwMENNvzljewR+dgpBFsozENc8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB2421; 7:mybmP5B1suiJawILjgmSSvqkdEpZRdKnxmqfmhhCR093/P5bCLFsdnGgY2M0+maUcbbN0GQ3rNtpJQDUVSpD7aa6ZJgUc93jHM/RH/FV1czK1tMBKnQM56yT6SNOFSjEjPAPrvME/0Ed0xRkeJrG7f29IQp0br5UezFULmkz1Bu2EJUyFTkEDD0LwXfbN9WP0xIRYeD9xWZ1IsbiJfJbyn4z+KtGaPQXB+FAIPESiHTLL5EWg7g5/oF+ziyjUeCoYj8y2PbfDhvuaXpxrCgdV+LVKx06pocSG/Flbn3kRFRz5Q3nmj70F+tAbv4BLKd8z+K1qLC4t8uIGP3HY3kLiw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2017 10:15:50.5132 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB2421 Subject: [dpdk-dev] [PATCH v5 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: Fri, 12 May 2017 10:15: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 the capabilities. * RTE_CPUFLAG_AES * RTE_CPUFLAG_PMULL * RTE_CPUFLAG_SHA1 * RTE_CPUFLAG_SHA2 Signed-off-by: Ashwin Sekhar T K Reviewed-by: Jan Viktorin --- 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 d5049e1f1..51966a5b6 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 ad5a379b0..678410581 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 4288c1470..a813c91f4 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 280dde2a6..01ac7e232 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.12.2