Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/35508/?format=api
https://patches.dpdk.org/api/patches/35508/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180227162917.35125-11-roy.fan.zhang@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20180227162917.35125-11-roy.fan.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180227162917.35125-11-roy.fan.zhang@intel.com", "date": "2018-02-27T16:29:17", "name": "[dpdk-dev,v2,10/10] doc: update prog guide and sample app guid", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "161b504ee7c40b6ec957bc409f17bd34e10bbc50", "submitter": { "id": 304, "url": "https://patches.dpdk.org/api/people/304/?format=api", "name": "Fan Zhang", "email": "roy.fan.zhang@intel.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180227162917.35125-11-roy.fan.zhang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/35508/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/35508/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 087B45F17;\n\tTue, 27 Feb 2018 17:33:25 +0100 (CET)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 448F35B38\n\tfor <dev@dpdk.org>; Tue, 27 Feb 2018 17:33:21 +0100 (CET)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Feb 2018 08:33:21 -0800", "from silpixa00398673.ir.intel.com (HELO\n\tsilpixa00398673.ger.corp.intel.com) ([10.237.223.54])\n\tby orsmga005.jf.intel.com with ESMTP; 27 Feb 2018 08:33:19 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.47,401,1515484800\"; d=\"scan'208\";a=\"204150859\"", "From": "Fan Zhang <roy.fan.zhang@intel.com>", "To": "dev@dpdk.org", "Cc": "jianjay.zhou@huawei.com, roy.fan.zhang@intel.com, yliu@fridaylinux.org", "Date": "Tue, 27 Feb 2018 16:29:17 +0000", "Message-Id": "<20180227162917.35125-11-roy.fan.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180227162917.35125-1-roy.fan.zhang@intel.com>", "References": "<20180227162917.35125-1-roy.fan.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 10/10] doc: update prog guide and sample app\n\tguid", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n doc/guides/prog_guide/vhost_lib.rst | 27 ++++++++++\n doc/guides/sample_app_ug/index.rst | 1 +\n doc/guides/sample_app_ug/vhost_crypto.rst | 83 +++++++++++++++++++++++++++++++\n 3 files changed, 111 insertions(+)\n create mode 100644 doc/guides/sample_app_ug/vhost_crypto.rst", "diff": "diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst\nindex 18227b6a3..f03b9aad8 100644\n--- a/doc/guides/prog_guide/vhost_lib.rst\n+++ b/doc/guides/prog_guide/vhost_lib.rst\n@@ -160,6 +160,33 @@ The following is an overview of some key Vhost API functions:\n \n Receives (dequeues) ``count`` packets from guest, and stored them at ``pkts``.\n \n+* ``rte_vhost_crypto_create(vid, cryptodev_id, sess_mempool, socket_id)``\n+\n+ As an extension of `new_device()`, this function adds virtio-crypto workload\n+ acceleration capability to the device. All crypto workload is processed by\n+ DPDK cryptodev with the device ID of `cryptodev_id`.\n+\n+* ``rte_vhost_crypto_free(vid)``\n+\n+ As an extension of `destroy_device()`, this function frees up the memory\n+ created in `rte_vhost_crypto_create()`.\n+\n+* ``rte_vhost_crypto_fetch_requests(vid, queue_id, ops, nb_ops)``\n+\n+ Receives (dequeues) `nb_ops` virtio-crypto requests from the virt-queue\n+ `queue_id` of the guest `vid`, converts them to DPDK Crypto Operations, and\n+ fills the `ops` with conversion results.\n+\n+* ``rte_vhost_crypto_finalize_requests(queue_id, ops, nb_ops, callfds, nb_fds)``\n+\n+ After the `ops` are dequeued from Cryptodev, updates the used ring\n+ of the virtqueue, copy back the data (if zero-copy is disabled), and updates\n+ the callfd numbers for the application to notify the guest(s).\n+\n+* ``rte_vhost_crypto_set_zero_copy(vid, enable_zc)``\n+ This function enables/disables the zero copy feature of the vhost crypto\n+ acceleration engine.\n+\n Vhost-user Implementations\n --------------------------\n \ndiff --git a/doc/guides/sample_app_ug/index.rst b/doc/guides/sample_app_ug/index.rst\nindex e87afda80..57e8354d4 100644\n--- a/doc/guides/sample_app_ug/index.rst\n+++ b/doc/guides/sample_app_ug/index.rst\n@@ -44,6 +44,7 @@ Sample Applications User Guides\n vmdq_dcb_forwarding\n vhost\n vhost_scsi\n+ vhost_crypto\n netmap_compatibility\n ip_pipeline\n test_pipeline\ndiff --git a/doc/guides/sample_app_ug/vhost_crypto.rst b/doc/guides/sample_app_ug/vhost_crypto.rst\nnew file mode 100644\nindex 000000000..5051064dc\n--- /dev/null\n+++ b/doc/guides/sample_app_ug/vhost_crypto.rst\n@@ -0,0 +1,83 @@\n+.. SPDX-License-Identifier: BSD-3-Clause\n+ Copyright(c) 2010-2014 Intel Corporation.\n+\n+\n+Vhost_Crypto Sample Application\n+===============================\n+\n+The vhost_crypto sample application implemented a simple Crypto device,\n+which used as the backend of Qemu vhost-user-crypto device. Similar with\n+vhost-user-net and vhost-user-scsi device, the sample application used\n+domain socket to communicate with Qemu, and the virtio ring was processed\n+by vhost_crypto sample application.\n+\n+Testing steps\n+-------------\n+\n+This section shows the steps how to start a VM with the crypto device as\n+fast data path for critical application.\n+\n+Compiling the Application\n+-------------------------\n+\n+To compile the sample application see :doc:`compiling`.\n+\n+The application is located in the ``examples`` sub-directory.\n+\n+Start the vhost_crypto example\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+.. code-block:: console\n+\n+ ./vhost_crypto [EAL options] -- [--socket-file PATH]\n+ [--cdev-id ID] [--cdev-queue-id ID] [--zero-copy] [--guest-polling]\n+\n+where,\n+\n+* socket-file PATH: the path of UNIX socket file to be created, multiple\n+ instances of this config item is supported. Upon absence of this item,\n+ the default socket-file `/tmp/vhost_crypto1.socket` is used.\n+\n+* cdev-id ID: the target DPDK Cryptodev's ID to process the actual crypto\n+ workload. Upon absence of this item the default value of `0` will be used.\n+ For details of DPDK Cryptodev, please refer to DPDK Cryptodev Library\n+ Programmers' Guide.\n+\n+* cdev-queue-id ID: the target DPDK Cryptodev's queue ID to process the\n+ actual crypto workload. Upon absence of this item the default value of `0`\n+ will be used. For details of DPDK Cryptodev, please refer to DPDK Cryptodev\n+ Library Programmers' Guide.\n+\n+* zero-copy: the presence of this item means the ZERO-COPY feature will be\n+ enabled. Otherwise it is disabled. PLEASE NOTE the ZERO-COPY feature is still\n+ in experimental stage and may cause the problem like segmentation fault. If\n+ the user wants to use LKCF in the guest, this feature shall be turned off.\n+\n+* guest-polling: the presence of this item means the application assumes the\n+ guest works in polling mode, thus will NOT notify the guest completion of\n+ processing.\n+\n+The application requires that crypto devices capable of performing\n+the specified crypto operation are available on application initialization.\n+This means that HW crypto device/s must be bound to a DPDK driver or\n+a SW crypto device/s (virtual crypto PMD) must be created (using --vdev).\n+\n+.. _vhost_crypto_app_run_vm:\n+\n+Start the VM\n+~~~~~~~~~~~~\n+\n+.. code-block:: console\n+\n+ qemu-system-x86_64 -machine accel=kvm \\\n+ -m $mem -object memory-backend-file,id=mem,size=$mem,\\\n+ mem-path=/dev/hugepages,share=on -numa node,memdev=mem \\\n+ -drive file=os.img,if=none,id=disk \\\n+ -device ide-hd,drive=disk,bootindex=0 \\\n+ -chardev socket,id={chardev_id},path={PATH} \\\n+ -object cryptodev-vhost-user,id={obj_id},chardev={chardev_id} \\\n+ -device virtio-crypto-pci,id={dev_id},cryptodev={obj_id} \\\n+ ...\n+\n+.. note::\n+ You must check whether your Qemu can support \"vhost-user-crypto\" or not.\n", "prefixes": [ "dpdk-dev", "v2", "10/10" ] }{ "id": 35508, "url": "