get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/74623/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 74623,
    "url": "https://patches.dpdk.org/api/patches/74623/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200722150153.3422450-2-patrick.fu@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": "<20200722150153.3422450-2-patrick.fu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200722150153.3422450-2-patrick.fu@intel.com",
    "date": "2020-07-22T15:01:52",
    "name": "[v2,1/2] doc: update guides for vhost async APIs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c871647586eeddad7b383abbd3fc4f61835ed547",
    "submitter": {
        "id": 1781,
        "url": "https://patches.dpdk.org/api/people/1781/?format=api",
        "name": "Patrick Fu",
        "email": "patrick.fu@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/20200722150153.3422450-2-patrick.fu@intel.com/mbox/",
    "series": [
        {
            "id": 11239,
            "url": "https://patches.dpdk.org/api/series/11239/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11239",
            "date": "2020-07-22T15:01:51",
            "name": "update docs for vhost async APIs",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/11239/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74623/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74623/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 EF258A0526;\n\tWed, 22 Jul 2020 17:04:58 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D05F61BFEB;\n\tWed, 22 Jul 2020 17:04:53 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id C700F1BE90\n for <dev@dpdk.org>; Wed, 22 Jul 2020 17:04:48 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Jul 2020 08:04:01 -0700",
            "from npg-dpdk-patrickfu-casc2.sh.intel.com ([10.67.119.92])\n by orsmga001.jf.intel.com with ESMTP; 22 Jul 2020 08:04:00 -0700"
        ],
        "IronPort-SDR": [
            "\n 69pETsPfWbrgV476gAkkI0gcgLwUBJBLKgXpOSYfAvfTdGJhe6CpcCvU8u6cy5EdpWMSgVE8UO\n u80IwPupGCmQ==",
            "\n 6IwXnRrSxSEJC/0v2LnipkvNHLRkQ0zx8rBAHbhNSnnD4pScym8wbdgjTC8WHvVcyglBKza0eU\n c1tRnqO4QHpQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9689\"; a=\"151666068\"",
            "E=Sophos;i=\"5.75,383,1589266800\"; d=\"scan'208\";a=\"151666068\"",
            "E=Sophos;i=\"5.75,383,1589266800\"; d=\"scan'208\";a=\"362737168\""
        ],
        "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 23:01:52 +0800",
        "Message-Id": "<20200722150153.3422450-2-patrick.fu@intel.com>",
        "X-Mailer": "git-send-email 2.18.4",
        "In-Reply-To": "<20200722150153.3422450-1-patrick.fu@intel.com>",
        "References": "<20200722105741.3421255-1-patrick.fu@intel.com>\n <20200722150153.3422450-1-patrick.fu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 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..b892eec67 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 free 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 copy 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 channel 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 and zerocopy data path, we force the VM memory to be\n+  pre-allocated at vhost lib when mapping the guest memory; and also we need\n+  to lock the memory to prevent pages being swapped out to disk.\n \n * Memory sharing\n \n",
    "prefixes": [
        "v2",
        "1/2"
    ]
}