1f1666288SKai Ji.. SPDX-License-Identifier: BSD-3-Clause 2f1666288SKai Ji Copyright(c) 2021 Intel Corporation. 3f1666288SKai Ji 4f1666288SKai JiChacha20-poly1305 Crypto Poll Mode Driver 5f1666288SKai Ji========================================= 6f1666288SKai Ji 7f1666288SKai JiThe Chacha20-poly1305 PMD provides poll mode crypto driver support for 8f1666288SKai Jiutilizing `Intel IPSec Multi-buffer library <https://github.com/01org/intel-ipsec-mb>`_. 9f1666288SKai Ji 10f1666288SKai JiFeatures 11f1666288SKai Ji-------- 12f1666288SKai Ji 13f1666288SKai JiChacha20-poly1305 PMD has support for: 14f1666288SKai Ji 15f1666288SKai JiAEAD algorithms: 16f1666288SKai Ji 17f1666288SKai Ji* RTE_CRYPTO_AEAD_CHACHA20_POLY1305 18f1666288SKai Ji 19f272ea5bSPablo de LaraChaha20_Poly1305 PMD vs AESNI MB PMD 20f272ea5bSPablo de Lara------------------------------------ 21f272ea5bSPablo de Lara 22f272ea5bSPablo de LaraAESNI MB PMD also supports CHACHA20-POLY1305 algorithms. 23f272ea5bSPablo de LaraIt is recommended to use the AESNI MB PMD, 24f272ea5bSPablo de Larawhich offers better performance on Intel processors, 25f272ea5bSPablo de Larawhen single-segment buffers are used. 26f272ea5bSPablo de LaraTake a look at the PMD documentation (:doc:`aesni_mb`) for more information. 27f1666288SKai Ji 28f1666288SKai JiInstallation 29f1666288SKai Ji------------ 30f1666288SKai Ji 31f1666288SKai JiTo build DPDK with the Chacha20-poly1305 PMD the user is required to download 32f1666288SKai Jithe multi-buffer library from `here <https://github.com/01org/intel-ipsec-mb>`_ 33f1666288SKai Jiand compile it on their user system before building DPDK. 34ad3f114fSSivaramakrishnan VenkatThe latest version of the library supported by this PMD is v1.5, which 35ad3f114fSSivaramakrishnan Venkatcan be downloaded from `<https://github.com/01org/intel-ipsec-mb/archive/v1.5.zip>`_. 36f1666288SKai Ji 37f1666288SKai JiAfter downloading the library, the user needs to unpack and compile it 38f1666288SKai Jion their system before building DPDK: 39f1666288SKai Ji 40f1666288SKai Ji.. code-block:: console 41f1666288SKai Ji 42f1666288SKai Ji make 43f1666288SKai Ji make install 44f1666288SKai Ji 45f1666288SKai JiThe library requires NASM to be built. Depending on the library version, it might 46f1666288SKai Jirequire a minimum NASM version (e.g. v0.54 requires at least NASM 2.14). 47f1666288SKai Ji 48f1666288SKai JiNASM is packaged for different OS. However, on some OS the version is too old, 49f1666288SKai Jiso a manual installation is required. In that case, NASM can be downloaded from 50f1666288SKai Ji`NASM website <https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D>`_. 51f1666288SKai JiOnce it is downloaded, extract it and follow these steps: 52f1666288SKai Ji 53f1666288SKai Ji.. code-block:: console 54f1666288SKai Ji 55f1666288SKai Ji ./configure 56f1666288SKai Ji make 57f1666288SKai Ji make install 58f1666288SKai Ji 59f1666288SKai JiAs a reference, the following table shows a mapping between the past DPDK versions 60f1666288SKai Jiand the external crypto libraries supported by them: 61f1666288SKai Ji 62f1666288SKai Ji.. _table_chacha20_poly1305_versions: 63f1666288SKai Ji 64f1666288SKai Ji.. table:: DPDK and external crypto library version compatibility 65f1666288SKai Ji 66f1666288SKai Ji ============= ================================ 67f1666288SKai Ji DPDK version Crypto library version 68f1666288SKai Ji ============= ================================ 69*8484d74bSBrian Dooley 21.11 - 24.07 Multi-buffer library 1.0 - 1.5 70*8484d74bSBrian Dooley 24.11+ Multi-buffer library 1.4 - 1.5 71f1666288SKai Ji ============= ================================ 72f1666288SKai Ji 73f1666288SKai JiInitialization 74f1666288SKai Ji-------------- 75f1666288SKai Ji 76f1666288SKai JiIn order to enable this virtual crypto PMD, user must: 77f1666288SKai Ji 78f1666288SKai Ji* Build the multi buffer library (explained in Installation section). 79f1666288SKai Ji 80f1666288SKai JiTo use the PMD in an application, user must: 81f1666288SKai Ji 82f1666288SKai Ji* Call rte_vdev_init("crypto_chacha20_poly1305") within the application. 83f1666288SKai Ji 84f1666288SKai Ji* Use --vdev="crypto_chacha20_poly1305" in the EAL options, which will call 85f1666288SKai Ji rte_vdev_init() internally. 86f1666288SKai Ji 87f1666288SKai JiThe following parameters (all optional) can be provided in the previous two calls: 88f1666288SKai Ji 89f1666288SKai Ji* socket_id: Specify the socket where the memory for the device is going to be allocated 90f1666288SKai Ji (by default, socket_id will be the socket where the core that is creating the PMD is running on). 91f1666288SKai Ji 92f1666288SKai Ji* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default). 93f1666288SKai Ji 94f1666288SKai Ji* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default). 95f1666288SKai Ji 96f1666288SKai JiExample: 97f1666288SKai Ji 98f1666288SKai Ji.. code-block:: console 99f1666288SKai Ji 100f1666288SKai Ji --vdev="crypto_chacha20_poly1305,socket_id=0,max_nb_sessions=128" 101