xref: /dpdk/doc/guides/cryptodevs/armv8.rst (revision 54c7fdba7c9af89c83a0573976c544ad6be0a82d)
1..  BSD LICENSE
2    Copyright (C) Cavium networks Ltd. 2017.
3
4    Redistribution and use in source and binary forms, with or without
5    modification, are permitted provided that the following conditions
6    are met:
7
8      * Redistributions of source code must retain the above copyright
9        notice, this list of conditions and the following disclaimer.
10      * Redistributions in binary form must reproduce the above copyright
11        notice, this list of conditions and the following disclaimer in
12        the documentation and/or other materials provided with the
13        distribution.
14      * Neither the name of Cavium networks nor the names of its
15        contributors may be used to endorse or promote products derived
16        from this software without specific prior written permission.
17
18    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30
31ARMv8 Crypto Poll Mode Driver
32=============================
33
34This code provides the initial implementation of the ARMv8 crypto PMD.
35The driver uses ARMv8 cryptographic extensions to process chained crypto
36operations in an optimized way. The core functionality is provided by
37a low-level library, written in the assembly code.
38
39Features
40--------
41
42ARMv8 Crypto PMD has support for the following algorithm pairs:
43
44Supported cipher algorithms:
45
46* ``RTE_CRYPTO_CIPHER_AES_CBC``
47
48Supported authentication algorithms:
49
50* ``RTE_CRYPTO_AUTH_SHA1_HMAC``
51* ``RTE_CRYPTO_AUTH_SHA256_HMAC``
52
53Installation
54------------
55
56In order to enable this virtual crypto PMD, user must:
57
58* Download ARMv8 crypto library source code from
59  `here <https://github.com/caviumnetworks/armv8_crypto>`_
60
61* Export the environmental variable ARMV8_CRYPTO_LIB_PATH with
62  the path where the ``armv8_crypto`` library was downloaded
63  or cloned.
64
65* Build the library by invoking:
66
67.. code-block:: console
68
69	make -C $ARMV8_CRYPTO_LIB_PATH/
70
71* Set CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=y in
72  config/defconfig_arm64-armv8a-linuxapp-gcc
73
74The corresponding device can be created only if the following features
75are supported by the CPU:
76
77* ``RTE_CPUFLAG_AES``
78* ``RTE_CPUFLAG_SHA1``
79* ``RTE_CPUFLAG_SHA2``
80* ``RTE_CPUFLAG_NEON``
81
82Initialization
83--------------
84
85User can use app/test application to check how to use this PMD and to verify
86crypto processing.
87
88Test name is cryptodev_sw_armv8_autotest.
89For performance test cryptodev_sw_armv8_perftest can be used.
90
91Limitations
92-----------
93
94* Maximum number of sessions is 2048.
95* Only chained operations are supported.
96* AES-128-CBC is the only supported cipher variant.
97* Cipher input data has to be a multiple of 16 bytes.
98* Digest input data has to be a multiple of 8 bytes.
99