From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0085.outbound.protection.outlook.com [104.47.41.85]) by dpdk.org (Postfix) with ESMTP id 154402BB3 for ; Tue, 6 Dec 2016 18:34:03 +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=h2XdOTN/kcm0KnurxkbNwboVR5ynjF64RjSQO9J5sRE=; b=U+zljgJCJxNDQX3Z61uI+585tRGrcV+XEKVQtwQ4pw2pLfRjCnI5zMJatbWoYneXOTzaNqHO0cmyeyvYnOUU9fgI6+HjrBPphZM8NtN2kdUI9FHyzDd1JbraZ27LhsCUcM8IO1Y+HqKNoi7FMn+cY7+KWsM0b7blzeQ+EtLT2JY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Zbigniew.Bodek@cavium.com; Received: from localhost.localdomain (31.172.191.173) by BLUPR07MB547.namprd07.prod.outlook.com (10.141.205.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Tue, 6 Dec 2016 17:33:59 +0000 From: To: , CC: , Zbigniew Bodek Date: Tue, 6 Dec 2016 18:32:53 -0800 Message-ID: <1481077985-4224-1-git-send-email-zbigniew.bodek@caviumnetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1480851219-45071-1-git-send-email-zbigniew.bodek@caviumnetworks.com> References: <1480851219-45071-1-git-send-email-zbigniew.bodek@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: VI1PR01CA0023.eurprd01.prod.exchangelabs.com (10.162.116.33) To BLUPR07MB547.namprd07.prod.outlook.com (10.141.205.17) X-MS-Office365-Filtering-Correlation-Id: d8325f21-bdfb-496c-8527-08d41dfe10c6 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BLUPR07MB547; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB547; 3:YZnedlOImkyAFj2d+ot2aqQ+di08neh3xqodxlIOePtrwqB5X6DPshYZXOo7SoK0Aa+QLu9iSsDir8+4/PHy6Y1nVKZ75ZrNh54aBhZfUhw8ldevQkB0MdMNM6cxNWVSS1A+E+U0fvz3tTH8T+A8B21ol8dR0D7StIAqtMPmBMG+Z3k8GDcgCTlLjpl+ISgC5M9fkM9y26lEW/P14ZZ/e9A0geW6aDZIUTaJEkpcMZUhKAyLsxG8yzzfks3No9P87J3mflFbKoWG66WHYvakYA==; 25:zS3ovZORfUWlGKEPoBShvPn3eSHhsi8PsCRktehkljJtG3b9MusE6R9cFZl1i7D70966eJuY1+EBHtbuCVo2WNruzH16rTPwDD330jnthl56F4N6uJ7TGWCPP8fIu2UkKccCKC/iDMlpxMG2EPzAvFp5Ermih+u93op0wA4wg3GghrH2MxSHjb3Drv0ggNOdClUliXVliKpQ83UpASLsNcKQMDTp8pRfliwgoxzEFpGM5KSR3CuQ0eb3v8VH/EH7CF43TXq9WeWbRitgQzPcLB+MpZ/mGrr1nw8AEm1njFRTPaBTa2VPJoNE0f0b/P5sx21SduvDAcTkxyUipr8Q7rMS2AQ5kIncR+EDKM3EVFSP0LPcd4I8krMu4GqrkFHrHwumzcthsuFhB+Zxxn7oQkvK03kcfEhzuGpZdGqM31dvEjw6PIeoLMmOnPxjCRwLOi75Bty4L1+MpV+NSjwa7A== X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB547; 31:0N8FCKB+2uPe6EQMqmW6GszoFtXKSY0VSqLvH+xuCyiuNmwcGZ78tyxpQm5VCaSMXGXXPuguG72wRJmCkr3PT7WCK/KUuaC2cWJAF6zzhHwR6lXl7JGcqXq5aTJ4mCcepM692d6R3QA6U+YD8mFcSuxxzlHRD8ji9mqzeR7VHVvNmhKYqeHZh/bLGvXSry7dGnGymanp+8qTVhNRIaE/Lf8iPeDAXKqeeSqicU+8Hnn0ST7huKQc1IrlMKHkm3ov; 20:qmBWkwapyJbUns/1bvS4I36WSnMKi36vvcYDf46o96hUlhFNqJDp3PU8z93jDjiZw3rdWOX6hCLTfF5Gv3w/yMjiT4T/6aZ04mPEdfnq/Cb2HdHKEAn+Efgwj2C6ASDrhsOuwYu2LD4q5xnll83W12QtmJAT4KXCyTIa6XKfCfXN6FSdpmA0LM/ySqMpCKQdqn6REcZ1Kzm5Vw3dHKHAcboTQbzWo3H9giT83hjdmEov4u9nZ783S7PCjJbljZX/wQ562xjSXFae5+bbelFmufVuc9W5jtS4aiHUpPk8eLxQ8RblkwkpK0LpdDUgJtxXa3w+i9mPD3SCpU4ac70NijdybHc6x4t+m2kIybaXpWV/kw0EmT6aiq/TxSQXBNTgUDcnGxUE9GlIqnBB8MTJB9VpZ5OCXUNJZ4UrCE4VCNASrNgrJFs6mvr/Bbwxrm4C3+Vct7DhPVjALKABn1Tx/04IeF0qsGCJcth5VLSn4yGm0p3a2PoYC08tRfWmLTGFXAYKi3jlIJTFCxXUfHXXVEdhRAo79EDWJQFPUTFN11leRZnlXAmF+cQOy1S1QmUroDq9F7UogcxLvw/gIRrcW/Bj4r1gGC/R1CNftY0ToGM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:BLUPR07MB547; BCL:0; PCL:0; RULEID:; SRVR:BLUPR07MB547; X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB547; 4:83gd0vWovV4ac9hs7PKrVDm3zJKQfsXdYM4XdV5qiSuMkLLzdA6AOH0CRvdqxN8w3a5xqZLU0YMNJ2PKwnPbGyA/FrBTNcsrr1lq0QMLrNqvrwx/PcTZLR3RyQgkpZ/jmyY9y5j/ubwGwUp+C9GZXeqJwInOsAc2RPdz4iXC+ssJCpfnccqkgpTWOC4p8doF5iyrE6dlvX/sGU5tp/DAQnnh+IVFWK35ZRhOCsxbAnr0U80LRKYyEGj0mE6VbVYq+22/erwvIiHmcRRtyKHxRyI50zVnhzPod59ECrJkH4nBszrvgIhhw7JDhVICi3upTJOT+WTUlW+4xT8GDza5l9Pvzrj9cHEybwhlOPPUQ+Uka0TG7n+xguzf8Q53XhTjv+A8wMq0HWjkwzUOlQcpF302UhF4YHwic3O8HK5++AsBPPV/EUgBrYD/tceeRRiKpQoZiD14UG3iRwg1uTwsLQjE7fjarb1eVNUPmlPc6WB2fzHGL/3cB95GYM1mnjRwaF7xO8JHhqOKjhEwLRVJvmOHfrdnOppXwbbIeYg3Rc88QwkwRuBMy+QooR6Atl0w5mDrh7xxqY+qb3iYOgeY5w== X-Forefront-PRVS: 01480965DA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(86152002)(33646002)(97736004)(5001770100001)(39450400002)(107886002)(4326007)(6506006)(6636002)(50466002)(6862003)(50226002)(6512006)(6486002)(4001430100002)(189998001)(39840400001)(39850400001)(2906002)(2950100002)(2876002)(6666003)(39410400001)(42882006)(5660300001)(733004)(68736007)(8676002)(81156014)(50986999)(3846002)(7736002)(76176999)(106356001)(81166006)(7846002)(92566002)(101416001)(105586002)(48376002)(36756003)(38730400001)(5003940100001)(47776003)(6116002)(42186005)(305945005)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR07MB547; 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; BLUPR07MB547; 23:XZk11lBIylKXBEBVD8KyI/Ro7CHX2sSAH648a01Q+H?= =?us-ascii?Q?8s3eqk9G/XpujzgjPEachAQ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sHbT5OurLQA==; 24:XQgA2BJSsRMozAlsg1Jf5wlnEIODQl/crxDygd9dh7UooA1OjyKId6ppF1TI090ac6hsR2Pj4GlSpLIC16KMGchcgtXtumtVLpR328IgmeE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR07MB547; 7:N6/GXVfZsJA25Cmq2gP5x8QFoaB8VjANLPOsdpZubEpwMDRtsiCn7ggUw3KhMlDXS2xYFp0++Ay5uGxLIQAvvmx3iCDWpLh+N0vbZ6NjpFIiMyj5KiwUTrPd6pbnvmkimjVcQuYvh/o4F/fnwEonsalu8bQBmqSSqpGR6R9McfJOf2iu8jo0BWCT9qwMKZtw4+v5rbsSAxFtc9to1kdPtCt+//yx3EknL/+bbs0xznqox45/FRwZmos4yKJCZEo3u7zTgueiqIasvPEiggJv/Vd1esUHq9cL0/2vVR73es4Rg3hM08AoW1k3fSqYcu9FSWvp1SIW4cr6Nb1IytINhQ+a/bNCrhuCxUATW+ZfbKMnVZvZcfDxoaaI9f6RDxNY679DmiT6Qy2KTmV0vx+u51HfO9DZ1QJKpFNUsnhITS9X1me2RWJFjNo5Kr7FpupMkcE534LQaCaQ5iaFknJPsw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2016 17:33:59.9821 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR07MB547 Subject: [dpdk-dev] [PATCH v2 00/12] 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: Tue, 06 Dec 2016 17:34:03 -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. Further performance improvements are planned in the following patch revisions. --- v2: * Fixed checkpatch warnings * Divide patches into smaller logical parts Zbigniew Bodek (12): mk: fix build of assembly files for ARM64 lib: add cryptodev type for the upcoming ARMv8 PMD crypto/armv8: Add core crypto operations for ARMv8 crypto/armv8: Add AES+SHA256 crypto operations for ARMv8 crypto/armv8: Add AES+SHA1 crypto operations for ARMv8 crypto/armv8: add PMD optimized for ARMv8 processors crypto/armv8: generate ASM symbols automatically 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 | 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 | 1719 ++++++++++++++++++ drivers/crypto/armv8/asm/aes128cbc_sha256.S | 1544 ++++++++++++++++ drivers/crypto/armv8/asm/aes128cbc_sha256_hmac.S | 1879 ++++++++++++++++++++ drivers/crypto/armv8/asm/aes_core.S | 151 ++ drivers/crypto/armv8/asm/include/rte_armv8_defs.h | 80 + drivers/crypto/armv8/asm/sha1_core.S | 518 ++++++ drivers/crypto/armv8/asm/sha1_hmac_aes128cbc_dec.S | 1650 +++++++++++++++++ drivers/crypto/armv8/asm/sha256_aes128cbc_dec.S | 1658 +++++++++++++++++ drivers/crypto/armv8/asm/sha256_core.S | 525 ++++++ .../crypto/armv8/asm/sha256_hmac_aes128cbc_dec.S | 1832 +++++++++++++++++++ drivers/crypto/armv8/genassym.c | 55 + drivers/crypto/armv8/rte_armv8_pmd.c | 915 ++++++++++ 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, 14107 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