get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7104,
    "url": "https://patches.dpdk.org/api/patches/7104/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1442823374-5233-1-git-send-email-huawei.xie@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": "<1442823374-5233-1-git-send-email-huawei.xie@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1442823374-5233-1-git-send-email-huawei.xie@intel.com",
    "date": "2015-09-21T08:16:14",
    "name": "[dpdk-dev] vhost: vhost injects interrupts to guest for each packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "cd695c34fd2df419c3271991a6c4e9e5540874ff",
    "submitter": {
        "id": 16,
        "url": "https://patches.dpdk.org/api/people/16/?format=api",
        "name": "Huawei Xie",
        "email": "huawei.xie@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1442823374-5233-1-git-send-email-huawei.xie@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7104/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7104/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 8DC3C2A07;\n\tMon, 21 Sep 2015 10:16:24 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 09D2F11C5\n\tfor <dev@dpdk.org>; Mon, 21 Sep 2015 10:16:22 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 21 Sep 2015 01:16:21 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 21 Sep 2015 01:16:20 -0700",
            "from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com\n\t[10.239.29.90])\n\tby shvmail01.sh.intel.com with ESMTP id t8L8GI5X010526;\n\tMon, 21 Sep 2015 16:16:18 +0800",
            "from shecgisg003.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t8L8GGcc005290; Mon, 21 Sep 2015 16:16:18 +0800",
            "(from hxie5@localhost)\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t8L8GFf9005264; \n\tMon, 21 Sep 2015 16:16:15 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,566,1437462000\"; d=\"scan'208\";a=\"565578808\"",
        "From": "Huawei Xie <huawei.xie@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 21 Sep 2015 16:16:14 +0800",
        "Message-Id": "<1442823374-5233-1-git-send-email-huawei.xie@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Subject": "[dpdk-dev] [PATCH] vhost: vhost injects interrupts to guest for\n\teach packet",
        "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": "In merge-able RX path, vhost injects interrupts to guest for each packet.\nThis should degrade performance a lot.\nThis patch fixes this issue by injecting one interrupt for a batch of packets. \n\nSigned-off-by: Huawei Xie <huawei.xie@intel.com>\n---\n lib/librte_vhost/vhost_rxtx.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c\nindex 0d07338..9d3165a 100644\n--- a/lib/librte_vhost/vhost_rxtx.c\n+++ b/lib/librte_vhost/vhost_rxtx.c\n@@ -496,7 +496,7 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,\n \t\t\t\t\t\t\"to get enough desc from \"\n \t\t\t\t\t\t\"vring\\n\",\n \t\t\t\t\t\tdev->device_fh);\n-\t\t\t\t\treturn pkt_idx;\n+\t\t\t\t\tgoto merge_rx_exit;\n \t\t\t\t} else {\n \t\t\t\t\tupdate_secure_len(vq, res_cur_idx, &secure_len, &vec_idx);\n \t\t\t\t\tres_cur_idx++;\n@@ -523,7 +523,10 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,\n \n \t\t*(volatile uint16_t *)&vq->used->idx += entry_success;\n \t\tvq->last_used_idx = res_cur_idx;\n+\t}\n \n+merge_rx_exit:\n+\tif (likely(pkt_idx)) {\n \t\t/* flush used->idx update before we read avail->flags. */\n \t\trte_mb();\n \n@@ -532,7 +535,7 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,\n \t\t\teventfd_write((int)vq->callfd, 1);\n \t}\n \n-\treturn count;\n+\treturn pkt_idx;\n }\n \n uint16_t\n",
    "prefixes": [
        "dpdk-dev"
    ]
}