get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26346,
    "url": "http://patches.dpdk.org/api/patches/26346/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170704094922.11405-9-maxime.coquelin@redhat.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": "<20170704094922.11405-9-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170704094922.11405-9-maxime.coquelin@redhat.com",
    "date": "2017-07-04T09:49:11",
    "name": "[dpdk-dev,RFC,08/19] vhost: initialize vrings IOTLB caches",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1029fe6f41630362d6389b029f69088d8de4983a",
    "submitter": {
        "id": 512,
        "url": "http://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 355,
        "url": "http://patches.dpdk.org/api/users/355/?format=api",
        "username": "yliu",
        "first_name": "Yuanhan",
        "last_name": "Liu",
        "email": "yuanhan.liu@linux.intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20170704094922.11405-9-maxime.coquelin@redhat.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/26346/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/26346/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 781167CAA;\n\tTue,  4 Jul 2017 11:50:10 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id C302E58EC\n\tfor <dev@dpdk.org>; Tue,  4 Jul 2017 11:50:08 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 07F4FC05FFFA;\n\tTue,  4 Jul 2017 09:50:08 +0000 (UTC)",
            "from localhost.localdomain (ovpn-112-47.ams2.redhat.com\n\t[10.36.112.47])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id BA55563F7E;\n\tTue,  4 Jul 2017 09:50:01 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 07F4FC05FFFA",
        "Authentication-Results": [
            "ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=pass smtp.mailfrom=maxime.coquelin@redhat.com"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 mx1.redhat.com 07F4FC05FFFA",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org,\n\tYuanhan Liu <yliu@fridaylinux.org>",
        "Cc": "mst@redhat.com, vkaplans@redhat.com, jasowang@redhat.com,\n\tjfreiman@redhat.com, Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Tue,  4 Jul 2017 11:49:11 +0200",
        "Message-Id": "<20170704094922.11405-9-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20170704094922.11405-1-maxime.coquelin@redhat.com>",
        "References": "<20170704094922.11405-1-maxime.coquelin@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 09:50:08 +0000 (UTC)",
        "Subject": "[dpdk-dev] [RFC 08/19] vhost: initialize vrings IOTLB caches",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "The per-virtqueue IOTLB cache init is done at virtqueue\ninit time. init_vring_queue() now takes vring id as parameter,\nso that the IOTLB cache mempool name can be generated.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/librte_vhost/vhost.c | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c\nindex 5ca4de4..06b8f20 100644\n--- a/lib/librte_vhost/vhost.c\n+++ b/lib/librte_vhost/vhost.c\n@@ -48,6 +48,7 @@\n #include <rte_rwlock.h>\n #include <rte_vhost.h>\n \n+#include \"iotlb.h\"\n #include \"vhost.h\"\n \n struct vhost_device {\n@@ -191,13 +192,16 @@ free_device(struct virtio_net *dev)\n }\n \n static void\n-init_vring_queue(struct vhost_virtqueue *vq)\n+init_vring_queue(struct virtio_net *dev, uint32_t vring_idx)\n {\n+\tstruct vhost_virtqueue *vq = dev->virtqueue[vring_idx];\n+\n \tmemset(vq, 0, sizeof(struct vhost_virtqueue));\n \n \tvq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;\n \tvq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;\n \n+\tvhost_user_iotlb_init(dev, vring_idx);\n \t/* Backends are set to -1 indicating an inactive device. */\n \tvq->backend = -1;\n \n@@ -211,12 +215,13 @@ init_vring_queue(struct vhost_virtqueue *vq)\n }\n \n static void\n-reset_vring_queue(struct vhost_virtqueue *vq)\n+reset_vring_queue(struct virtio_net *dev, uint32_t vring_idx)\n {\n+\tstruct vhost_virtqueue *vq = dev->virtqueue[vring_idx];\n \tint callfd;\n \n \tcallfd = vq->callfd;\n-\tinit_vring_queue(vq);\n+\tinit_vring_queue(dev, vring_idx);\n \tvq->callfd = callfd;\n }\n \n@@ -233,7 +238,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)\n \t}\n \n \tdev->virtqueue[vring_idx] = vq;\n-\tinit_vring_queue(vq);\n+\tinit_vring_queue(dev, vring_idx);\n \n \tdev->nr_vring += 1;\n \n@@ -255,7 +260,7 @@ reset_device(struct virtio_net *dev)\n \tdev->flags = 0;\n \n \tfor (i = 0; i < dev->nr_vring; i++)\n-\t\treset_vring_queue(dev->virtqueue[i]);\n+\t\treset_vring_queue(dev, i);\n }\n \n /*\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "08/19"
    ]
}