get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 16037,
    "url": "http://patchwork.dpdk.org/api/patches/16037/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1474604007-5221-7-git-send-email-yuanhan.liu@linux.intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1474604007-5221-7-git-send-email-yuanhan.liu@linux.intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1474604007-5221-7-git-send-email-yuanhan.liu@linux.intel.com",
    "date": "2016-09-23T04:13:26",
    "name": "[dpdk-dev,v2,6/7] examples/vhost: add an option to enable dequeue zero copy",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "56f7dfc7aa2e0b838166c97beb40736f46aa8cfc",
    "submitter": {
        "id": 307,
        "url": "http://patchwork.dpdk.org/api/people/307/?format=api",
        "name": "Yuanhan Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "delegate": {
        "id": 355,
        "url": "http://patchwork.dpdk.org/api/users/355/?format=api",
        "username": "yliu",
        "first_name": "Yuanhan",
        "last_name": "Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1474604007-5221-7-git-send-email-yuanhan.liu@linux.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/16037/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/16037/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 94BFC6CB9;\n\tFri, 23 Sep 2016 06:13:14 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 089265927\n\tfor <dev@dpdk.org>; Fri, 23 Sep 2016 06:13:04 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga102.fm.intel.com with ESMTP; 22 Sep 2016 21:13:04 -0700",
            "from yliu-dev.sh.intel.com ([10.239.67.162])\n\tby fmsmga005.fm.intel.com with ESMTP; 22 Sep 2016 21:13:04 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.30,380,1470726000\"; d=\"scan'208\";a=\"12384600\"",
        "From": "Yuanhan Liu <yuanhan.liu@linux.intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n\tYuanhan Liu <yuanhan.liu@linux.intel.com>",
        "Date": "Fri, 23 Sep 2016 12:13:26 +0800",
        "Message-Id": "<1474604007-5221-7-git-send-email-yuanhan.liu@linux.intel.com>",
        "X-Mailer": "git-send-email 1.9.0",
        "In-Reply-To": "<1474604007-5221-1-git-send-email-yuanhan.liu@linux.intel.com>",
        "References": "<1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com>\n\t<1474604007-5221-1-git-send-email-yuanhan.liu@linux.intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 6/7] examples/vhost: add an option to enable\n\tdequeue zero copy",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "Add an option, --dequeue-zero-copy, to enable dequeue zero copy.\n\nOne thing worth noting while using dequeue zero copy is the nb_tx_desc\nhas to be small enough so that the eth driver will hit the mbuf free\nthreshold easily and thus free mbuf more frequently.\n\nThe reason behind that is, when dequeue zero copy is enabled, guest Tx\nused vring will be updated only when corresponding mbuf is freed. If mbuf\nis not freed frequently, the guest Tx vring could be starved.\n\nSigned-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>\n---\n examples/vhost/main.c | 19 ++++++++++++++++++-\n 1 file changed, 18 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/examples/vhost/main.c b/examples/vhost/main.c\nindex 195b1db..a79ca5a 100644\n--- a/examples/vhost/main.c\n+++ b/examples/vhost/main.c\n@@ -127,6 +127,7 @@ static uint32_t enable_tx_csum;\n static uint32_t enable_tso;\n \n static int client_mode;\n+static int dequeue_zero_copy;\n \n /* Specify timeout (in useconds) between retries on RX. */\n static uint32_t burst_rx_delay_time = BURST_RX_WAIT_US;\n@@ -294,6 +295,17 @@ port_init(uint8_t port)\n \n \trx_ring_size = RTE_TEST_RX_DESC_DEFAULT;\n \ttx_ring_size = RTE_TEST_TX_DESC_DEFAULT;\n+\n+\t/*\n+\t * When dequeue zero copy is enabled, guest Tx used vring will be\n+\t * updated only when corresponding mbuf is freed. Thus, the nb_tx_desc\n+\t * (tx_ring_size here) must be small enough so that the driver will\n+\t * hit the free threshold easily and free mbufs timely. Otherwise,\n+\t * guest Tx vring would be starved.\n+\t */\n+\tif (dequeue_zero_copy)\n+\t\ttx_ring_size = 64;\n+\n \ttx_rings = (uint16_t)rte_lcore_count();\n \n \tretval = validate_num_devices(MAX_DEVICES);\n@@ -470,7 +482,8 @@ us_vhost_usage(const char *prgname)\n \t\"\t\t--socket-file: The path of the socket file.\\n\"\n \t\"\t\t--tx-csum [0|1] disable/enable TX checksum offload.\\n\"\n \t\"\t\t--tso [0|1] disable/enable TCP segment offload.\\n\"\n-\t\"\t\t--client register a vhost-user socket as client mode.\\n\",\n+\t\"\t\t--client register a vhost-user socket as client mode.\\n\"\n+\t\"\t\t--dequeue-zero-copy enables Tx zero copy\\n\",\n \t       prgname);\n }\n \n@@ -495,6 +508,7 @@ us_vhost_parse_args(int argc, char **argv)\n \t\t{\"tx-csum\", required_argument, NULL, 0},\n \t\t{\"tso\", required_argument, NULL, 0},\n \t\t{\"client\", no_argument, &client_mode, 1},\n+\t\t{\"dequeue-zero-copy\", no_argument, &dequeue_zero_copy, 1},\n \t\t{NULL, 0, 0, 0},\n \t};\n \n@@ -1501,6 +1515,9 @@ main(int argc, char *argv[])\n \tif (client_mode)\n \t\tflags |= RTE_VHOST_USER_CLIENT;\n \n+\tif (dequeue_zero_copy)\n+\t\tflags |= RTE_VHOST_USER_DEQUEUE_ZERO_COPY;\n+\n \t/* Register vhost user driver to handle vhost messages. */\n \tfor (i = 0; i < nb_sockets; i++) {\n \t\tret = rte_vhost_driver_register\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "6/7"
    ]
}