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