From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0073.outbound.protection.outlook.com [104.47.33.73]) by dpdk.org (Postfix) with ESMTP id 0065A2C6D for ; Sun, 4 Dec 2016 03:34:26 +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=zeKsEaghWGqQeePKT6apFgS20r4B1SiZkZK/+lG7N30=; b=LmtZf92zwLpXKum5cNyQHO2KsVPWCiq1PpLv07NCI5LMqYBOo2XNhg5o0MozHbk9HKbCQ70vn9Y5eOlilAdxCzouDCO36QdZTWHZHory+dedcqau9wr4HJCygBJqTjtnOtqQsA7J3J7zyE35D/OhkbQf3LvgnCPfp2OC/Rf0B7A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Zbigniew.Bodek@cavium.com; Received: from localhost.localdomain (31.172.191.173) by CO2PR07MB554.namprd07.prod.outlook.com (10.141.199.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Sun, 4 Dec 2016 02:34:22 +0000 From: To: , CC: , Zbigniew Bodek Date: Sun, 4 Dec 2016 03:33:36 -0800 Message-ID: <1480851219-45071-1-git-send-email-zbigniew.bodek@caviumnetworks.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: HE1PR03CA0013.eurprd03.prod.outlook.com (10.163.170.151) To CO2PR07MB554.namprd07.prod.outlook.com (10.141.199.150) X-MS-Office365-Filtering-Correlation-Id: 1e36c857-1a4b-4b29-e57f-08d41bee0f14 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CO2PR07MB554; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB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3WAgVcCc8aPLhNJEQJLbB5bv0R8PfynZ8utanq+t3mlg== X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB554; 31:pT9xCtBnx9VlUgy9JQAnTYKYa9biZm4t78hRuXFSOLaVReTKan4eV9TBVxuCjpib2zscecThEE8znfgMf7M2gvGWZBeT1HMv90FcBAeSicg4G33rPHwbW8tac011M2eqUPw5XhH82wgd7Rlv5YSdyCedKl5+OjD/MTu+aEMpJWGV7jVUi+ZwLVZQnZq6Eczevg7zavcw3DXU6v2adWlpyT6f22fYsrLyL8JXiCKMIHCKo2bRsOVQ6LreCuuLQ+byjIztZze8sapm2LMFla8Ghg==; 20:nYOYVF4pnurKjR57tjvOh3KnkoeFGgbxlNW1mRu3Alskw0lviWQm9yYL/f/0MXKIoZzQryWm5Z41CzTiYVjpky8rMPCVlg3tdQN19fDOY1zM/fZ0PBDMHRu1DHcscohiiZKcMhQnPsJO1Hdtqlk5WBNDG0KaGsfZmX/IgT5kLXfCa87FZd2TuwZx93gqld9/C1xdIYFao5gFOYlfzPygRzFs4Fi/o7PIKk9fs5+u3K6UG/banT5dYKDupZQB98DCqqkXE9W12Kwo7fHzcBCe2jLoczSTQc1/ZwZeDtjVoMBmqjRsW8bu9go8F8tZ/cQxPTKhtHxHHC4U+InK0S0S3D/DQMCF5FzGs/bfxsh23XSfFuNgaBYqGDy3j7tWEs/HPoMAYbXapcVVr3ynS/nSO4OzCtzrAOudaNoOmp5soIsdc50A4WL1+4oa/bbebmP32UfUAJVrXR3tBn0Iotq8NN1Yihfjvy8vMlYCCSe6Vrot81md3vLUPa/LAfC2DBdQwhP5hhNb/050BZlS/rw3fOOJWQrRyezypT+ZMOFbuAsM8yM6y/rwV3sT03UWmkateEIhRleOp0+jLw/CoHrJLMaS/p6ZYo9UG6II8yfgqqI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6042181)(6072148); SRVR:CO2PR07MB554; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB554; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB554; 4:QhzTlZrvMfdbkpH4CTZO2/u/iMCDqyRkCrq3zAHogm977HzcBWOnC6qyaikI8zPgkOHoICPNgUMCj1b7dNsBUQH3vVsW64r0tUzXoETTs26AfH9JcGI9MZ8xb9s9QnxiivJjhYeFo1CoAZLQ6wmKajx2du+n6W066ClquaT9SDwwSjgV4kkj3KsRMNKAkw8jif28N645kJMD1jEAT2hODbzBoBFWIzNjiMoJM7n48Yl7Hl54XbDPw2CHnccU1kq6kRnG/iEgtt0bRbzu0OQzii9h0UKFgE4DestO6fa8nZOnY26XBz9Vcrl4TEN5LjfLbywNxblCwrVaBPXTTyvIK6mQh5tQ7ycjXbGkZgqseTsVKJqxAKKWMYFA2dorKMM8IGGR6WcfxpCbk2cMq5pUDp+UeqOhA6y4Tb+ZvuCUr4r5dfP9OG1NclmiOQx1eWiqQp9qEyUvskNzTR+ePwEkjM+T2+VWg8n6gH21x7b+WquHgWbYWOnJmbqPMIshw5xlTw0MDp21XRHZn32XYngHJd4gtcz2bbdNzwlWmG7W+biH27XCkTxnzNdT3IvS0xkQ2gbN89dx6DFQ9DltGyUvTx/5U583+JIZgYGGn8KkbwI= X-Forefront-PRVS: 014617085B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(4326007)(36756003)(50226002)(86152002)(81156014)(81166006)(8676002)(2906002)(6486002)(733004)(6636002)(6666003)(305945005)(33646002)(6512006)(2876002)(4001430100002)(7736002)(7846002)(6506006)(107886002)(101416001)(189998001)(5660300001)(97736004)(5001770100001)(68736007)(92566002)(50986999)(50466002)(42186005)(48376002)(38730400001)(105586002)(42882006)(3846002)(6862003)(106356001)(6116002)(66066001)(5003940100001)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB554; 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; CO2PR07MB554; 23:DOdKqNpVKWH0kg2TN4f/9kw5X8xlKlA2urCOrvLlhM?= =?us-ascii?Q?aExSiV5/PbvSwwV8UVUVC+sfg2H0LD+Fvf5TgNghxDc5PtamDl4HE0Y55i6F?= =?us-ascii?Q?oQ0jNM5cwwhlfeW/2uz9/z5H49KigD3sxQRsG9lhWxpPmJnzFhFZeCYdlsiS?= =?us-ascii?Q?GMTFKPTZcU7eUEUTB5Fgo6SEzQtl2wLCTqxfXuUVuUjTe7MlSOfQ9htq2E2t?= =?us-ascii?Q?GVSMt6Cxajtd19Gb0uOYdPVc9PMeMTEkn5qzm6shXWMN4mrIrN2TMdg9888k?= =?us-ascii?Q?bRoM9bwusOl9usLbTkRQUXuVrNVDIW6Qo9/3eXuIvV1MHgYpAbi+beJfhQqW?= =?us-ascii?Q?+ZwQkUSTjy0gBzRUufN088QfDXA83T15fQ7ythbKMmSQ7WxQqp2Ye40loVgj?= =?us-ascii?Q?ILppi8ZJgFIqLu8h02dncqmL1/zPZskhBtIZ1tpLW8Dck26mgj097gZxypi3?= =?us-ascii?Q?teElxkrz1GPBF5vGOvrxw5ZtUSvEJSR/3BYlh+9M/9Yw1a1lD6sadbBB1KDv?= =?us-ascii?Q?RIETHbYIBBEB59pNO81nlAClGom7x9gs6a030VRHt9AwPizNR5MTWTRGSdy+?= =?us-ascii?Q?hRJMp/bl+zyIBe1LGxMHNouctU1BQmtyemSVbAZ6PYG0ByZnBtHBKggONtTP?= =?us-ascii?Q?aVjTxtVxSnsPiUcshWsiiod/XGwk2dK+qKvAb6VjpFirpGnaqeM17djemgOW?= =?us-ascii?Q?j8Mw/3WvQ/nxOSUMFCs05FIYuUliK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nTUAUtGNNKDRPFzkEy3gVBYwnH/pjcWXG1G2mgqlUQnO0cSsdOYDh8AzBSjSipQDPi7kjqV/Sx8aTQDbGaVbHNREj8pZSG+A1FxlPnJQzT70al8AHw+G3BJp4xh48QoBMXOqAr8vwuomB8cLo/HUsJeyg+SQ=; 24:4YCIMx4Mo94KklY5ipoaFMjTzLbvCYzGssi2zBig2kv5sFqxQUNqjOno0mqNffC3iNZFqpQeGkbroyA7IYvbmf7Qw6xmkjbSuqwpItqsjDQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB554; 7:qqNqUZbk6DVaIkYYfCT5wL8SnGmQwyyCzQAcnJxFzgUtRQItIrFaX40s1dfFxkMCSCMweCcwO+BEUw8IVcGgaUY9yTXoXmHhwjeHLSCFvzV04Jg1wRSzZklbxGnStCyajONpNAdPRHujzDqo8xHUr4Nme8dZrFZwz9WkowerkUHUImYZG2oHKNiySwlAgXkVQzVVXOtXiauPLOdWsNBDLpHi6kYiQNZsWVxoDAmIKRZ1mBGKZGYaLEQFP5tfCgbCg+lidckSaGGoh13CSbdnAySn1YYm4rI1OzKOOZzpWe0fGqYa1JJ+R2mfAxzjJ6DfEhaN3VHcgKwBTlYTOIyCgrqu2dzFQps+fPZjrcyrMUOJEbgeITuiu8op6T3EbxoY8kK8OjrWHSfvf6b7Dq+YWsbgMMoaTFKCwJXZw+lCPSMo6CKHU0MzBLIOGPFrXWBh4SyeUlR2Fz9tc2PnGXMpsA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2016 02:34:22.2018 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB554 Subject: [dpdk-dev] [PATCH] 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: Sun, 04 Dec 2016 02:34:27 -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 MAC, SHA256 HMAC and SHA1 HMAC. 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 SHA256 MAC and SHA1 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. The assembly code requires some style improvements to avoid using >80 character lines. This issue will be addressed in v2 patch. Further performance improvements are planned in the following patch revisions. Zbigniew Bodek (3): mk: fix build of assembly files for ARM64 crypto/armv8: add PMD optimized for ARMv8 processors 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 | 211 ++- app/test/test_cryptodev_blockcipher.c | 4 + app/test/test_cryptodev_blockcipher.h | 1 + app/test/test_cryptodev_perf.c | 508 ++++++ config/common_base | 6 + config/defconfig_arm64-armv8a-linuxapp-gcc | 2 + doc/guides/cryptodevs/armv8.rst | 82 + doc/guides/cryptodevs/index.rst | 1 + doc/guides/rel_notes/release_17_02.rst | 5 + drivers/crypto/Makefile | 3 + drivers/crypto/armv8/Makefile | 84 + drivers/crypto/armv8/asm/aes128cbc_sha1_hmac.S | 1678 ++++++++++++++++++ drivers/crypto/armv8/asm/aes128cbc_sha256.S | 1518 ++++++++++++++++ drivers/crypto/armv8/asm/aes128cbc_sha256_hmac.S | 1854 ++++++++++++++++++++ drivers/crypto/armv8/asm/aes_core.S | 151 ++ drivers/crypto/armv8/asm/include/rte_armv8_defs.h | 78 + drivers/crypto/armv8/asm/sha1_core.S | 515 ++++++ drivers/crypto/armv8/asm/sha1_hmac_aes128cbc_dec.S | 1598 +++++++++++++++++ drivers/crypto/armv8/asm/sha256_aes128cbc_dec.S | 1619 +++++++++++++++++ drivers/crypto/armv8/asm/sha256_core.S | 519 ++++++ .../crypto/armv8/asm/sha256_hmac_aes128cbc_dec.S | 1791 +++++++++++++++++++ drivers/crypto/armv8/genassym.c | 55 + drivers/crypto/armv8/rte_armv8_pmd.c | 905 ++++++++++ drivers/crypto/armv8/rte_armv8_pmd_ops.c | 390 ++++ drivers/crypto/armv8/rte_armv8_pmd_private.h | 210 +++ 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 | 3 + mk/toolchain/gcc/rte.vars.mk | 6 +- 32 files changed, 13862 insertions(+), 11 deletions(-) create mode 100644 doc/guides/cryptodevs/armv8.rst create mode 100644 drivers/crypto/armv8/Makefile create mode 100644 drivers/crypto/armv8/asm/aes128cbc_sha1_hmac.S create mode 100644 drivers/crypto/armv8/asm/aes128cbc_sha256.S create mode 100644 drivers/crypto/armv8/asm/aes128cbc_sha256_hmac.S create mode 100644 drivers/crypto/armv8/asm/aes_core.S create mode 100644 drivers/crypto/armv8/asm/include/rte_armv8_defs.h create mode 100644 drivers/crypto/armv8/asm/sha1_core.S create mode 100644 drivers/crypto/armv8/asm/sha1_hmac_aes128cbc_dec.S create mode 100644 drivers/crypto/armv8/asm/sha256_aes128cbc_dec.S create mode 100644 drivers/crypto/armv8/asm/sha256_core.S create mode 100644 drivers/crypto/armv8/asm/sha256_hmac_aes128cbc_dec.S create mode 100644 drivers/crypto/armv8/genassym.c 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