From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20046.outbound.protection.outlook.com [40.107.2.46]) by dpdk.org (Postfix) with ESMTP id 99F58108F for ; Mon, 16 Jan 2017 07:57:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=arNgKi447zoBh+3gWvoj3EutOPnFUTc2U220FRZo8no=; b=j+UQNBFThlG8/T5vKYiAm9VSH0Ufpans5d+rMxAT7Yzi7VUsgoDMvRrqYkTTz+Cw1iAl48xYturAbTVhQGkvW7xwOMm8m2MMCP7mWzt0x6lEVlbDs965UG2VRZXB4yTAyphiG22XbfSZ7gkV8TMi+6V03I1BILIU5GPj6SfB4e0= Received: from DB5PR04MB1605.eurprd04.prod.outlook.com (10.164.38.147) by DB5PR04MB1605.eurprd04.prod.outlook.com (10.164.38.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Mon, 16 Jan 2017 06:57:12 +0000 Received: from DB5PR04MB1605.eurprd04.prod.outlook.com ([10.164.38.147]) by DB5PR04MB1605.eurprd04.prod.outlook.com ([10.164.38.147]) with mapi id 15.01.0845.014; Mon, 16 Jan 2017 06:57:12 +0000 From: Hemant Agrawal To: Zbigniew Bodek , "dev@dpdk.org" CC: "pablo.de.lara.guarch@intel.com" , "declan.doherty@intel.com" , "jerin.jacob@caviumnetworks.com" Thread-Topic: [PATCH v3 0/8] Add crypto PMD optimized for ARMv8 Thread-Index: AQHSbc81zRFH6QYKFEKWlpckUOmLNaE6nlXg Date: Mon, 16 Jan 2017 06:57:12 +0000 Message-ID: References: <1481077985-4224-2-git-send-email-zbigniew.bodek@caviumnetworks.com> <1483551207-18236-1-git-send-email-zbigniew.bodek@caviumnetworks.com> <82638aad-780d-1909-6f3f-f46d0fcb9f0f@caviumnetworks.com> In-Reply-To: <82638aad-780d-1909-6f3f-f46d0fcb9f0f@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: 984f1165-2d0d-4542-f35e-08d43ddce5c0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR04MB1605; x-microsoft-exchange-diagnostics: 1; DB5PR04MB1605; 7:P5cXhQkBKTgQiRTknRCZZPRqchQZToq/vnL4ehnbLBira/YJOHQ6hyF8ADJWe8i8BToVLBd2wScFzeeGmWqgybjS2OvjcUqZPUK/q8D0/g58Eae/zt9/uhHotb5Fhy3vHnAW9QsEtdSTlTH6dW9z6MWMt2GfpOdGWuqhafw8oSm4/IJ3vx0iBya1E79vawgbqqszTnl20PfIJ1a15lc67qoupT9wfap5vDZBfj3XmoOGCUAtMs5pw+BgnKQLaK4XKGSqBKpZzONYv7Er35WOkrWBOmZCeJAGPvfKaE6VSKS+YG/uNLRS5jkAhd7olzTwW66KQy5c0yecuRHRu4Yu33J/AkeBgnWoNbGKYa0lVlRZHnKgGppFOi/HdFul2AAmuuDSlJII2o7aaf8Dp89YD+yyiuLnyHOBLF7syLb9k7MHgj632XD+WJqmpQrFHV+U6/ODqX7kc67X9p1PRlXrHg== 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)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123564025)(20161123555025)(20161123558021)(20161123560025)(6047074)(6072148); SRVR:DB5PR04MB1605; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB1605; x-forefront-prvs: 01894AD3B8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(39410400002)(39860400002)(39840400002)(39850400002)(24454002)(189002)(13464003)(51914003)(377454003)(199003)(106116001)(229853002)(81166006)(81156014)(106356001)(122556002)(105586002)(8676002)(6116002)(3846002)(102836003)(50986999)(4326007)(68736007)(8936002)(3280700002)(2906002)(101416001)(189998001)(3660700001)(33656002)(27001)(66066001)(76176999)(54356999)(2900100001)(93886004)(5660300001)(9686003)(92566002)(25786008)(7736002)(74316002)(6306002)(305945005)(55016002)(99286003)(54906002)(2950100002)(7696004)(97736004)(86362001)(2501003)(38730400001)(77096006)(6506006)(6436002)(5001770100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB1605; H:DB5PR04MB1605.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2017 06:57:12.1028 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB1605 Subject: Re: [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: Mon, 16 Jan 2017 06:57:13 -0000 Hi Zbigniew, > -----Original Message----- > From: Zbigniew Bodek [mailto:zbigniew.bodek@caviumnetworks.com] > Subject: Re: [PATCH v3 0/8] Add crypto PMD optimized for ARMv8 > On 13.01.2017 09:07, Hemant Agrawal wrote: > > On 1/4/2017 11:03 PM, zbigniew.bodek@caviumnetworks.com wrote: > >> 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. > > > > Do you have a plan to add the crypto only, auth/hash only support into > > this driver? >=20 > OpenSSL driver is already implementing that and it is optimized for ARMv8= . >=20 [Hemant] Agreed that openSSL driver implement it, however it will make the= application little complex to initiates both driver instances and then cho= ose the driver based on the algorithm. > > Also, do you plan to add additional cases w.r.t supported by other > > crypto driver? >=20 > We may do it in the future but this depends on our resource availability. > > > >> 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=3D16. > >> 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 > >> [Hemant] Thanks for the good work.=20 Is it possible to get it hosted on a standard and neutral place? E.g. Linar= o It will make it easier for other ARM vendors to contribute.=20 > >> 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 > >> > > > >