15630257fSFerruh Yigit.. SPDX-License-Identifier: BSD-3-Clause 2d6946fe9SMarcin Smoczynski Copyright(c) 2016-2020 Intel Corporation. 3eec136f3SDeclan Doherty 4eec136f3SDeclan DohertyAES-NI GCM Crypto Poll Mode Driver 557cfab87SPablo de Lara================================== 6eec136f3SDeclan Doherty 7eec136f3SDeclan Doherty 88809f78cSBruce RichardsonThe AES-NI GCM PMD (**librte_crypto_aesni_gcm**) provides poll mode crypto driver 96f16aab0SPablo de Larasupport for utilizing Intel multi buffer library (see AES-NI Multi-buffer PMD documentation 106f16aab0SPablo de Larato learn more about it, including installation). 11eec136f3SDeclan Doherty 12d6946fe9SMarcin SmoczynskiThe AES-NI GCM PMD supports synchronous mode of operation with 13d6946fe9SMarcin Smoczynski``rte_cryptodev_sym_cpu_crypto_process`` function call for both AES-GCM and 14d6946fe9SMarcin SmoczynskiGMAC, however GMAC support is limited to one segment per operation. Please 15d6946fe9SMarcin Smoczynskirefer to ``rte_crypto`` programmer's guide for more detail. 16d6946fe9SMarcin Smoczynski 17eec136f3SDeclan DohertyFeatures 18eec136f3SDeclan Doherty-------- 19eec136f3SDeclan Doherty 20eec136f3SDeclan DohertyAESNI GCM PMD has support for: 21eec136f3SDeclan Doherty 22eec136f3SDeclan DohertyAuthentication algorithms: 23eec136f3SDeclan Doherty 249c2a5775SPiotr Azarewicz* RTE_CRYPTO_AUTH_AES_GMAC 259c2a5775SPiotr Azarewicz 26b79e4c00SPablo de LaraAEAD algorithms: 27b79e4c00SPablo de Lara 28b79e4c00SPablo de Lara* RTE_CRYPTO_AEAD_AES_GCM 29b79e4c00SPablo de Lara 306f16aab0SPablo de LaraLimitations 316f16aab0SPablo de Lara----------- 326f16aab0SPablo de Lara 334b701523SPablo de Lara* In out-of-place operations, chained destination mbufs are not supported. 346f16aab0SPablo de Lara* Cipher only is not supported. 356f16aab0SPablo de Lara 366f16aab0SPablo de Lara 379c2a5775SPiotr AzarewiczInstallation 389c2a5775SPiotr Azarewicz------------ 399c2a5775SPiotr Azarewicz 406f16aab0SPablo de LaraTo build DPDK with the AESNI_GCM_PMD the user is required to download the multi-buffer 416f16aab0SPablo de Laralibrary from `here <https://github.com/01org/intel-ipsec-mb>`_ 426f16aab0SPablo de Laraand compile it on their user system before building DPDK. 43ad3f114fSSivaramakrishnan VenkatThe latest version of the library supported by this PMD is v1.5, which 44ad3f114fSSivaramakrishnan Venkatcan be downloaded in `<https://github.com/01org/intel-ipsec-mb/archive/v1.5.zip>`_. 456f16aab0SPablo de Lara 466f16aab0SPablo de Lara.. code-block:: console 476f16aab0SPablo de Lara 486f16aab0SPablo de Lara make 49dad37364SMarko Kovacevic make install 506f16aab0SPablo de Lara 51dede694cSPablo de LaraThe library requires NASM to be built. Depending on the library version, it might 52dede694cSPablo de Lararequire a minimum NASM version (e.g. v0.54 requires at least NASM 2.14). 53dede694cSPablo de Lara 54dede694cSPablo de LaraNASM is packaged for different OS. However, on some OS the version is too old, 55dede694cSPablo de Laraso a manual installation is required. In that case, NASM can be downloaded from 56dede694cSPablo de Lara`NASM website <https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D>`_. 57dede694cSPablo de LaraOnce it is downloaded, extract it and follow these steps: 58dede694cSPablo de Lara 59dede694cSPablo de Lara.. code-block:: console 60dede694cSPablo de Lara 61dede694cSPablo de Lara ./configure 62dede694cSPablo de Lara make 63dede694cSPablo de Lara make install 64dede694cSPablo de Lara 65f69ed104SPablo de Lara 666f16aab0SPablo de LaraAs a reference, the following table shows a mapping between the past DPDK versions 676f16aab0SPablo de Laraand the external crypto libraries supported by them: 686f16aab0SPablo de Lara 696f16aab0SPablo de Lara.. _table_aesni_gcm_versions: 706f16aab0SPablo de Lara 716f16aab0SPablo de Lara.. table:: DPDK and external crypto library version compatibility 726f16aab0SPablo de Lara 736f16aab0SPablo de Lara ============= ================================ 746f16aab0SPablo de Lara DPDK version Crypto library version 756f16aab0SPablo de Lara ============= ================================ 7650369b2eSBrian Dooley 20.11 - 21.08 Multi-buffer library 0.53 - 1.3 77*8484d74bSBrian Dooley 21.11 - 24.07 Multi-buffer library 1.0 - 1.5 78*8484d74bSBrian Dooley 24.11+ Multi-buffer library 1.4 - 1.5 796f16aab0SPablo de Lara ============= ================================ 806f16aab0SPablo de Lara 81b7d65109SPablo de LaraInitialization 82b7d65109SPablo de Lara-------------- 83b7d65109SPablo de Lara 84b7d65109SPablo de LaraIn order to enable this virtual crypto PMD, user must: 85b7d65109SPablo de Lara 866f16aab0SPablo de Lara* Build the multi buffer library (explained in Installation section). 87b7d65109SPablo de Lara 88b7d65109SPablo de LaraTo use the PMD in an application, user must: 89b7d65109SPablo de Lara 902f6fec53SThomas Monjalon* Call rte_vdev_init("crypto_aesni_gcm") within the application. 91b7d65109SPablo de Lara 922f6fec53SThomas Monjalon* Use --vdev="crypto_aesni_gcm" in the EAL options, which will call rte_vdev_init() internally. 93b7d65109SPablo de Lara 94b7d65109SPablo de LaraThe following parameters (all optional) can be provided in the previous two calls: 95b7d65109SPablo de Lara 96b7d65109SPablo de Lara* socket_id: Specify the socket where the memory for the device is going to be allocated 97b7d65109SPablo de Lara (by default, socket_id will be the socket where the core that is creating the PMD is running on). 98b7d65109SPablo de Lara 99b7d65109SPablo de Lara* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default). 100b7d65109SPablo de Lara 101b7d65109SPablo de Lara* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default). 102b7d65109SPablo de Lara 103b7d65109SPablo de LaraExample: 104b7d65109SPablo de Lara 105b7d65109SPablo de Lara.. code-block:: console 106b7d65109SPablo de Lara 107fd5f9fb9SCiara Power ./dpdk-l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0,max_nb_sessions=128" \ 108fda78c51SPablo de Lara -- -p 1 --cdev SW --chain AEAD --aead_algo "aes-gcm" 109