All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: maxime.coquelin@redhat.com, jianjay.zhou@huawei.com,
	jianfeng.tan@intel.com
Subject: [PATCH v4 8/8] doc: update for vhost crypto support
Date: Thu, 29 Mar 2018 07:52:55 -0500	[thread overview]
Message-ID: <1522327975-28769-9-git-send-email-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <1522327975-28769-1-git-send-email-roy.fan.zhang@intel.com>

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 doc/guides/prog_guide/vhost_lib.rst       | 21 ++++++++
 doc/guides/rel_notes/release_18_05.rst    | 10 ++++
 doc/guides/sample_app_ug/index.rst        |  1 +
 doc/guides/sample_app_ug/vhost_crypto.rst | 84 +++++++++++++++++++++++++++++++
 4 files changed, 116 insertions(+)
 create mode 100644 doc/guides/sample_app_ug/vhost_crypto.rst

diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 18227b6..9d6680c 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -160,6 +160,27 @@ The following is an overview of some key Vhost API functions:
 
   Receives (dequeues) ``count`` packets from guest, and stored them at ``pkts``.
 
+* ``rte_vhost_crypto_create(vid, cryptodev_id, sess_mempool, socket_id)``
+
+  As an extension of new_device(), this function adds virtio-crypto workload
+  acceleration capability to the device. All crypto workload is processed by
+  DPDK cryptodev with the device ID of ``cryptodev_id``.
+
+* ``rte_vhost_crypto_fetch_requests(vid, queue_id, ops, nb_ops)``
+
+  Receives (dequeues) ``nb_ops`` virtio-crypto requests from guest, parses
+  them to DPDK Crypto Operations, and fills the ``ops`` with parsing results.
+
+* ``rte_vhost_crypto_finalize_requests(queue_id, ops, nb_ops)``
+
+  After the ``ops`` are dequeued from Cryptodev, finalizes the jobs and
+  notifies the guest(s).
+
+* ``rte_vhost_user_register_extern_backend(vid, extern_data, ops)``
+
+  This function register private data, and pre and post vhost-user message
+  handlers.
+
 Vhost-user Implementations
 --------------------------
 
diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst
index 3923dc2..3a0587d 100644
--- a/doc/guides/rel_notes/release_18_05.rst
+++ b/doc/guides/rel_notes/release_18_05.rst
@@ -41,6 +41,16 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added external backend support to vhost library
+
+  A new API is introduced for user to register the private data and vhost-user
+  message handlers to vhost library.
+
+* **Added crypto workload support to vhost library
+
+  New APIs are introduced in vhost library to enable virtio crypto support
+  including session creation/deletion handling and translating virito-crypto
+  request into DPDK crypto operations. A sample application is also introduced.
 
 API Changes
 -----------
diff --git a/doc/guides/sample_app_ug/index.rst b/doc/guides/sample_app_ug/index.rst
index e87afda..57e8354 100644
--- a/doc/guides/sample_app_ug/index.rst
+++ b/doc/guides/sample_app_ug/index.rst
@@ -44,6 +44,7 @@ Sample Applications User Guides
     vmdq_dcb_forwarding
     vhost
     vhost_scsi
+    vhost_crypto
     netmap_compatibility
     ip_pipeline
     test_pipeline
diff --git a/doc/guides/sample_app_ug/vhost_crypto.rst b/doc/guides/sample_app_ug/vhost_crypto.rst
new file mode 100644
index 0000000..8e6cb2a
--- /dev/null
+++ b/doc/guides/sample_app_ug/vhost_crypto.rst
@@ -0,0 +1,84 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2017-2018 Intel Corporation.
+
+
+Vhost_Crypto Sample Application
+===============================
+
+The vhost_crypto sample application implemented a simple Crypto device,
+which used as the  backend of Qemu vhost-user-crypto device. Similar with
+vhost-user-net and vhost-user-scsi device, the sample application used
+domain socket to communicate with Qemu, and the virtio ring was processed
+by vhost_crypto sample application.
+
+Testing steps
+-------------
+
+This section shows the steps how to start a VM with the crypto device as
+fast data path for critical application.
+
+Compiling the Application
+-------------------------
+
+To compile the sample application see :doc:`compiling`.
+
+The application is located in the ``examples`` sub-directory.
+
+Start the vhost_crypto example
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: console
+
+    ./vhost_crypto [EAL options] -- [--socket-file PATH]
+        [--cdev-id ID] [--cdev-queue-id ID] [--zero-copy] [--guest-polling]
+
+where,
+
+* socket-file PATH: the path of UNIX socket file to be created, multiple
+  instances of this config item is supported. Upon absence of this item,
+  the default socket-file `/tmp/vhost_crypto1.socket` is used.
+
+* cdev-id ID: the target DPDK Cryptodev's ID to process the actual crypto
+  workload. Upon absence of this item the default value of `0` will be used.
+  For details of DPDK Cryptodev, please refer to DPDK Cryptodev Library
+  Programmers' Guide.
+
+* cdev-queue-id ID: the target DPDK Cryptodev's queue ID to process the
+  actual crypto workload. Upon absence of this item the default value of `0`
+  will be used. For details of DPDK Cryptodev, please refer to DPDK Cryptodev
+  Library Programmers' Guide.
+
+* zero-copy: the presence of this item means the ZERO-COPY feature will be
+  enabled. Otherwise it is disabled. PLEASE NOTE the ZERO-COPY feature is still
+  in experimental stage and may cause the problem like segmentation fault. If
+  the user wants to use LKCF in the guest, this feature shall be turned off.
+
+* guest-polling: the presence of this item means the application assumes the
+  guest works in polling mode, thus will NOT notify the guest completion of
+  processing.
+
+The application requires that crypto devices capable of performing
+the specified crypto operation are available on application initialization.
+This means that HW crypto device/s must be bound to a DPDK driver or
+a SW crypto device/s (virtual crypto PMD) must be created (using --vdev).
+
+.. _vhost_crypto_app_run_vm:
+
+Start the VM
+~~~~~~~~~~~~
+
+.. code-block:: console
+
+    qemu-system-x86_64 -machine accel=kvm \
+        -m $mem -object memory-backend-file,id=mem,size=$mem,\
+        mem-path=/dev/hugepages,share=on -numa node,memdev=mem \
+        -drive file=os.img,if=none,id=disk \
+        -device ide-hd,drive=disk,bootindex=0 \
+        -chardev socket,id={chardev_id},path={PATH} \
+        -object cryptodev-vhost-user,id={obj_id},chardev={chardev_id} \
+        -device virtio-crypto-pci,id={dev_id},cryptodev={obj_id} \
+        ...
+
+.. note::
+    You must check whether your Qemu can support "vhost-user-crypto" or not.
+
-- 
2.7.4

  parent reply	other threads:[~2018-03-29 12:53 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26  9:51 [PATCH v3 00/10] lib/librte_vhost: introduce new vhost user crypto backend support Fan Zhang
2018-03-26  9:51 ` [PATCH v3 01/10] lib/librte_vhost: add external " Fan Zhang
2018-03-29  2:11   ` Tan, Jianfeng
2018-03-29  4:17     ` Liu, Changpeng
2018-03-26  9:51 ` [PATCH v3 02/10] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-03-26  9:51 ` [PATCH v3 03/10] lib/librte_vhost: add session message handler Fan Zhang
2018-03-26  9:51 ` [PATCH v3 04/10] lib/librte_vhost: add request handler Fan Zhang
2018-03-26  9:51 ` [PATCH v3 05/10] lib/librte_vhost: add head file Fan Zhang
2018-03-26  9:51 ` [PATCH v3 06/10] lib/librte_vhost: add public function implementation Fan Zhang
2018-03-26  9:51 ` [PATCH v3 07/10] lib/librte_vhost: update version map Fan Zhang
2018-03-26  9:51 ` [PATCH v3 08/10] lib/librte_vhost: update makefile Fan Zhang
2018-03-26  9:51 ` [PATCH v3 09/10] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-03-26  9:51 ` [PATCH v3 10/10] doc: update prog guide and sample app guide Fan Zhang
2018-03-29 12:52 ` [PATCH v4 0/8] vhost: intdroduce vhost user crypto backend Fan Zhang
2018-03-29 12:52   ` [PATCH v4 1/8] lib/librte_vhost: add external backend support Fan Zhang
2018-03-29 13:47     ` Wodkowski, PawelX
2018-04-01 19:53       ` Zhang, Roy Fan
2018-04-03 13:44         ` Maxime Coquelin
2018-04-03 13:55           ` Zhang, Roy Fan
2018-04-03 14:42           ` Tan, Jianfeng
2018-04-03 14:48             ` Wodkowski, PawelX
2018-03-29 12:52   ` [PATCH v4 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-03-29 12:52   ` [PATCH v4 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-03-29 15:02     ` Tan, Jianfeng
2018-04-03 15:09       ` Zhang, Roy Fan
2018-03-29 12:52   ` [PATCH v4 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-03-29 12:52   ` [PATCH v4 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-03-29 12:52   ` [PATCH v4 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-03-29 12:52   ` [PATCH v4 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-03-29 12:52   ` Fan Zhang [this message]
2018-04-04 10:08   ` [PATCH v5 0/8] vhost: introduce vhost crypto backend Fan Zhang
2018-04-04 10:08     ` [PATCH v5 1/8] lib/librte_vhost: add external backend support Fan Zhang
2018-04-04 14:08       ` Maxime Coquelin
2018-04-04 10:08     ` [PATCH v5 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-04-04 10:08     ` [PATCH v5 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-04-04 10:08     ` [PATCH v5 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-04-04 10:08     ` [PATCH v5 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-04-04 10:09     ` [PATCH v5 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-04-04 10:09     ` [PATCH v5 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-04-04 10:09     ` [PATCH v5 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-04 14:24     ` [PATCH v6 0/8] vhost: introduce vhost crypto backend Fan Zhang
2018-04-04 14:24       ` [PATCH v6 1/8] lib/librte_vhost: add vhost user message handlers Fan Zhang
2018-04-04 14:24       ` [PATCH v6 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-04-04 14:24       ` [PATCH v6 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-04-04 14:25       ` [PATCH v6 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-04-05  8:22         ` Maxime Coquelin
2018-04-04 14:25       ` [PATCH v6 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-04-04 14:25       ` [PATCH v6 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-04-04 14:25       ` [PATCH v6 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-04-04 14:25       ` [PATCH v6 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-04 16:46         ` Zhoujian (jay)
2018-04-04 15:37       ` [PATCH v6 0/8] vhost: introduce vhost crypto backend Maxime Coquelin
2018-04-04 16:50         ` Zhoujian (jay)
2018-04-04 19:32           ` Maxime Coquelin
2018-04-05  8:26       ` Maxime Coquelin
2018-04-05  9:48         ` Maxime Coquelin
2018-04-05 16:01       ` [PATCH v7 " Fan Zhang
2018-04-05 16:01         ` [PATCH v7 1/8] lib/librte_vhost: add vhost user message handlers Fan Zhang
2018-04-05 16:01         ` [PATCH v7 2/8] lib/librte_vhost: add virtio-crypto user message structure Fan Zhang
2018-04-05 16:01         ` [PATCH v7 3/8] lib/librte_vhost: add session message handler Fan Zhang
2018-04-05 16:01         ` [PATCH v7 4/8] lib/librte_vhost: add request handler Fan Zhang
2018-04-05 16:01         ` [PATCH v7 5/8] lib/librte_vhost: add public function implementation Fan Zhang
2018-04-05 16:01         ` [PATCH v7 6/8] lib/librte_vhost: update makefile Fan Zhang
2018-04-05 16:01         ` [PATCH v7 7/8] examples/vhost_crypto: add vhost crypto sample application Fan Zhang
2018-04-15 14:34           ` Thomas Monjalon
2018-04-15 17:35             ` Thomas Monjalon
2018-04-16  7:27               ` Maxime Coquelin
2018-04-05 16:01         ` [PATCH v7 8/8] doc: update for vhost crypto support Fan Zhang
2018-04-05 19:28         ` [PATCH v7 0/8] vhost: introduce vhost crypto backend Maxime Coquelin
2018-04-05 19:40         ` Maxime Coquelin

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=1522327975-28769-9-git-send-email-roy.fan.zhang@intel.com \
    --to=roy.fan.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=maxime.coquelin@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.