1d30ea906Sjfb8856606.. SPDX-License-Identifier: BSD-3-Clause 2d30ea906Sjfb8856606 Copyright(c) 2016 Intel Corporation. 3a9643ea8Slogwang 4a9643ea8SlogwangNull Crypto Poll Mode Driver 5a9643ea8Slogwang============================ 6a9643ea8Slogwang 7*2d9fd380Sjfb8856606The Null Crypto PMD (**librte_crypto_null**) provides a crypto poll mode 8a9643ea8Slogwangdriver which provides a minimal implementation for a software crypto device. As 9a9643ea8Slogwanga null device it does not modify the data in the mbuf on which the crypto 10a9643ea8Slogwangoperation is to operate and it only has support for a single cipher and 11a9643ea8Slogwangauthentication algorithm. 12a9643ea8Slogwang 13a9643ea8SlogwangWhen a burst of mbufs is submitted to a Null Crypto PMD for processing then 14a9643ea8Slogwangeach mbuf in the burst will be enqueued in an internal buffer for collection on 15a9643ea8Slogwanga dequeue call as long as the mbuf has a valid rte_mbuf_offload operation with 16a9643ea8Slogwanga valid rte_cryptodev_session or rte_crypto_xform chain of operations. 17a9643ea8Slogwang 18a9643ea8SlogwangFeatures 19a9643ea8Slogwang-------- 20a9643ea8Slogwang 21a9643ea8SlogwangModes: 22a9643ea8Slogwang 23a9643ea8Slogwang* RTE_CRYPTO_XFORM_CIPHER ONLY 24a9643ea8Slogwang* RTE_CRYPTO_XFORM_AUTH ONLY 25a9643ea8Slogwang* RTE_CRYPTO_XFORM_CIPHER THEN RTE_CRYPTO_XFORM_AUTH 26a9643ea8Slogwang* RTE_CRYPTO_XFORM_AUTH THEN RTE_CRYPTO_XFORM_CIPHER 27a9643ea8Slogwang 28a9643ea8SlogwangCipher algorithms: 29a9643ea8Slogwang 30a9643ea8Slogwang* RTE_CRYPTO_CIPHER_NULL 31a9643ea8Slogwang 32a9643ea8SlogwangAuthentication algorithms: 33a9643ea8Slogwang 34a9643ea8Slogwang* RTE_CRYPTO_AUTH_NULL 35a9643ea8Slogwang 36a9643ea8SlogwangLimitations 37a9643ea8Slogwang----------- 38a9643ea8Slogwang 39a9643ea8Slogwang* Only in-place is currently supported (destination address is the same as 40a9643ea8Slogwang source address). 41a9643ea8Slogwang 42a9643ea8SlogwangInstallation 43a9643ea8Slogwang------------ 44a9643ea8Slogwang 45a9643ea8SlogwangThe Null Crypto PMD is enabled and built by default in both the Linux and 46a9643ea8SlogwangFreeBSD builds. 47a9643ea8Slogwang 48a9643ea8SlogwangInitialization 49a9643ea8Slogwang-------------- 50a9643ea8Slogwang 51a9643ea8SlogwangTo use the PMD in an application, user must: 52a9643ea8Slogwang 532bfe3f2eSlogwang* Call rte_vdev_init("crypto_null") within the application. 54a9643ea8Slogwang 552bfe3f2eSlogwang* Use --vdev="crypto_null" in the EAL options, which will call rte_vdev_init() internally. 56a9643ea8Slogwang 57a9643ea8SlogwangThe following parameters (all optional) can be provided in the previous two calls: 58a9643ea8Slogwang 59a9643ea8Slogwang* socket_id: Specify the socket where the memory for the device is going to be allocated 60a9643ea8Slogwang (by default, socket_id will be the socket where the core that is creating the PMD is running on). 61a9643ea8Slogwang 62a9643ea8Slogwang* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default). 63a9643ea8Slogwang 64a9643ea8Slogwang* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default). 65a9643ea8Slogwang 66a9643ea8SlogwangExample: 67a9643ea8Slogwang 68a9643ea8Slogwang.. code-block:: console 69a9643ea8Slogwang 70*2d9fd380Sjfb8856606 ./dpdk-l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0,max_nb_sessions=128" \ 712bfe3f2eSlogwang -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "null" 72