Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/74616/?format=api
http://patches.dpdk.org/api/patches/74616/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200722105741.3421255-2-patrick.fu@intel.com/", "project": { "id": 1, "url": "http://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": "<20200722105741.3421255-2-patrick.fu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200722105741.3421255-2-patrick.fu@intel.com", "date": "2020-07-22T10:57:40", "name": "[v1,1/2] doc: update guides for vhost async APIs", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f0e729b25809731a96a67c14f7f10565790db2be", "submitter": { "id": 1781, "url": "http://patches.dpdk.org/api/people/1781/?format=api", "name": "Patrick Fu", "email": "patrick.fu@intel.com" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200722105741.3421255-2-patrick.fu@intel.com/mbox/", "series": [ { "id": 11235, "url": "http://patches.dpdk.org/api/series/11235/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11235", "date": "2020-07-22T10:57:39", "name": "update docs for vhost async API", "version": 1, "mbox": "http://patches.dpdk.org/series/11235/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/74616/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/74616/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CA5F2A0526;\n\tWed, 22 Jul 2020 13:00:11 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0DDF71C012;\n\tWed, 22 Jul 2020 13:00:09 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 88FD01C010\n for <dev@dpdk.org>; Wed, 22 Jul 2020 13:00:07 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Jul 2020 04:00:05 -0700", "from npg-dpdk-patrickfu-casc2.sh.intel.com ([10.67.119.92])\n by orsmga007.jf.intel.com with ESMTP; 22 Jul 2020 04:00:04 -0700" ], "IronPort-SDR": [ "\n RVSdVnEPm1ZgMf23nbwbl7TgdDr/eCs+Tyjxv2gGlNuZ3oTx2h5JjHRw0C1mhzNz15ozRe5AoX\n Uqj1K9Gol+Vw==", "\n +j1Ux1ZOlM0L0sw1R/fMEAjLpMMeGQBavrkXKXqncfhwtiaohmjnDGrYPlKRJFxMIWqxZnWgnQ\n gL0mRlOBMrAA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9689\"; a=\"148240087\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"148240087\"", "E=Sophos;i=\"5.75,381,1589266800\"; d=\"scan'208\";a=\"328178835\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "patrick.fu@intel.com", "To": "dev@dpdk.org,\n\tmaxime.coquelin@redhat.com,\n\tchenbo.xia@intel.com", "Cc": "Patrick Fu <patrick.fu@intel.com>", "Date": "Wed, 22 Jul 2020 18:57:40 +0800", "Message-Id": "<20200722105741.3421255-2-patrick.fu@intel.com>", "X-Mailer": "git-send-email 2.18.4", "In-Reply-To": "<20200722105741.3421255-1-patrick.fu@intel.com>", "References": "<20200722105741.3421255-1-patrick.fu@intel.com>", "Subject": "[dpdk-dev] [PATCH v1 1/2] doc: update guides for vhost async APIs", "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://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Patrick Fu <patrick.fu@intel.com>\n\nUpdate vhost guides to document vhost async APIs\n\nSigned-off-by: Patrick Fu <patrick.fu@intel.com>\n---\n doc/guides/prog_guide/vhost_lib.rst | 86 ++++++++++++++++++++++++++---\n 1 file changed, 77 insertions(+), 9 deletions(-)", "diff": "diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst\nindex db921f922..cce8b6ae7 100644\n--- a/doc/guides/prog_guide/vhost_lib.rst\n+++ b/doc/guides/prog_guide/vhost_lib.rst\n@@ -147,6 +147,21 @@ The following is an overview of some key Vhost API functions:\n \n It is disabled by default.\n \n+ - ``RTE_VHOST_USER_ASYNC_COPY``\n+\n+ Asynchronous data path will be enabled when this flag is set. Async data\n+ path allows applications to register async copy devices (typically\n+ hardware DMA channels) to the vhost queues. Vhost leverages the copy\n+ device registered to offload CPU from memory copy operations. A set of\n+ async data path APIs are defined for DPDK applications to make use of\n+ the async capability. Only packets enqueued/dequeued by async APIs are\n+ processed through the async data path.\n+\n+ Currently this feature is only implemented on split ring enqueue data\n+ path.\n+\n+ It is disabled by default.\n+\n * ``rte_vhost_driver_set_features(path, features)``\n \n This function sets the feature bits the vhost-user driver supports. The\n@@ -235,6 +250,59 @@ The following is an overview of some key Vhost API functions:\n \n Enable or disable zero copy feature of the vhost crypto backend.\n \n+* ``rte_vhost_async_channel_register(vid, queue_id, features, ops)``\n+\n+ Register a vhost queue with async copy device channel.\n+ Following device ``features`` must be specified together with the\n+ registration:\n+\n+ * ``async_inorder``\n+\n+ Async copy device can guarantee the ordering of copy completion\n+ sequence. Copies are completed in the same order with that at\n+ the submission time.\n+\n+ Currently, only ``async_inorder`` capable device is supported by vhost.\n+\n+ * ``async_threshold``\n+\n+ The copy length (in bytes) below which CPU copy will be used even if\n+ applications call async vhost APIs to enqueue/dequeue data.\n+\n+ Typical value is 512~1024 depending on the async device capability.\n+\n+ Applications must provide following ``ops`` callbacks for vhost lib to\n+ work with the async copye devices:\n+\n+ * ``transfer_data(vid, queue_id, descs, opaque_data, count)``\n+\n+ vhost invokes this function to submit copy data to the async devices.\n+ For non-async_inorder capable devices, ``opaque_data`` could be used\n+ for identifying the completed packets.\n+\n+ * ``check_completed_copies(vid, queue_id, opaque_data, max_packets)``\n+\n+ vhost invokes this function to get the copy data completed by async\n+ devices.\n+\n+* ``rte_vhost_async_channel_unregister(vid, queue_id)``\n+\n+ Unregister the async copy device from a vhost queue.\n+\n+* ``rte_vhost_submit_enqueue_burst(vid, queue_id, pkts, count)``\n+\n+ Submit an enqueue request to transmit ``count`` packets from host to guest\n+ by async data path. Enqueue is not guaranteed to finish upon the return of\n+ this API call.\n+\n+ Applications must not free the packets submitted for enqueue until the\n+ packets are completed.\n+\n+* ``rte_vhost_poll_enqueue_completed(vid, queue_id, pkts, count)``\n+\n+ Poll enqueue completion status from async data path. Completed packets\n+ are returned to applications through ``pkts``.\n+\n Vhost-user Implementations\n --------------------------\n \n@@ -294,16 +362,16 @@ Guest memory requirement\n \n * Memory pre-allocation\n \n- For non-zerocopy, guest memory pre-allocation is not a must. This can help\n- save of memory. If users really want the guest memory to be pre-allocated\n- (e.g., for performance reason), we can add option ``-mem-prealloc`` when\n- starting QEMU. Or, we can lock all memory at vhost side which will force\n- memory to be allocated when mmap at vhost side; option --mlockall in\n- ovs-dpdk is an example in hand.\n+ For non-zerocopy non-async data path, guest memory pre-allocation is not a\n+ must. This can help save of memory. If users really want the guest memory\n+ to be pre-allocated (e.g., for performance reason), we can add option\n+ ``-mem-prealloc`` when starting QEMU. Or, we can lock all memory at vhost\n+ side which will force memory to be allocated when mmap at vhost side;\n+ option --mlockall in ovs-dpdk is an example in hand.\n \n- For zerocopy, we force the VM memory to be pre-allocated at vhost lib when\n- mapping the guest memory; and also we need to lock the memory to prevent\n- pages being swapped out to disk.\n+ For async data path or zerocopy, we force the VM memory to be pre-allocated\n+ at vhost lib when mapping the guest memory; and also we need to lock the\n+ memory to prevent pages being swapped out to disk.\n \n * Memory sharing\n \n", "prefixes": [ "v1", "1/2" ] }{ "id": 74616, "url": "