From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0065.outbound.protection.outlook.com [104.47.38.65]) by dpdk.org (Postfix) with ESMTP id 61ECE2C71 for ; Wed, 4 Jan 2017 18:33:45 +0100 (CET) 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=WVxVclnw49qgdPcB/j6S+esl4oVlvtjIA/TdEQUkayA=; b=LzwmoPrb7Dk6y+XTBvz08tP1uRdI/WS7VxiJNSszGUw24BLWYEtT7/G4t8OCk43Q0kOOYmwxr3VQ5GGNRaPe0x21zycKEgimQn/Rxn3YMkZjrAM2nQ/NhLqwzZPHsb+id01bjj/LPTmraKzKOO2A+yZvqIt+RU0l1NiECfBSL6s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Zbigniew.Bodek@cavium.com; Received: from localhost.localdomain (31.172.191.173) by DM2PR07MB559.namprd07.prod.outlook.com (10.141.158.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Wed, 4 Jan 2017 17:33:42 +0000 From: To: CC: , , , Zbigniew Bodek Date: Wed, 4 Jan 2017 18:33:19 +0100 Message-ID: <1483551207-18236-1-git-send-email-zbigniew.bodek@caviumnetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1481077985-4224-2-git-send-email-zbigniew.bodek@caviumnetworks.com> References: <1481077985-4224-2-git-send-email-zbigniew.bodek@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: AM4PR0501CA0020.eurprd05.prod.outlook.com (10.167.83.158) To DM2PR07MB559.namprd07.prod.outlook.com (10.141.158.24) X-MS-Office365-Filtering-Correlation-Id: ad52c6e3-0dee-4191-cb49-08d434c7d49c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM2PR07MB559; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB559; 3:HgpzgkDn0KmMKwtvriNhJbA6w91d8+716iV4QExGJSC8qj2+MM/btG7giY+0FiYzReqPfGeumZqXoiqqohAKjbEGYVjRBWNaS0TVrltQFt6914wXCJVfW35kRHj3W3PLsyy/L/YNojox3Z1W6ueqhh6A8K5wfcQGb/2im7eSqGJnxBv3dHd7EE7RMohpYku4RrZExQY5aIXl542g4jEm1vG7svnkr2d98xD/rwfipG4p8Fol2ThivojgcRB5AQ1yAqFtc2bd043A7njii08t8w==; 25:e2fJ4dC3cpRZQIOJrAPfXS6fcNw2yOgTH2JMq5EexMINbzY0Ap0patLSCGa2AsaVBNDOGKIK3aAVs1O/QELLXFc5LDls9YIBGKS25guXPRJbCubVObQb6ihjPCjDaaw1+Z4g9FREprIlyf7CZESCMYN47h5UShI0HeS8EbVMwxtsMo2LAZamNehDGceLOQwAdZ8kVEmZxkU/mcA6+c3epQdD0E/lI7WLl15NfELr7KF6/tc+3IAO6Yv50rXkWf5DuWbb+elu3yLDxa/ZpziY51sX30IQQTxmaxbh/QvT8aRHclfT5nQExIr/Z5vAtNh5dGIUzojX2FyS4eC3dMsaAxgU/U55y9tQ/eJU5VzXga/TJox8R88UJx+9CO+8kfdENLDGPQ/cWLLxNRZ7C6Fa8u7d8jHgxMloiQuFBFbksg4iIKGsE+8Q4VKHHh+p9rPMCG3IAk0hYYJDWhw0JOCK5Q== X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB559; 31:yPnSUKeWCnQQmebINB4VUfq2Artj0CkP2JVZv7CQZPWHjhNo0p8v9ghT8aS4hwIHwTiVbtdT2mfTDnY40MO9oFQi5ITYD30atTYI2hp7fVvkMpYfcuFIrs9SM8Pmmv1YbFFSjdMDlBH4/vb6CSLNFcp5ZYbjRCnaR/aux4jNYKiAY43xfsqhxPEFzZpzzwKDgA6O54Nf672zpqASCKDABU4u2VgzHD4qEj/poNAcib+e3yn0+9lRyErRi9QvemvjrMV9FdgfuE6knQgRL6z4tA==; 20:3WK3I+NNkWF9Rymci/gGcQ0AnK+5zAEKFblfJWRO/zTM/k7TrKdUUEek5wHwPqV3xmDZGP7ov4/2ptJibdpY69cLYQ+soPO7TTZ6QseI4vHCqP6P7V9hM4+9PzZ994BBN+7y+xLoJWBi0XS2XzhDqYBJDS4Qlpy7nc/VdctylvYRgOQHcB8nbHnTjktSOrWXfaQB+6QkY8k70bVk+wjHulY7NasMpNgQlhTznkrpClVOf4N0A8KL81G4+Z9Hsx/O4iF4ZDvp4O/9GeDgEXmgCgse6J6/evGDRDEldLew6xRW8z2QPUnB1JP+YgafHgzMSlXBQuF1tf7NyjRY+1B6q7xK87oIT4azVJ7UadOhYv+SjE95FXSASAp/37qVk6a1vMD9CG8mCaHrhhDdL6rmI3jdmMChbxOZodDvIJF85UXYXtwwtOw4hWwzqAgvpdVszmYwHZEyTgJfFhIS/SM6hhPMvjZxieNA8hX4yg7GxDhsHYrOVUE/MUoFpwxlfIcAIN4DDnqCwxHR6Zi2mevz0nseTVh9TQL2YDTyQ0dNKv5wwxPT1gjOHEQjEWWejBJt0QeSeK2g6E9p0B+EQvQijzHDczqfkSyBzzjP0XQJ1CU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148); SRVR:DM2PR07MB559; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB559; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB559; 4:u0XqPTgmA/gODLOZrlBo1WZ5oVh+uOnV8E6gOaQC+/uZrs9JQIS9wPr4YHWblMcIWjly1qmet2TPdDOsAJ3B7BU5BOpzjanHG4jPkkKHwqWRtUC1xD0JlIwdYo6QUG4puFO7HSxuVvpDNbxHkgJNJye6jmObnYg+KSg8dnK8TV2fNT379cPxWfOY71O2445klqc7hura+/gqjcJaXxURCORAKAo1rqnf2FoaWyCsKuQ6/rp9LyDgko2aKWnKGFwaUtb87nkWa4fkq0pOUCtaQhI75ZD8wKzlo3+lPLpD4Ip6WUOYI9OUd6l0Y4Ei6CDOhG2XjYY7CHNulCdKe0Ez0o5ulcXR3AEAjD6hrsG+JE7gTOnRbw6pDzFnO6MKoG3gZfQw/pUb7JMNKrGudwTG/DrZXdrOIlwH8WvQuQMsF1j7j1rBiatmSMXsp8xBLDd8YQouKO08R9HOHLqMxLpkmZyn1nF5GjBBGc+geWRGl6DnvaLC7DvKZb9YYYizh/d7Nzu+gMy5Qn0fqIh4naaCG1ABZSezMPf0NHgfNc0aUm3iEMIXzUUXXpV2sqPrwVrzjW2FYAAPHWF+fr4Ygd7yqwI1BOg4apPODLMmMERe0Pfhuf33LUjOZF7efMAuoHRo X-Forefront-PRVS: 0177904E6B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(189002)(199003)(105586002)(7736002)(92566002)(101416001)(68736007)(5660300001)(38730400001)(47776003)(66066001)(81156014)(50466002)(33646002)(110136003)(189998001)(6916009)(81166006)(42882006)(4001430100002)(8676002)(42186005)(97736004)(107886002)(25786008)(5003940100001)(2906002)(50986999)(6512006)(76176999)(6506006)(6116002)(54906002)(2950100002)(4326007)(86152003)(6666003)(305945005)(36756003)(2876002)(6486002)(106356001)(48376002)(3846002)(2351001)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB559; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB559; 23:JhnWNTOsliu/IDXLNoKjSbCRKRrrBXEZB02z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97t8kNMdv4ajpYHTbQ/umOppo/ot3T/tdKP4cZs7Ghu2dtcZSS9f7JQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB559; 7:kMCXnIAetmr0NQHXVW10J0rNYIZ8LQKnHd3006iu+2//m2gwTww565J+B7lVzPK0XxPXnXWncaOPx2dZLlR/Vglsg3BtW/gBRG1N3lHs8NRQxDFeVFMCWOr1Ez1Kibs+7vutH+B8VLtyGmC1McFr1si9hyIkmcgKdxXJetQfEUuTjVAW4u6vWyjIy/OfHsg9zh2tpbOaEsRIgMgmsfWjJ9EgrOcp73H3smiB2UI/x8H4yChVFwWC93xf8C3sP0A3q06kVXl1ERJaE6mEOM5KBeHX4pfoTYdQ1izHoiINKD6nqkekLj0ZTyOPUG9J+2nPFhyMwHBX8+L9hk0OJEEmshKb5BHFUqT5AXR8u1C5CZ8k93lKe7NCW+mKWkkLk8JJ9EiM+bZvS2uKlErax5BB/+cfaulsfWQUby4s16AAEpupJzO7fal/8CKZrPML/66l96NZcbmHbAWkt1BpBR4Z3A== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2017 17:33:42.6226 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB559 Subject: [dpdk-dev] [PATCH v3 0/8] Add crypto PMD optimized for ARMv8 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, 04 Jan 2017 17:33:45 -0000 From: Zbigniew Bodek Introduce crypto poll mode driver using ARMv8 cryptographic extensions. This PMD is optimized to provide performance boost for chained crypto operations processing, such as: * encryption + HMAC generation * decryption + HMAC validation. In particular, cipher only or hash only operations are not provided. Performance gain can be observed in tests against OpenSSL PMD which also uses ARM crypto extensions for packets processing. Exemplary crypto performance tests comparison: cipher_hash. cipher algo: AES_CBC auth algo: SHA1_HMAC cipher key size=16. burst_size: 64 ops ARMv8 PMD improvement over OpenSSL PMD (Optimized for ARMv8 cipher only and hash only cases): Buffer Size(B) OPS(M) Throughput(Gbps) 64 729 % 742 % 128 577 % 592 % 256 483 % 476 % 512 336 % 351 % 768 300 % 286 % 1024 263 % 250 % 1280 225 % 229 % 1536 214 % 213 % 1792 186 % 203 % 2048 200 % 193 % The driver currently supports AES-128-CBC in combination with: SHA256 HMAC and SHA1 HMAC. The core crypto functionality of this driver is provided by the external armv8_crypto library that can be downloaded from the Cavium repository: https://github.com/caviumnetworks/armv8_crypto CPU compatibility with this virtual device is detected in run-time and virtual crypto device will not be created if CPU doesn't provide AES, SHA1, SHA2 and NEON. The functionality and performance of this code can be tested using generic test application with the following commands: * cryptodev_sw_armv8_autotest * cryptodev_sw_armv8_perftest New test vectors and cases have been added to the general pool. In particular SHA1 and SHA256 HMAC for short cases were introduced. This is because low-level ARM assembly code is using different code paths for long and short data sets, so in order to test the mentioned driver correctly, two different data sets need to be provided. --- v3: * Addressed review remarks * Moved low-level assembly code to the external library * Removed SHA256 MAC cases * Various fixes: interface to the library, digest destination and source address interpreting, missing mbuf manipulations. v2: * Fixed checkpatch warnings * Divide patches into smaller logical parts Zbigniew Bodek (8): mk: fix build of assembly files for ARM64 lib: add cryptodev type for the upcoming ARMv8 PMD crypto/armv8: add PMD optimized for ARMv8 processors mk/crypto/armv8: add PMD to the build system doc/armv8: update documentation about crypto PMD crypto/armv8: enable ARMv8 PMD in the configuration crypto/armv8: update MAINTAINERS entry for ARMv8 crypto app/test: add ARMv8 crypto tests and test vectors MAINTAINERS | 6 + app/test/test_cryptodev.c | 63 ++ app/test/test_cryptodev_aes_test_vectors.h | 144 +++- app/test/test_cryptodev_blockcipher.c | 4 + app/test/test_cryptodev_blockcipher.h | 1 + app/test/test_cryptodev_perf.c | 480 +++++++++++++ config/common_base | 6 + doc/guides/cryptodevs/armv8.rst | 96 +++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/rel_notes/release_17_02.rst | 5 + drivers/crypto/Makefile | 1 + drivers/crypto/armv8/Makefile | 73 ++ drivers/crypto/armv8/rte_armv8_pmd.c | 926 +++++++++++++++++++++++++ drivers/crypto/armv8/rte_armv8_pmd_ops.c | 369 ++++++++++ drivers/crypto/armv8/rte_armv8_pmd_private.h | 211 ++++++ drivers/crypto/armv8/rte_armv8_pmd_version.map | 3 + lib/librte_cryptodev/rte_cryptodev.h | 3 + mk/arch/arm64/rte.vars.mk | 1 - mk/rte.app.mk | 2 + mk/toolchain/gcc/rte.vars.mk | 6 +- 20 files changed, 2390 insertions(+), 11 deletions(-) create mode 100644 doc/guides/cryptodevs/armv8.rst create mode 100644 drivers/crypto/armv8/Makefile create mode 100644 drivers/crypto/armv8/rte_armv8_pmd.c create mode 100644 drivers/crypto/armv8/rte_armv8_pmd_ops.c create mode 100644 drivers/crypto/armv8/rte_armv8_pmd_private.h create mode 100644 drivers/crypto/armv8/rte_armv8_pmd_version.map -- 1.9.1