From patchwork Fri Mar 3 19:49:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 21324 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 21B5FF975; Fri, 3 Mar 2017 15:24:39 +0100 (CET) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0040.outbound.protection.outlook.com [104.47.38.40]) by dpdk.org (Postfix) with ESMTP id 96678F928 for ; Fri, 3 Mar 2017 15:24:20 +0100 (CET) Received: from CY1PR03CA0002.namprd03.prod.outlook.com (10.174.128.12) by CY4PR03MB2950.namprd03.prod.outlook.com (10.175.116.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 14:24:19 +0000 Received: from BN1BFFO11FD046.protection.gbl (2a01:111:f400:7c10::1:159) by CY1PR03CA0002.outlook.office365.com (2603:10b6:600::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12 via Frontend Transport; Fri, 3 Mar 2017 14:24:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD046.mail.protection.outlook.com (10.58.145.1) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.933.11 via Frontend Transport; Fri, 3 Mar 2017 14:24:19 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v23ENi6c000351; Fri, 3 Mar 2017 07:24:15 -0700 From: Akhil Goyal To: CC: , , , , , , Akhil Goyal Date: Sat, 4 Mar 2017 01:19:32 +0530 Message-ID: <20170303194935.30831-10-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170303194935.30831-1-akhil.goyal@nxp.com> References: <20170303193648.30665-1-akhil.goyal@nxp.com> <20170303194935.30831-1-akhil.goyal@nxp.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131330246592519030; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39410400002)(39400400002)(39840400002)(39380400002)(39860400002)(39850400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(86362001)(110136004)(2351001)(6916009)(2950100002)(6306002)(4326008)(33646002)(36756003)(54906002)(189998001)(106466001)(38730400002)(8936002)(5660300001)(50226002)(81166006)(305945005)(23676002)(8676002)(85426001)(5820100001)(626004)(47776003)(356003)(76176999)(53936002)(77096006)(50986999)(104016004)(6666003)(50466002)(8656002)(92566002)(2906002)(1076002)(105606002)(2870700001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2950; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD046; 1:BOUI3BC6f4HpUAPUxHLAuoVPbi5E33Oh6gt/N2rKnSzQI+5G28xTLLLDYFvjTSc/VQRbgX5qavQtZp+/1maGF+b74euqK11nDPqv+1zqojPzFqcvcdWTSruNJn6ywJIZHK12m/pyvsst2tWBkJCWSlHkiq2nBloJfgI/ZJPPn0bLbQRfxK98fnzgH6IVKCktxi7YWsB0XbHY5wPh6ITW2lNI45RN/XM9XnYUBS3RYWvbi3k9v7NIM33iEqGNtIFLOy2KLXSgOqrlGT9NDeQDmYe2zlVijWWG1CEq69yucOcvs5eQGiThIrgq9oGKiJy5BJJaXpNaUm2r1y7uyPZngAR1/3BZpHHbPem6M8GsydfLZQepqQ9onEYbc76ss59QPp2b7eFkMpyqpJFxSuIGbURvVp+aQqwpUyTpw1RwxJaWFNbk+qOBE9CEv0yx6H32Ww3XDDB1SWf9vRyFotnlplkjrz2/IfMYYpftuaP8T73CS8HkpseGkgoKlwqx4OgbP/KN93IwkkVIO7LpXq5RurBy9iwq10V2kltZQ1s1x4uJFANzP5+q/wANbeE+kl+j4+UhoZojEyJ5vvlEcl0ahV/TyhpHxtAggHOgCZ17NpV5Fh6KeDg2qQRLl+7zkzOt49oH6xkPQ+9/CjHsswnNTNoaF8aSUhdTv9XcNVqz4R0/b3sE6dgSFSqXtcCDsdIcFG861DdeQ+GxiCItGikXx10SrOvXww9MiLdWKn+9tOu4TZjTB9t1VKkcg5xpgBtq X-MS-Office365-Filtering-Correlation-Id: d52bd51c-a5db-41bf-fa17-08d46240fadd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY4PR03MB2950; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 3:8pMLztmim6Yw6qfQ3mV4M3fsF7IkdmA/IZ1jtb6nYmNI1dufuhQTJ6g5plp6hFbczl1q0mVKaUiynt8HFQhOdMPaeO6/tpHoFw1d5DGJcM7Al4t194UM7OKMbfdbgQAnfrdfjW6jrCFXSfiwi8QJuYqkQ4b/c+RQNHxFMarLOaJziblwMQDTXhRkAbOM5a9KxNNdXyjwpDvAJwi13bh+V19/ShajCm8zsRfMwUCwPMGWmh7Ifwrp6ZnLxLbzYG7J0W70G3+j+rDPus0Zgpx+REvkpuvemoJoZSWNs+eiC2LUIPBIGG0iX0FI8fMdHUs6ZiPOrHlVrSVfTTWbfv+mpiFv1e4buLLv2U/VGO98tqoCHQ9iMXBgixesmLrqhiu3; 25:eJqCHSaOiOvmnnsbSTOoYaxCbJPs1LcrM+rcxWo96vDWcVOLZsgl/utXzQ76RO5mLuVmsVl6dQJBChRcAlYcUNL8WoZU7aEKdlAYif83Rd3IgnR2m7cfhKCVsYw6J1s1fzA0eyUX4GMBcqPm2RJUP5Q6qWFU+vXHamh64nLC7g4byYN2sSe11TmyQhxCur4DQ6VZ49v983Y5nYzxYC/1xlgf14irO3lfVd3g4LFCYkt7JGjbLgKrNlDiLw+i3f/O8QZfqou5HVJt68JK0PrF6CfkMQSe2gibzhyWhG55CEtcHHpH6IH4TCafm/n7o4DExr9mq5uHcGL7ZCOmwCRcRoVgq91KB3zCeJ33bfp1hggorrQCYjqKEhMXmiCh+qGw5CgqgYn6amp/nTLf+hELX8khCOrAGfxByKqWrsyw78wlZgx1IcWPvvqCVO20kaH+wOS6uoROLQBZYsrArnI8xA== X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 31:5EICarGAHRfVhztYnEcQ7PGi638wuf4IzmQ2oXzIfcRbGfOvNvG/KHqiZhMIFRCGHYTHKQr1jSlYSYUSJco+DDzGffIay5wMQ1kmb/lmAxzduokS2ISJw6sNzftYWlI4e+LfPlGlxUly7SuJqvW/t/6RGmNvOC5sxabwdbCUiDrSTDHL5ibWv8mkK+B6kAk9w9cnXec7BQim/j7tyfQalV12MuZJHmj7lhnX0TbjwAa2zIhNixG2O4rjRViCYq9SDsWndFvjzthE1e6fERO8NQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(192374486261705)(185117386973197)(227817650892897)(21532816269658)(264314650089876); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13017025)(13015025)(13024025)(13018025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(20161123559025)(20161123556025)(20161123565025); SRVR:CY4PR03MB2950; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2950; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 4:tEgWuBVG+/m5YQqRd62UmNMBcyEpfmeF8V5hG7vVigLDnIdeMWeWmYXX6ud7WWnRJ3EuqoOaaY3gr0MK1qgk47CsI5kzwX7wrRIQ2phHaoCEdBvsXGwXULVQNSrKyTanbTFBQXnMf37iEyN77CAtKr3WS3cS352z6HG55A4iCe2+XOdkaPpJk8cmYpu5c8uTfaGW4MRvHUTUBFQqg3jhzPzIP6txF2zU7E7DHrq7nYTHida1EfM/nr6ki2s32y539iAdYHWLYpE8ic91eSw/jRrmMtqxWXe38WasKTm4uHuUtui0E5YXmR1yi3+9yjbWIz3QcIjDWoMxPZSxjUswvx0+NcyWSz8YLkBnZVmtEIp/5qHgnwbFdQbsVy9PtfgqxZl2iw5M8RCcW0sS3HiehwuMd0AsFHZes1C6ly8H8I/K89qPz0/qi86jQa5YsX8lUZj/SsKb6kPBcDKMP3SBJ8ljcwnxxSYlawag64212fEpNfyu2CvHenWGxhM40fxqhIZwNJr0NktACz/uevM4X2ekmBJErkX6ILdW2SOQgMx61M9BwrqvA18wVhLay+faCITt9mcLUI06Rd5j99rSXMi0je07SP+4Fd8w5ytxpQgVDoJIZc73Mnedn0XHEx576KAFxpdSqHmreiFE/KDLpbKj1KGjIesT2ICtzSVLQ4OdDDNF2X1eICQtHlfaPmFad074fFg5kFh9pGvTl/ue1Dxg1hym5t5Wc0zKP1gX2jI9QcpvVAvWzJGKA+3vp4BqzKlQyxQqmJcVNYv5BVAQp+pAf+AHWjLxZeLNdkcNrAOnUvkK9a4zNbAShiW4icudmoN2uoQKpe+fhT5hvVB6Uf2efak9R8LeLJ4QXC2LqvtQtnBcZUXyESdTuDiOqVgKbMgq7IpOcetGr0fOt4R4k3EBnagf4rgxYcSN2a2M3o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1e2BfQc9ZF/KiLUauiZI=; 5:KwZfRvr+Y0178JdseUWdD4fb7B2PFO9fiQeCDv5Pp8Wke+rGNIroJxwa/hNaJBVnzbVzX9GEIgDPjxz61ZGZtYyqqyFkYUwIWPaS/1t3lBG96iTXJ3EADuckcuD9rbUMLKWR3aub+H0D2yU0xiyvr/yUM6sr/Plm14jOgwl9aNfBAI3/DqlcP4Lzf0zFlUiZ; 24:HRFVAJVL0+h3wAFabthys1gHXjJp5oa9bN3YMKKd22hHy189Z6kufFMwbQvtQeoxbMgYQDDuZZ41mM6dZlZ/noZpkJhg8rUn5yuuos6zsMQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 7:071C/vVGmTYKDjDwYK6/ELoEdNC0TslkoLJsGD0TjN6WSMmvrUgPyjDeK7P99PYLuyig6ZrVTX+2rt51D/7iqk/y3ds8KBALYZWFtvlnL5sUeEPWr2uQI7vN69isSDtk+1KGUxz1FbRWIOn1JpPqS5HpHhQ633sWIraZogv6ZgzD87dsNtMEravKiLj6b2WIDK9nCb4HbWYOwziyY6Ewp8TlAOyArPH+eWMz3N6BQRaXuG+8of5odGZMvu1evRYSP9H1QwV9G9xTOMuq+0P2C7tRPkH44T2vhw5VvFdgXd5ioGwnxcsLAD1obTfGRJyXhKCTCErc6xdlToH+DN9Lhw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 14:24:19.0491 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2950 Subject: [dpdk-dev] [PATCH v5 09/12] doc: add NXP dpaa2 sec in cryptodev 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" Signed-off-by: Akhil Goyal Reviewed-by: Hemant Agrawal --- doc/guides/cryptodevs/dpaa2_sec.rst | 232 ++++++++++++++++++++++++++++++++++++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/cryptodevs/overview.rst | 95 +++++++-------- 3 files changed, 281 insertions(+), 47 deletions(-) create mode 100644 doc/guides/cryptodevs/dpaa2_sec.rst diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst new file mode 100644 index 0000000..c846aa9 --- /dev/null +++ b/doc/guides/cryptodevs/dpaa2_sec.rst @@ -0,0 +1,232 @@ +.. BSD LICENSE + Copyright(c) 2016 NXP. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name of NXP nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +NXP(R) DPAA2 CAAM Accelerator Based (DPAA2_SEC) Crypto Poll Mode Driver +======================================================================= + +The DPAA2_SEC PMD provides poll mode crypto driver support for NXP DPAA2 CAAM +hardware accelerator. + +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. + +DPAA2_SEC is one of the hardware resource in DPAA2 Architecture. More information +on DPAA2 Architecture is described in docs/guides/nics/dpaa2.rst + +DPAA2_SEC PMD is one of DPAA2 drivers which interacts with Management Complex (MC) +portal to access the hardware object - DPSECI. The MC provides access to create, +discover, connect, configure and destroy dpseci object in DPAA2_SEC PMD. + +DPAA2_SEC PMD also uses some of the other hardware resources like buffer pools, +queues, queue portals to store and to enqueue/dequeue data to the hardware SEC. + +DPSECI objects are detected by PMD using a resource container called DPRC(like in +docs/guides/nics/dpaa2.rst). + +For example: + +.. code-block:: console + + DPRC.1 (bus) + | + +--+--------+-------+-------+-------+---------+ + | | | | | | + DPMCP.1 DPIO.1 DPBP.1 DPNI.1 DPMAC.1 DPSECI.1 + DPMCP.2 DPIO.2 DPNI.2 DPMAC.2 DPSECI.2 + DPMCP.3 + +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. + +A block diagram similar to dpaa2 NIC is shown below to show where DPAA2_SEC +fits in the DPAA2 Bus model + +.. code-block:: console + + + +----------------+ + | DPDK DPAA2_SEC | + | PMD | + +----------------+ +------------+ + | MC SEC object |.......| Mempool | + . . . . . . . . . | (DPSECI) | | (DPBP) | + . +---+---+--------+ +-----+------+ + . ^ | . + . | | . + . | | . + . +---+---V----+ . + . . . . . . . . . . .| DPIO driver| . + . . | (DPIO) | . + . . +-----+------+ . + . . | QBMAN | . + . . | Driver | . + +----+------+-------+ +-----+----- | . + | dpaa2 bus | | . + | VFIO fslmc-bus |....................|......................... + | | | + | /bus/fslmc | | + +-------------------+ | + | + ========================== HARDWARE =====|======================= + DPIO + | + DPSECI---DPBP + =========================================|======================== + + + +Features +-------- + +The DPAA2 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`` + +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`` + +Supported DPAA2 SoCs +-------------------- + +- LS2080A/LS2040A +- LS2084A/LS2044A +- LS2088A/LS2048A +- LS1088A/LS1048A + +Limitations +----------- + +* Chained mbufs are not supported. +* Hash followed by Cipher mode is not supported +* Only supports the session-oriented API implementation (session-less APIs are not supported). + +Prerequisites +------------- + +DPAA2_SEC driver has similar pre-requisites as listed in dpaa2 pmd(docs/guides/nics/dpaa2.rst). +The following dependencies are not part of DPDK and must be installed separately: + +- **NXP Linux SDK** + + NXP Linux software development kit (SDK) includes support for 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 `_. + +- **DPDK Helper Scripts** + + DPAA2 based resources can be configured easily with the help of ready scripts + as provided in the DPDK helper repository. + + `DPDK Helper Scripts `_. + +Currently supported by DPDK: + +- NXP SDK **2.0+**. +- MC Firmware version **10.0.0** and higher. +- 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 +~~~~~~~~~~~~~~~~~~~ + +Basic DPAA2 config file options are described in doc/guides/nics/dpaa2.rst. +In Additiont to those following options can be modified in the ``config`` file +to enable DPAA2_SEC PMD. + +Please note that enabling debugging options may affect system performance. + +- ``CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC`` (default ``n``) + By default it is only enabled in defconfig_arm64-dpaa2-* config. + Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver. + +- ``CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT`` (default ``n``) + Toggle display of initialization related driver messages + +- ``CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER`` (default ``n``) + Toggle display of driver runtime messages + +- ``CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX`` (default ``n``) + Toggle display of receive fast path run-time message + +- ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS`` + By default it is set as 2048 in defconfig_arm64-dpaa2-* config. + It indicates Number of sessions to create in the session memory pool + on a single DPAA2 SEC device. + +Installations +------------- +To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the +following ``make`` command: + +.. code-block:: console + + cd + make config T=arm64-dpaa2-linuxapp-gcc install diff --git a/doc/guides/cryptodevs/index.rst b/doc/guides/cryptodevs/index.rst index 0b50600..361b82d 100644 --- a/doc/guides/cryptodevs/index.rst +++ b/doc/guides/cryptodevs/index.rst @@ -39,6 +39,7 @@ Crypto Device Drivers aesni_mb aesni_gcm armv8 + dpaa2_sec kasumi openssl null diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst index 4bbfadb..6cf7699 100644 --- a/doc/guides/cryptodevs/overview.rst +++ b/doc/guides/cryptodevs/overview.rst @@ -33,70 +33,71 @@ Crypto Device Supported Functionality Matrices Supported Feature Flags .. csv-table:: - :header: "Feature Flags", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8" + :header: "Feature Flags", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8", "dpaa2_sec" :stub-columns: 1 - "RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO",x,x,x,x,x,x,x,x - "RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO",,,,,,,, - "RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING",x,x,x,x,x,x,x,x - "RTE_CRYPTODEV_FF_CPU_SSE",,,x,,x,x,, - "RTE_CRYPTODEV_FF_CPU_AVX",,,x,,x,x,, - "RTE_CRYPTODEV_FF_CPU_AVX2",,,x,,,,, - "RTE_CRYPTODEV_FF_CPU_AVX512",,,x,,,,, - "RTE_CRYPTODEV_FF_CPU_AESNI",,,x,x,,,, - "RTE_CRYPTODEV_FF_HW_ACCELERATED",x,,,,,,, - "RTE_CRYPTODEV_FF_CPU_NEON",,,,,,,,x - "RTE_CRYPTODEV_FF_CPU_ARM_CE",,,,,,,,x + "RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO",x,x,x,x,x,x,x,x,x + "RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO",,,,,,,,, + "RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING",x,x,x,x,x,x,x,x,x + "RTE_CRYPTODEV_FF_CPU_SSE",,,x,,x,x,,, + "RTE_CRYPTODEV_FF_CPU_AVX",,,x,,x,x,,, + "RTE_CRYPTODEV_FF_CPU_AVX2",,,x,,,,,, + "RTE_CRYPTODEV_FF_CPU_AVX512",,,x,,,,,, + "RTE_CRYPTODEV_FF_CPU_AESNI",,,x,x,,,,, + "RTE_CRYPTODEV_FF_HW_ACCELERATED",x,,,,,,,,x + "RTE_CRYPTODEV_FF_CPU_NEON",,,,,,,,x, + "RTE_CRYPTODEV_FF_CPU_ARM_CE",,,,,,,,x, Supported Cipher Algorithms .. csv-table:: - :header: "Cipher Algorithms", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8" + :header: "Cipher Algorithms", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8", "dpaa2_sec" :stub-columns: 1 - "NULL",,x,,,,,, - "AES_CBC_128",x,,x,,,,,x - "AES_CBC_192",x,,x,,,,, - "AES_CBC_256",x,,x,,,,, - "AES_CTR_128",x,,x,,,,, - "AES_CTR_192",x,,x,,,,, - "AES_CTR_256",x,,x,,,,, - "DES_CBC",x,,,,,,, - "SNOW3G_UEA2",x,,,,x,,, - "KASUMI_F8",,,,,,x,, - "ZUC_EEA3",,,,,,,x, + "NULL",,x,,,,,,, + "AES_CBC_128",x,,x,,,,,x,x + "AES_CBC_192",x,,x,,,,,, + "AES_CBC_256",x,,x,,,,,, + "AES_CTR_128",x,,x,,,,,, + "AES_CTR_192",x,,x,,,,,, + "AES_CTR_256",x,,x,,,,,, + "DES_CBC",x,,,,,,,, + "SNOW3G_UEA2",x,,,,x,,,, + "KASUMI_F8",,,,,,x,,, + "ZUC_EEA3",,,,,,,x,, + "3DES_CBC",,,,,,,,,x Supported Authentication Algorithms .. csv-table:: - :header: "Cipher Algorithms", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8" + :header: "Cipher Algorithms", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8", "dpaa2_sec" :stub-columns: 1 - "NONE",,x,,,,,, - "MD5",,,,,,,, - "MD5_HMAC",,,x,,,,, - "SHA1",,,,,,,, - "SHA1_HMAC",x,,x,,,,,x - "SHA224",,,,,,,, - "SHA224_HMAC",,,x,,,,, - "SHA256",,,,,,,, - "SHA256_HMAC",x,,x,,,,,x - "SHA384",,,,,,,, - "SHA384_HMAC",,,x,,,,, - "SHA512",,,,,,,, - "SHA512_HMAC",x,,x,,,,, - "AES_XCBC",x,,x,,,,, - "AES_GMAC",,,,x,,,, - "SNOW3G_UIA2",x,,,,x,,, - "KASUMI_F9",,,,,,x,, - "ZUC_EIA3",,,,,,,x, + "NONE",,x,,,,,,, + "MD5",,,,,,,,, + "MD5_HMAC",,,x,,,,,,x + "SHA1",,,,,,,,, + "SHA1_HMAC",x,,x,,,,,x,x + "SHA224",,,,,,,,, + "SHA224_HMAC",,,x,,,,,,x + "SHA256",,,,,,,,, + "SHA256_HMAC",x,,x,,,,,x,x + "SHA384",,,,,,,,, + "SHA384_HMAC",,,x,,,,,,x + "SHA512",,,,,,,,, + "SHA512_HMAC",x,,x,,,,,,x + "AES_XCBC",x,,x,,,,,, + "AES_GMAC",,,,x,,,,, + "SNOW3G_UIA2",x,,,,x,,,, + "KASUMI_F9",,,,,,x,,, + "ZUC_EIA3",,,,,,,x,, Supported AEAD Algorithms .. csv-table:: - :header: "AEAD Algorithms", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8" + :header: "AEAD Algorithms", "qat", "null", "aesni_mb", "aesni_gcm", "snow3g", "kasumi", "zuc", "armv8", "dpaa2_sec" :stub-columns: 1 - "AES_GCM_128",x,,,x,,,, - "AES_GCM_192",x,,,,,,, - "AES_GCM_256",x,,,x,,,, + "AES_GCM_128",x,,,x,,,,, + "AES_GCM_192",x,,,,,,,, + "AES_GCM_256",x,,,x,,,,,