From patchwork Mon Oct 22 14:18:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 149388 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2690771lji; Mon, 22 Oct 2018 07:20:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61PdElUdlZ5JWV851zD3Dm1VuWLdQhSfCb9t5qu1Os9TmXejbYpa0R0VCNW5/0HFviiofoY X-Received: by 2002:a1c:8b94:: with SMTP id n142-v6mr16805034wmd.38.1540218013717; Mon, 22 Oct 2018 07:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540218013; cv=none; d=google.com; s=arc-20160816; b=VVxPDbzIXEcQ2LidgDSAo9zQfU7u0XM+hNX90bC05Fxt7HvzlgoyXPU1QlpK2ysC96 va/KkgjiAt9s6ZM/zk0f5QqOmmdW3AG3a9Ycdai92J5pJDVtiVe1Kxjrmq1xsxwd2owM +ld0RODBDMPu0TFQEb/bzxK7jbK/AuK2W3fezqlvTuLzINpXdw4ET7/VHZNM9oZDiOEf R/QTYn0gwhQV/kG4kXUpJO5Rp5siQ5ndoKv9GfYkTFPNJmMbV8+O8POfXaqq5WcZ4GCP 68h2i9HeY056Ap+pqO8a1iF+B0ZQg+dtu9on+YcFjPbArFwdmlr5QWe1ddhQ0+XiUc7P vG8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:content-id:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:cc:to:from :dkim-signature; bh=GjQ/H4gnbFu7OH79R2dlU8kN7+jKbQcdtdYuVG+SGUg=; b=SGV/jAs9oyi8T2wvAEdb1DKzkiJKd2hCe9+qw/rhzQsM26aqqrl6WZoOBS3bq+uHzy KTyxn6xVTIry1JjlQtxyNdbMfo1EonaDHYx0nJbiTHCCCuPlBhs1MRV4plySjye+jUtW sHr6SipeU0Bacz+LxI93qSVRIN2xoU1w+5cZlOIkC3YP5A10Spfr1H3yg8XCo0POLrt+ RMd2p12GmYWieasdNmFDw4kpyrDU8WNJFY5RDp5cqgMPOc6ZCys+ICNmsufS+xCKCtGC e4dp9kf1VXUkDBiy3vdoRV8s0VSkQ3ixGY9l6B8gwzqeRqjGj212J0JsAgZv+28P7wP0 ntYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=I7r7ujRg; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id g8si14922633wrx.123.2018.10.22.07.20.13; Mon, 22 Oct 2018 07:20:13 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=I7r7ujRg; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59DC11B273; Mon, 22 Oct 2018 16:18:16 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0057.outbound.protection.outlook.com [104.47.0.57]) by dpdk.org (Postfix) with ESMTP id 176D21B1F5 for ; Mon, 22 Oct 2018 16:18:06 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=GjQ/H4gnbFu7OH79R2dlU8kN7+jKbQcdtdYuVG+SGUg=; b=I7r7ujRgJpO4in8B37KkucFg9hsJe4D143wqLYr7swIqxS+RAaEMqYIf26xBlGpWx8EKx1H7d2mYsIUsqR6pxXpF2rj4A7GqcsJtI3iRWBZMYjOpLp9hpeW/ZtHG/h10fVLljrUZuesd8VXMkjo5FWaxA9ijiJokHumjjxTCcOg= Received: from HE1PR04MB1530.eurprd04.prod.outlook.com (10.164.48.20) by HE1PR04MB1372.eurprd04.prod.outlook.com (10.163.175.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Mon, 22 Oct 2018 14:18:03 +0000 Received: from HE1PR04MB1530.eurprd04.prod.outlook.com ([fe80::95cd:198:d5c5:59a4]) by HE1PR04MB1530.eurprd04.prod.outlook.com ([fe80::95cd:198:d5c5:59a4%5]) with mapi id 15.20.1250.028; Mon, 22 Oct 2018 14:18:03 +0000 From: Gagandeep Singh To: "dev@dpdk.org" , Akhil Goyal CC: Hemant Agrawal , Gagandeep Singh Thread-Topic: [PATCH v4 14/15] doc: add caam jr cryptodev details Thread-Index: AQHUahILZ9SG4pduaU+l+ticAu+nBw== Date: Mon, 22 Oct 2018 14:18:03 +0000 Message-ID: <20181022141657.4727-15-g.singh@nxp.com> References: <20181022133021.11264-1-g.singh@nxp.com> <20181022141657.4727-1-g.singh@nxp.com> In-Reply-To: <20181022141657.4727-1-g.singh@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR0101CA0025.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::11) To HE1PR04MB1530.eurprd04.prod.outlook.com (2a01:111:e400:59a8::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=G.Singh@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [14.142.187.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR04MB1372; 6:8jElUxo72xkj6vr2fTZdwgxkX15R3yvc2U8sbKL/Yu0O7pKR9P34fY0u8QFRIlyXljuyMA8fRuvh8RidKTtVwDNO1W0jFdbdAh9a1eehmVzBfZtLerPmCotvv0XhiUwUE5jv2Dw2tVXTDqoN853wqV75d17zZ81XhuAfXeTXlu9d8N65PlN67h8boYoagYcBo75UfXQwjluTEpiIFevYVk8+QuDNm2MF0IiD6UBtuCM51EZxdNXtMIsDOVMoWssnBrveGrtQGbR5FPayHH2JQjZmtW4S1LKksoUhrkGS+04sTb3ZCboG2s8HyNTXFxi0JgwaER9MeoyXZwP7DnKkwp/XJe8yWMOOR4e/cDQfDT5haBdzH0LUZCh9j2puXvxUmAGHDvhkiFchc26gEgQ9e++pcBApM/7cDC0/t6UbCy98QH7vSaHgKJD+Y/ug+PSy2CK3yGB1axn/4ZuiQxdkzw==; 5:K8jvMBNanoe44kbYSzhnjttyMjyEYh+Ci/49EqL3WLF0KbWB+353o5AdtgTV6FLBG/IBjvZ6VHI4LNL0Iu8pIQxE84MRxJRdzW2dcN6qjo9l3Ma8UOdpO6zESfkcW9jXpYCKjzI25Rza5LO0ZH6Ma0bY4SpDm0C71rRmA1GfZVA=; 7:WbxfjUpAcqilLhoyh6cUieGfHqsDLDmYWvtezzAEPNyfRv1mFMQH/pwi0VvEUXbijCMBryCIXH8muLAnXcLmigJN3SwyGuj8khJjnHrWQvfRnocNxyrG9fae5AWT2VvVrjFL4CmkYxBSdtbs5VqR3jb3AhHA8xx+655zTkDKsBzmiPvNlgCXpPVt8PlE0kIXE8QUmTBtFgKldp/tkkkUZ4G4GXtR7+kT0DUKUB5DLo0Q+e3wup0xxepneo+fOQdg x-ms-office365-filtering-correlation-id: 53d3d425-c9fb-459b-c47e-08d638292dcd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR04MB1372; x-ms-traffictypediagnostic: HE1PR04MB1372: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(192374486261705)(35073007944872)(185117386973197)(264314650089876)(278428928389397); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:HE1PR04MB1372; BCL:0; PCL:0; RULEID:; SRVR:HE1PR04MB1372; x-forefront-prvs: 08331F819E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(366004)(136003)(39860400002)(346002)(189003)(199004)(4326008)(52116002)(446003)(8936002)(2501003)(55236004)(486006)(2906002)(72206003)(102836004)(1076002)(6486002)(2616005)(99286004)(5660300001)(6436002)(476003)(11346002)(186003)(14454004)(81166006)(5250100002)(3846002)(8676002)(81156014)(68736007)(256004)(6116002)(97736004)(14444005)(86362001)(6636002)(105586002)(106356001)(6506007)(386003)(478600001)(305945005)(575784001)(6512007)(6306002)(7736002)(2900100001)(110136005)(54906003)(53936002)(71190400001)(71200400001)(25786009)(316002)(66066001)(26005)(78486010)(76176011)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR04MB1372; H:HE1PR04MB1530.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: CCKHhyV23x/mvGEGQlbaYRCiuslGf+FiKVzIJUGqcJphwrDJopfbYeAE+HY9xw53dIUtucexWxKPnounjDsQgtYso4foIbBc37/ZHxYUGIjQVKB5+vjPFinU5QXZxihJhMYJOqIKJby4UAzYTWwHzGC+q/Brgn4YpwyeLBLBXZVUrBMH1qfjSG/vMUKN68e44ZFODB9Afsg3kGNFYPo3dxJ1WNo0WkntgEpSZfu+vd2y+Sc7bUIPF7LU9CE6h4djW4oJcVjVK1z8nmXjnWyUIX4tL7c2oUT81prVcrZbuPgeDavlcaW51h0gHBAa/HoOBltxfebGQeLx5rovJQqveKfhICkujSLdEIEUH7Y5ZzE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <1113A0E424727346BC99AB71C0B833A7@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53d3d425-c9fb-459b-c47e-08d638292dcd X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2018 14:18:03.8042 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1372 Subject: [dpdk-dev] [PATCH v4 14/15] doc: add caam jr cryptodev details 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hemant Agrawal add caam jr driver details, supported features and algorithms in the document. release note and MAINTAINERS are also updated. Signed-off-by: Hemant Agrawal Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- MAINTAINERS | 2 + doc/guides/cryptodevs/caam_jr.rst | 150 +++++++++++++++++++++ doc/guides/cryptodevs/features/caam_jr.ini | 46 +++++++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/rel_notes/release_18_11.rst | 5 + 5 files changed, 204 insertions(+) create mode 100644 doc/guides/cryptodevs/caam_jr.rst create mode 100644 doc/guides/cryptodevs/features/caam_jr.ini -- 2.17.1 diff --git a/MAINTAINERS b/MAINTAINERS index 9de01189a..3079c187e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -855,6 +855,8 @@ NXP CAAM JR M: Gagandeep Singh M: Hemant Agrawal F: drivers/crypto/caam_jr/ +F: doc/guides/cryptodevs/caam_jr.rst +F: doc/guides/cryptodevs/features/caam_jr.ini NXP DPAA_SEC M: Akhil Goyal diff --git a/doc/guides/cryptodevs/caam_jr.rst b/doc/guides/cryptodevs/caam_jr.rst new file mode 100644 index 000000000..e87ff0915 --- /dev/null +++ b/doc/guides/cryptodevs/caam_jr.rst @@ -0,0 +1,150 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright 2018 NXP + + +NXP CAAM JOB RING (caam_jr) +=========================== + +The caam_jr PMD provides poll mode crypto driver support for NXP SEC 4.x+ (CAAM) +hardware accelerator. More information is available at: + +`NXP Cryptographic Acceleration Technology `_. + +Architecture +------------ + +SEC is the SOC's security engine, which serves as NXP's latest cryptographic +acceleration and offloading hardware. It combines functions previously +implemented in separate modules to create a modular and scalable acceleration +and assurance engine. It also implements block encryption algorithms, stream +cipher algorithms, hashing algorithms, public key algorithms, run-time +integrity checking, and a hardware random number generator. SEC performs +higher-level cryptographic operations than previous NXP cryptographic +accelerators. This provides significant improvement to system level performance. + +SEC HW accelerator above 4.x+ version are also known as CAAM. + +caam_jr PMD is one of DPAA drivers which uses uio interface to interact with +Linux kernel for configure and destroy the device instance (ring). + + +Implementation +-------------- + +SEC provides platform assurance by working with SecMon, which is a companion +logic block that tracks the security state of the SOC. SEC is programmed by +means of descriptors (not to be confused with frame descriptors (FDs)) that +indicate the operations to be performed and link to the message and +associated data. SEC incorporates two DMA engines to fetch the descriptors, +read the message data, and write the results of the operations. The DMA +engine provides a scatter/gather capability so that SEC can read and write +data scattered in memory. SEC may be configured by means of software for +dynamic changes in byte ordering. The default configuration for this version +of SEC is little-endian mode. + +Note that one physical Job Ring represent one caam_jr device. + +Features +-------- + +The CAAM_JR PMD has support for: + +Cipher algorithms: + +* ``RTE_CRYPTO_CIPHER_3DES_CBC`` +* ``RTE_CRYPTO_CIPHER_AES128_CBC`` +* ``RTE_CRYPTO_CIPHER_AES192_CBC`` +* ``RTE_CRYPTO_CIPHER_AES256_CBC`` +* ``RTE_CRYPTO_CIPHER_AES128_CTR`` +* ``RTE_CRYPTO_CIPHER_AES192_CTR`` +* ``RTE_CRYPTO_CIPHER_AES256_CTR`` + +Hash algorithms: + +* ``RTE_CRYPTO_AUTH_SHA1_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA224_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA256_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA384_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA512_HMAC`` +* ``RTE_CRYPTO_AUTH_MD5_HMAC`` + +AEAD algorithms: + +* ``RTE_CRYPTO_AEAD_AES_GCM`` + +Supported DPAA SoCs +-------------------- + +* LS1046A/LS1026A +* LS1043A/LS1023A +* LS1028A +* LS1012A + +Limitations +----------- + +* Hash followed by Cipher mode is not supported +* Only supports the session-oriented API implementation (session-less APIs are not supported). + +Prerequisites +------------- + +caam_jr driver has following dependencies are not part of DPDK and must be installed separately: + +* **NXP Linux SDK** + + NXP Linux software development kit (SDK) includes support for the family + of QorIQ® ARM-Architecture-based system on chip (SoC) processors + and corresponding boards. + + It includes the Linux board support packages (BSPs) for NXP SoCs, + a fully operational tool chain, kernel and board specific modules. + + SDK and related information can be obtained from: `NXP QorIQ SDK `_. + +Currently supported by DPDK: + +* NXP SDK **18.09+**. +* Supported architectures: **arm64 LE**. + +* Follow the DPDK :ref:`Getting Started Guide for Linux ` to setup the basic DPDK environment. + +Pre-Installation Configuration +------------------------------ + +Config File Options +~~~~~~~~~~~~~~~~~~~ + +The following options can be modified in the ``config`` file +to enable caam_jr PMD. + +Please note that enabling debugging options may affect system performance. + +* ``CONFIG_RTE_LIBRTE_PMD_CAAM_JR`` (default ``n``) + By default it is only enabled in common_linuxapp config. + Toggle compilation of the ``librte_pmd_caam_jr`` driver. + +* ``CONFIG_RTE_LIBRTE_PMD_CAAM_JR_BE`` (default ``n``) + By default it is disabled. + It can be used when the underlying hardware supports the CAAM in BE mode. + e.g. LS1043A, LS1046A supports CAAM in BE mode. + BE mode is enabled by default in defconfig-arm64-dpaa-linuxapp-gcc. + +Installations +------------- +To compile the caam_jr PMD for Linux arm64 gcc target, run the +following ``make`` command: + +.. code-block:: console + + cd + make config T=arm64-armv8a-linuxapp-gcc install + +Enabling logs +------------- + +For enabling logs, use the following EAL parameter: + +.. code-block:: console + + ./your_crypto_application --log-level=pmd.crypto.caam, diff --git a/doc/guides/cryptodevs/features/caam_jr.ini b/doc/guides/cryptodevs/features/caam_jr.ini new file mode 100644 index 000000000..68f8d8195 --- /dev/null +++ b/doc/guides/cryptodevs/features/caam_jr.ini @@ -0,0 +1,46 @@ +; +; Supported features of the 'caam_jr' crypto driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Symmetric crypto = Y +Sym operation chaining = Y +HW Accelerated = Y +Protocol offload = Y +In Place SGL = Y +OOP SGL In SGL Out = Y +OOP SGL In LB Out = Y +OOP LB In SGL Out = Y +OOP LB In LB Out = Y + +; +; Supported crypto algorithms of the 'dpaa2_sec' crypto driver. +; +[Cipher] +AES CBC (128) = Y +AES CBC (192) = Y +AES CBC (256) = Y +AES CTR (128) = Y +AES CTR (192) = Y +AES CTR (256) = Y +3DES CBC = Y + +; +; Supported authentication algorithms of the 'dpaa2_sec' crypto driver. +; +[Auth] +MD5 HMAC = Y +SHA1 HMAC = Y +SHA224 HMAC = Y +SHA256 HMAC = Y +SHA384 HMAC = Y +SHA512 HMAC = Y + +; +; Supported AEAD algorithms of the 'dpaa2_sec' crypto driver. +; +[AEAD] +AES GCM (128) = Y +AES GCM (192) = Y +AES GCM (256) = Y diff --git a/doc/guides/cryptodevs/index.rst b/doc/guides/cryptodevs/index.rst index bd1588537..83610e64f 100644 --- a/doc/guides/cryptodevs/index.rst +++ b/doc/guides/cryptodevs/index.rst @@ -13,6 +13,7 @@ Crypto Device Drivers aesni_mb aesni_gcm armv8 + caam_jr ccp dpaa2_sec dpaa_sec diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst index a0dd1bed9..af9a6f89f 100644 --- a/doc/guides/rel_notes/release_18_11.rst +++ b/doc/guides/rel_notes/release_18_11.rst @@ -186,6 +186,11 @@ New Features The AESNI MB PMD has been updated with additional support for AES-GCM algorithm support. +* **Added NXP CAAM JR PMD.** + + Added the new caam job ring driver for NXP platforms. See the + "NXP CAAM JOB RING (caam_jr)" document for more details on this new driver. + API Changes -----------