1a9263e3cSJerin Jacob.. SPDX-License-Identifier: BSD-3-Clause 2a9263e3cSJerin Jacob Copyright(c) 2017 Cavium, Inc 354c7fdbaSZbigniew Bodek 454c7fdbaSZbigniew BodekARMv8 Crypto Poll Mode Driver 554c7fdbaSZbigniew Bodek============================= 654c7fdbaSZbigniew Bodek 754c7fdbaSZbigniew BodekThis code provides the initial implementation of the ARMv8 crypto PMD. 854c7fdbaSZbigniew BodekThe driver uses ARMv8 cryptographic extensions to process chained crypto 954c7fdbaSZbigniew Bodekoperations in an optimized way. The core functionality is provided by 1054c7fdbaSZbigniew Bodeka low-level library, written in the assembly code. 1154c7fdbaSZbigniew Bodek 1254c7fdbaSZbigniew BodekFeatures 1354c7fdbaSZbigniew Bodek-------- 1454c7fdbaSZbigniew Bodek 1554c7fdbaSZbigniew BodekARMv8 Crypto PMD has support for the following algorithm pairs: 1654c7fdbaSZbigniew Bodek 1754c7fdbaSZbigniew BodekSupported cipher algorithms: 1854c7fdbaSZbigniew Bodek 1954c7fdbaSZbigniew Bodek* ``RTE_CRYPTO_CIPHER_AES_CBC`` 2054c7fdbaSZbigniew Bodek 2154c7fdbaSZbigniew BodekSupported authentication algorithms: 2254c7fdbaSZbigniew Bodek 2354c7fdbaSZbigniew Bodek* ``RTE_CRYPTO_AUTH_SHA1_HMAC`` 2454c7fdbaSZbigniew Bodek* ``RTE_CRYPTO_AUTH_SHA256_HMAC`` 2554c7fdbaSZbigniew Bodek 2654c7fdbaSZbigniew BodekInstallation 2754c7fdbaSZbigniew Bodek------------ 2854c7fdbaSZbigniew Bodek 2950ee0c2dSRuifeng WangTo build DPDK with this virtual crypto PMD, the user is required to: 3054c7fdbaSZbigniew Bodek 31bde43e8aSRuifeng Wang* Download AArch64 crypto library source code from 3250ee0c2dSRuifeng Wang `here <https://github.com/ARM-software/AArch64cryptolib>`_. 3354c7fdbaSZbigniew Bodek 3450ee0c2dSRuifeng Wang* Build the ``AArch64cryptolib`` library: 3554c7fdbaSZbigniew Bodek 3654c7fdbaSZbigniew Bodek.. code-block:: console 3754c7fdbaSZbigniew Bodek 3850ee0c2dSRuifeng Wang make 3950ee0c2dSRuifeng Wang 4040892ddbSDharmik Thakkar* Add path to `libAArch64crypto.pc` in `PKG_CONFIG_PATH` environment variable: 4150ee0c2dSRuifeng Wang 4250ee0c2dSRuifeng Wang.. code-block:: console 4350ee0c2dSRuifeng Wang 4440892ddbSDharmik Thakkar export PKG_CONFIG_PATH=<path_to_AArch64cryptolib>/pkgconfig/:$PKG_CONFIG_PATH 4540892ddbSDharmik Thakkar 4640892ddbSDharmik Thakkar* Build DPDK: 4740892ddbSDharmik Thakkar 4840892ddbSDharmik Thakkar.. code-block:: console 4940892ddbSDharmik Thakkar 50*e24b8ad4SStephen Hemminger meson setup build 5150ee0c2dSRuifeng Wang ninja -C build 5254c7fdbaSZbigniew Bodek 5354c7fdbaSZbigniew BodekThe corresponding device can be created only if the following features 5454c7fdbaSZbigniew Bodekare supported by the CPU: 5554c7fdbaSZbigniew Bodek 5654c7fdbaSZbigniew Bodek* ``RTE_CPUFLAG_AES`` 5754c7fdbaSZbigniew Bodek* ``RTE_CPUFLAG_SHA1`` 5854c7fdbaSZbigniew Bodek* ``RTE_CPUFLAG_SHA2`` 5954c7fdbaSZbigniew Bodek* ``RTE_CPUFLAG_NEON`` 6054c7fdbaSZbigniew Bodek 6154c7fdbaSZbigniew BodekInitialization 6254c7fdbaSZbigniew Bodek-------------- 6354c7fdbaSZbigniew Bodek 6450ee0c2dSRuifeng WangUse ``--vdev "crypto_armv8"`` in the EAL options to create virtual crypto device. 6550ee0c2dSRuifeng Wang 6654c7fdbaSZbigniew BodekUser can use app/test application to check how to use this PMD and to verify 6754c7fdbaSZbigniew Bodekcrypto processing. 6854c7fdbaSZbigniew Bodek 6954c7fdbaSZbigniew BodekTest name is cryptodev_sw_armv8_autotest. 7054c7fdbaSZbigniew Bodek 7154c7fdbaSZbigniew BodekLimitations 7254c7fdbaSZbigniew Bodek----------- 7354c7fdbaSZbigniew Bodek 7454c7fdbaSZbigniew Bodek* Maximum number of sessions is 2048. 7554c7fdbaSZbigniew Bodek* Only chained operations are supported. 7654c7fdbaSZbigniew Bodek* AES-128-CBC is the only supported cipher variant. 7754c7fdbaSZbigniew Bodek* Cipher input data has to be a multiple of 16 bytes. 7854c7fdbaSZbigniew Bodek* Digest input data has to be a multiple of 8 bytes. 79