xref: /dpdk/doc/guides/cryptodevs/bcmfs.rst (revision 8809f78c7dd9f33a44a4f89c58fc91ded34296ed)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright(C) 2020 Broadcom
3
4Broadcom FlexSparc Crypto Poll Mode Driver
5==========================================
6
7The FlexSparc crypto poll mode driver (BCMFS PMD) provides support for offloading
8cryptographic operations to the Broadcom SoCs having FlexSparc4/FlexSparc5 unit.
9Detailed information about SoCs can be found at `Broadcom Official Website
10<https://www.broadcom.com/products/ethernet-connectivity/network-adapters/smartnic>`__.
11
12Supported Broadcom SoCs
13-----------------------
14
15* Stingray
16* Stingray2
17
18Features
19--------
20
21The BCMFS SYM PMD has support for:
22
23Cipher algorithms:
24
25* ``RTE_CRYPTO_CIPHER_3DES_CBC``
26* ``RTE_CRYPTO_CIPHER_3DES_CTR``
27* ``RTE_CRYPTO_CIPHER_AES128_CBC``
28* ``RTE_CRYPTO_CIPHER_AES192_CBC``
29* ``RTE_CRYPTO_CIPHER_AES256_CBC``
30* ``RTE_CRYPTO_CIPHER_AES128_CTR``
31* ``RTE_CRYPTO_CIPHER_AES192_CTR``
32* ``RTE_CRYPTO_CIPHER_AES256_CTR``
33* ``RTE_CRYPTO_CIPHER_AES_XTS``
34* ``RTE_CRYPTO_CIPHER_DES_CBC``
35
36Hash algorithms:
37
38* ``RTE_CRYPTO_AUTH_SHA1``
39* ``RTE_CRYPTO_AUTH_SHA1_HMAC``
40* ``RTE_CRYPTO_AUTH_SHA224``
41* ``RTE_CRYPTO_AUTH_SHA224_HMAC``
42* ``RTE_CRYPTO_AUTH_SHA256``
43* ``RTE_CRYPTO_AUTH_SHA256_HMAC``
44* ``RTE_CRYPTO_AUTH_SHA384``
45* ``RTE_CRYPTO_AUTH_SHA384_HMAC``
46* ``RTE_CRYPTO_AUTH_SHA512``
47* ``RTE_CRYPTO_AUTH_SHA512_HMAC``
48* ``RTE_CRYPTO_AUTH_AES_XCBC_MAC``
49* ``RTE_CRYPTO_AUTH_AES_CBC_MAC``
50* ``RTE_CRYPTO_AUTH_MD5_HMAC``
51* ``RTE_CRYPTO_AUTH_AES_GMAC``
52* ``RTE_CRYPTO_AUTH_AES_CMAC``
53
54Supported AEAD algorithms:
55
56* ``RTE_CRYPTO_AEAD_AES_GCM``
57* ``RTE_CRYPTO_AEAD_AES_CCM``
58
59Installation
60------------
61Information about kernel, rootfs and toolchain can be found at
62`Broadcom Official Website <https://www.broadcom.com/products/ethernet-connectivity
63/network-adapters/smartnic/stingray-software>`__.
64
65    .. Note::
66        To execute BCMFS PMD, it must be compiled with VFIO_PRESENT flag on the
67        compiling platform and same gets enabled in rte_vfio.h.
68
69The BCMFS crypto PMD may be compiled natively on a Stingray/Stingray2 platform or
70cross-compiled on an x86 platform. For example, below commands can be executed
71for cross compiling on x86 platform.
72
73.. code-block:: console
74
75    cd <DPDK-source-directory>
76    meson <dest-dir> --cross-file config/arm/arm64_stingray_linux_gcc
77    cd <dest-dir>
78    ninja
79
80Initialization
81--------------
82The supported platform devices should be present in the
83*/sys/bus/platform/devices/fs<version>/<dev_name>* path on the booted kernel.
84To get BCMFS PMD executing, device node must be owned by VFIO platform module only.
85For example, below commands can be run to get hold of a device node by VFIO.
86
87.. code-block:: console
88
89    SETUP_SYSFS_DEV_NAME=67000000.crypto_mbox
90    io_device_name="vfio-platform"
91    echo $io_device_name > /sys/bus/platform/devices/${SETUP_SYSFS_DEV_NAME}/driver_override
92    echo ${SETUP_SYSFS_DEV_NAME} > /sys/bus/platform/drivers_probe
93
94Limitations
95-----------
96
97* Only supports the session-oriented API implementation (session-less APIs are not supported).
98* CCM is not supported on Broadcom`s SoCs having FlexSparc4 unit.
99
100Testing
101-------
102
103The symmetric crypto operations on BCMFS crypto PMD may be verified by running the test
104application:
105
106.. code-block:: console
107
108    ./dpdk-test
109    RTE>>cryptodev_bcmfs_autotest
110