1c8e79da7SVikas Gupta.. SPDX-License-Identifier: BSD-3-Clause 2c8e79da7SVikas Gupta Copyright(C) 2020 Broadcom 3c8e79da7SVikas Gupta 4c8e79da7SVikas GuptaBroadcom FlexSparc Crypto Poll Mode Driver 5c8e79da7SVikas Gupta========================================== 6c8e79da7SVikas Gupta 7c8e79da7SVikas GuptaThe FlexSparc crypto poll mode driver (BCMFS PMD) provides support for offloading 8fbca4639SVikas Guptacryptographic operations to the Broadcom SoCs having FlexSparc4 unit. 9c8e79da7SVikas GuptaDetailed information about SoCs can be found at `Broadcom Official Website 10c8e79da7SVikas Gupta<https://www.broadcom.com/products/ethernet-connectivity/network-adapters/smartnic>`__. 11c8e79da7SVikas Gupta 12c8e79da7SVikas GuptaSupported Broadcom SoCs 13c8e79da7SVikas Gupta----------------------- 14c8e79da7SVikas Gupta 15c8e79da7SVikas Gupta* Stingray 16c8e79da7SVikas Gupta 174ed19f0dSVikas GuptaFeatures 184ed19f0dSVikas Gupta-------- 194ed19f0dSVikas Gupta 20fbca4639SVikas GuptaThe BCMFS PMD has support for below symmetric algorithms: 214ed19f0dSVikas Gupta 224ed19f0dSVikas GuptaCipher algorithms: 234ed19f0dSVikas Gupta 244ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_3DES_CBC`` 254ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_3DES_CTR`` 264ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES128_CBC`` 274ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES192_CBC`` 284ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES256_CBC`` 294ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES128_CTR`` 304ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES192_CTR`` 314ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES256_CTR`` 324ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_AES_XTS`` 334ed19f0dSVikas Gupta* ``RTE_CRYPTO_CIPHER_DES_CBC`` 344ed19f0dSVikas Gupta 354ed19f0dSVikas GuptaHash algorithms: 364ed19f0dSVikas Gupta 374ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA1`` 384ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA1_HMAC`` 394ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA224`` 404ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA224_HMAC`` 414ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA256`` 424ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA256_HMAC`` 434ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA384`` 444ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA384_HMAC`` 454ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA512`` 464ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_SHA512_HMAC`` 474ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_AES_XCBC_MAC`` 484ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_MD5_HMAC`` 494ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_AES_GMAC`` 504ed19f0dSVikas Gupta* ``RTE_CRYPTO_AUTH_AES_CMAC`` 514ed19f0dSVikas Gupta 524ed19f0dSVikas GuptaSupported AEAD algorithms: 534ed19f0dSVikas Gupta 544ed19f0dSVikas Gupta* ``RTE_CRYPTO_AEAD_AES_GCM`` 554ed19f0dSVikas Gupta 56c8e79da7SVikas GuptaInstallation 57c8e79da7SVikas Gupta------------ 58c8e79da7SVikas GuptaInformation about kernel, rootfs and toolchain can be found at 59c8e79da7SVikas Gupta`Broadcom Official Website <https://www.broadcom.com/products/ethernet-connectivity 60c8e79da7SVikas Gupta/network-adapters/smartnic/stingray-software>`__. 61c8e79da7SVikas Gupta 62c8e79da7SVikas Gupta .. Note:: 63c8e79da7SVikas Gupta To execute BCMFS PMD, it must be compiled with VFIO_PRESENT flag on the 64c8e79da7SVikas Gupta compiling platform and same gets enabled in rte_vfio.h. 65c8e79da7SVikas Gupta 66fbca4639SVikas GuptaThe BCMFS PMD may be compiled natively on a Stingray platform or 67c8e79da7SVikas Guptacross-compiled on an x86 platform. For example, below commands can be executed 68c8e79da7SVikas Guptafor cross compiling on x86 platform. 69c8e79da7SVikas Gupta 70c8e79da7SVikas Gupta.. code-block:: console 71c8e79da7SVikas Gupta 72c8e79da7SVikas Gupta cd <DPDK-source-directory> 73*e24b8ad4SStephen Hemminger meson setup <dest-dir> --cross-file config/arm/arm64_stingray_linux_gcc 74c8e79da7SVikas Gupta cd <dest-dir> 75c8e79da7SVikas Gupta ninja 76c8e79da7SVikas Gupta 77c8e79da7SVikas GuptaInitialization 78c8e79da7SVikas Gupta-------------- 79c8e79da7SVikas GuptaThe supported platform devices should be present in the 80c8e79da7SVikas Gupta*/sys/bus/platform/devices/fs<version>/<dev_name>* path on the booted kernel. 81c8e79da7SVikas GuptaTo get BCMFS PMD executing, device node must be owned by VFIO platform module only. 82c8e79da7SVikas GuptaFor example, below commands can be run to get hold of a device node by VFIO. 83c8e79da7SVikas Gupta 84c8e79da7SVikas Gupta.. code-block:: console 85c8e79da7SVikas Gupta 86c8e79da7SVikas Gupta SETUP_SYSFS_DEV_NAME=67000000.crypto_mbox 87c8e79da7SVikas Gupta io_device_name="vfio-platform" 88c8e79da7SVikas Gupta echo $io_device_name > /sys/bus/platform/devices/${SETUP_SYSFS_DEV_NAME}/driver_override 89c8e79da7SVikas Gupta echo ${SETUP_SYSFS_DEV_NAME} > /sys/bus/platform/drivers_probe 904ed19f0dSVikas Gupta 914ed19f0dSVikas GuptaLimitations 924ed19f0dSVikas Gupta----------- 934ed19f0dSVikas Gupta 94fbca4639SVikas Gupta* The session-oriented APIs are supported but the session-less APIs are not. 95fbca4639SVikas Gupta* CCM is not supported. 96cee518e3SVikas Gupta 97cee518e3SVikas GuptaTesting 98cee518e3SVikas Gupta------- 99cee518e3SVikas Gupta 100fbca4639SVikas GuptaThe symmetric crypto operations on BCMFS PMD may be verified by running the test 101cee518e3SVikas Guptaapplication: 102cee518e3SVikas Gupta 103cee518e3SVikas Gupta.. code-block:: console 104cee518e3SVikas Gupta 105cee518e3SVikas Gupta ./dpdk-test 106cee518e3SVikas Gupta RTE>>cryptodev_bcmfs_autotest 107