From: Jay Zhou <jianjay.zhou@huawei.com>
To: <dev@dpdk.org>
Cc: <pablo.de.lara.guarch@intel.com>, <roy.fan.zhang@intel.com>,
<thomas@monjalon.net>, <arei.gonglei@huawei.com>,
<xin.zeng@intel.com>, <weidong.huang@huawei.com>,
<wangxinxin.wang@huawei.com>, <longpeng2@huawei.com>,
<jianjay.zhou@huawei.com>
Subject: [dpdk-dev] [PATCH v8 11/11] doc: add virtio crypto PMD guide
Date: Sat, 14 Apr 2018 17:34:36 +0800 [thread overview]
Message-ID: <daba644e6c465907ce80ce60a54a0896b847784a.1523696750.git.jianjay.zhou@huawei.com> (raw)
In-Reply-To: <cover.1523696750.git.jianjay.zhou@huawei.com>
This patch adds the guide for virtio crypto PMD.
Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
MAINTAINERS | 2 +
doc/guides/cryptodevs/features/virtio.ini | 26 +++++++
doc/guides/cryptodevs/index.rst | 1 +
doc/guides/cryptodevs/virtio.rst | 117 ++++++++++++++++++++++++++++++
doc/guides/rel_notes/release_18_05.rst | 5 +-
5 files changed, 150 insertions(+), 1 deletion(-)
create mode 100644 doc/guides/cryptodevs/features/virtio.ini
create mode 100644 doc/guides/cryptodevs/virtio.rst
diff --git a/MAINTAINERS b/MAINTAINERS
index d171f10..1e9bd7d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -761,6 +761,8 @@ F: doc/guides/cryptodevs/features/snow3g.ini
Virtio
M: Jay Zhou <jianjay.zhou@huawei.com>
F: drivers/crypto/virtio/
+F: doc/guides/cryptodevs/virtio.rst
+F: doc/guides/cryptodevs/features/virtio.ini
ZUC
M: Pablo de Lara <pablo.de.lara.guarch@intel.com>
diff --git a/doc/guides/cryptodevs/features/virtio.ini b/doc/guides/cryptodevs/features/virtio.ini
new file mode 100644
index 0000000..168fc17
--- /dev/null
+++ b/doc/guides/cryptodevs/features/virtio.ini
@@ -0,0 +1,26 @@
+; Supported features of the 'virtio' crypto driver.
+;
+; Refer to default.ini for the full list of available PMD features.
+;
+[Features]
+Symmetric crypto = Y
+Sym operation chaining = Y
+
+;
+; Supported crypto algorithms of the 'virtio' crypto driver.
+;
+[Cipher]
+AES CBC (128) = Y
+AES CBC (192) = Y
+AES CBC (256) = Y
+
+;
+; Supported authentication algorithms of the 'virtio' crypto driver.
+;
+[Auth]
+SHA1 HMAC = Y
+
+;
+; Supported AEAD algorithms of the 'virtio' crypto driver.
+;
+[AEAD]
diff --git a/doc/guides/cryptodevs/index.rst b/doc/guides/cryptodevs/index.rst
index 8a921dd..0529583 100644
--- a/doc/guides/cryptodevs/index.rst
+++ b/doc/guides/cryptodevs/index.rst
@@ -23,4 +23,5 @@ Crypto Device Drivers
scheduler
snow3g
qat
+ virtio
zuc
diff --git a/doc/guides/cryptodevs/virtio.rst b/doc/guides/cryptodevs/virtio.rst
new file mode 100644
index 0000000..f3aa7c6
--- /dev/null
+++ b/doc/guides/cryptodevs/virtio.rst
@@ -0,0 +1,117 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+ Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
+
+Virtio Crypto Poll Mode Driver
+==============================
+
+The virtio crypto PMD provides poll mode driver support for the virtio crypto
+device.
+
+Features
+--------
+
+The virtio crypto PMD has support for:
+
+Cipher algorithms:
+
+* ``RTE_CRYPTO_CIPHER_AES_CBC``
+
+Hash algorithms:
+
+* ``RTE_CRYPTO_AUTH_SHA1_HMAC``
+
+Limitations
+-----------
+
+* Only supports the session-oriented API implementation (session-less APIs are
+ not supported).
+* Only supports modern mode since virtio crypto conforms to virtio-1.0.
+* Only has two types of queues: data queue and control queue. These two queues
+ only support indirect buffers to communication with the virtio backend.
+* Only supports AES_CBC cipher only algorithm and AES_CBC with HMAC_SHA1
+ chaining algorithm since the vhost crypto backend only these algorithms
+ are supported.
+* Does not support Link State interrupt.
+* Does not support runtime configuration.
+
+Virtio crypto PMD Rx/Tx Callbacks
+---------------------------------
+
+Rx callbacks:
+
+* ``virtio_crypto_pkt_rx_burst``
+
+Tx callbacks:
+
+* ``virtio_crypto_pkt_tx_burst``
+
+Installation
+------------
+
+Quick instructions are as follows:
+
+Firstly run DPDK vhost crypto sample as a server side and build QEMU with
+vhost crypto enabled.
+QEMU can then be started using the following parameters:
+
+.. code-block:: console
+
+ qemu-system-x86_64 \
+ [...] \
+ -chardev socket,id=charcrypto0,path=/path/to/your/socket \
+ -object cryptodev-vhost-user,id=cryptodev0,chardev=charcrypto0 \
+ -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0
+ [...]
+
+Secondly bind the uio_generic driver for the virtio-crypto device.
+For example, 0000:00:04.0 is the domain, bus, device and function
+number of the virtio-crypto device:
+
+.. code-block:: console
+
+ modprobe uio_pci_generic
+ echo -n 0000:00:04.0 > /sys/bus/pci/drivers/virtio-pci/unbind
+ echo "1af4 1054" > /sys/bus/pci/drivers/uio_pci_generic/new_id
+
+Finally the front-end virtio crypto PMD driver can be installed:
+
+.. code-block:: console
+
+ cd to the top-level DPDK directory
+ sed -i 's,\(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO\)=n,\1=y,' config/common_base
+ make config T=x86_64-native-linuxapp-gcc
+ make install T=x86_64-native-linuxapp-gcc
+
+Tests
+-----
+
+The unit test cases can be tested as below:
+
+.. code-block:: console
+
+ reserve enough huge pages
+ cd to the top-level DPDK directory
+ export RTE_TARGET=x86_64-native-linuxapp-gcc
+ export RTE_SDK=`pwd`
+ cd to test/test
+ type the command "make" to compile
+ run the tests with "./test"
+ type the command "cryptodev_virtio_autotest" to test
+
+The performance can be tested as below:
+
+.. code-block:: console
+
+ reserve enough huge pages
+ cd to the top-level DPDK directory
+ export RTE_TARGET=x86_64-native-linuxapp-gcc
+ export RTE_SDK=`pwd`
+ cd to app/test-crypto-perf
+ type the command "make" to compile
+ run the tests with the following command:
+
+ ./dpdk-test-crypto-perf -l 0,1 -- --devtype crypto_virtio \
+ --ptest throughput --optype cipher-then-auth --cipher-algo aes-cbc \
+ --cipher-op encrypt --cipher-key-sz 16 --auth-algo sha1-hmac \
+ --auth-op generate --auth-key-sz 64 --digest-sz 12 \
+ --total-ops 100000000 --burst-sz 64 --buffer-sz 2048
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index cb05b89..26a4905 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -84,7 +84,10 @@ New Features
* **Added the virtio crypto PMD.**
- Added a new poll mode driver for virtio crypto devices.
+ Added a new poll mode driver for virtio crypto devices, which provides
+ AES-CBC ciphering and AES-CBC with HMAC-SHA1 algorithm-chaining. See the
+ :doc:`../cryptodevs/virtio` crypto driver guide for more details on
+ this new driver.
API Changes
--
1.8.3.1
next prev parent reply other threads:[~2018-04-14 9:35 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 9:43 [dpdk-dev] [PATCH v6 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-04 12:56 ` De Lara Guarch, Pablo
2018-04-04 13:52 ` Zhoujian (jay)
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-03 9:43 ` [dpdk-dev] [PATCH v6 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-04 17:03 ` [dpdk-dev] [PATCH v7 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 00/11] crypto: add virtio poll mode driver Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 01/11] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 02/11] crypto/virtio: support virtio device init Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 03/11] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 04/11] crypto/virtio: support session related ops Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 05/11] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 06/11] crypto/virtio: support stats related ops Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 07/11] crypto/virtio: support AES-CBC Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 08/11] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 09/11] crypto/virtio: build with meson Jay Zhou
2018-04-14 9:34 ` [dpdk-dev] [PATCH v8 10/11] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-14 9:34 ` Jay Zhou [this message]
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 00/11] crypto: add virtio poll mode driver Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 01/11] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 02/11] crypto/virtio: support virtio device init Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 03/11] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 04/11] crypto/virtio: support session related ops Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 05/11] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 06/11] crypto/virtio: support stats related ops Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 07/11] crypto/virtio: support AES-CBC Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 08/11] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 09/11] crypto/virtio: build with meson Jay Zhou
2018-04-15 12:09 ` De Lara Guarch, Pablo
2018-04-16 0:56 ` Zhoujian (jay)
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 10/11] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-15 8:51 ` [dpdk-dev] [PATCH v9 11/11] doc: add virtio crypto PMD guide Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-16 14:15 ` De Lara Guarch, Pablo
2018-04-16 15:18 ` Zhoujian (jay)
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-16 2:21 ` [dpdk-dev] [PATCH v10 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 00/10] crypto: add virtio poll mode driver Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 01/10] crypto/virtio: add virtio crypto PMD Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 02/10] crypto/virtio: support virtio device init Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 03/10] crypto/virtio: support basic PMD ops Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 04/10] crypto/virtio: support session related ops Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 05/10] crypto/virtio: support crypto enqueue/dequeue burst API Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 06/10] crypto/virtio: support stats related ops Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 07/10] crypto/virtio: support AES-CBC Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 08/10] crypto/virtio: support HMAC-SHA1 Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 09/10] test/crypto: add function tests for virtio crypto PMD Jay Zhou
2018-04-17 9:23 ` [dpdk-dev] [PATCH v11 10/10] doc: add virtio crypto PMD guide Jay Zhou
2018-04-18 10:00 ` [dpdk-dev] [PATCH v11 00/10] crypto: add virtio poll mode driver De Lara Guarch, Pablo
2018-04-18 13:07 ` Zhoujian (jay)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daba644e6c465907ce80ce60a54a0896b847784a.1523696750.git.jianjay.zhou@huawei.com \
--to=jianjay.zhou@huawei.com \
--cc=arei.gonglei@huawei.com \
--cc=dev@dpdk.org \
--cc=longpeng2@huawei.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=roy.fan.zhang@intel.com \
--cc=thomas@monjalon.net \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.com \
--cc=xin.zeng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).