get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 106616,
    "url": "http://patchwork.dpdk.org/api/patches/106616/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220127145655.558029-6-maxime.coquelin@redhat.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": "<20220127145655.558029-6-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220127145655.558029-6-maxime.coquelin@redhat.com",
    "date": "2022-01-27T14:56:55",
    "name": "[5/5] vhost: add statistics for IOTLB",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "72ca4140fb1fc5b8623bd325bb8956bcdfe67c20",
    "submitter": {
        "id": 512,
        "url": "http://patchwork.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patchwork.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220127145655.558029-6-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 21401,
            "url": "http://patchwork.dpdk.org/api/series/21401/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21401",
            "date": "2022-01-27T14:56:50",
            "name": "vhost: introduce per-virtqueue stats API",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/21401/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/106616/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/106616/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 47AC9A04A6;\n\tThu, 27 Jan 2022 15:58:03 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AE7D14282C;\n\tThu, 27 Jan 2022 15:57:51 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 9B03E42808\n for <dev@dpdk.org>; Thu, 27 Jan 2022 15:57:48 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-483-7R3blQClNyCAyu4dR7XZ9g-1; Thu, 27 Jan 2022 09:57:47 -0500",
            "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com\n [10.5.11.14])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 55875100D06D;\n Thu, 27 Jan 2022 14:57:40 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.39.208.34])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 1D599798AD;\n Thu, 27 Jan 2022 14:57:38 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1643295468;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=5uf9Ac0fTNu1WqEp3Kvvn2Xt8BAC8cNJFoS9obF6lHM=;\n b=fjnGpFwwpZVTdqG18qy/cZl/d1vKe+MKKVC/Ay6Z6SRIE6BAsFlEKK+/99HebA25u0qf3f\n PD417mebYFpDcPbvAmAGQnQMhZypqJl+kT9XFNhW755oQ0YhelBRmQ6xB/5t21TzNFTaQU\n 4m2CDUg6Ur2FHMcsD28msWt7nRC6iL0=",
        "X-MC-Unique": "7R3blQClNyCAyu4dR7XZ9g-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org,\n\tchenbo.xia@intel.com,\n\tdavid.marchand@redhat.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[PATCH 5/5] vhost: add statistics for IOTLB",
        "Date": "Thu, 27 Jan 2022 15:56:55 +0100",
        "Message-Id": "<20220127145655.558029-6-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20220127145655.558029-1-maxime.coquelin@redhat.com>",
        "References": "<20220127145655.558029-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "This patch adds statistics for IOTLB hits and misses.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/vhost.c | 10 +++++++++-\n lib/vhost/vhost.h |  3 +++\n 2 files changed, 12 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex 2d0d9e7f51..bda974d34f 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -47,6 +47,8 @@ static const struct vhost_vq_stats_name_off vhost_vq_stat_strings[] = {\n \t{\"size_1024_1518_packets\", offsetof(struct vhost_virtqueue, stats.size_bins[6])},\n \t{\"size_1519_max_packets\",  offsetof(struct vhost_virtqueue, stats.size_bins[7])},\n \t{\"guest_notifications\",    offsetof(struct vhost_virtqueue, stats.guest_notifications)},\n+\t{\"iotlb_hits\",             offsetof(struct vhost_virtqueue, stats.iotlb_hits)},\n+\t{\"iotlb_misses\",           offsetof(struct vhost_virtqueue, stats.iotlb_misses)},\n };\n \n #define VHOST_NB_VQ_STATS RTE_DIM(vhost_vq_stat_strings)\n@@ -64,8 +66,14 @@ __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \ttmp_size = *size;\n \n \tvva = vhost_user_iotlb_cache_find(vq, iova, &tmp_size, perm);\n-\tif (tmp_size == *size)\n+\tif (tmp_size == *size) {\n+\t\tif (dev->flags & VIRTIO_DEV_STATS_ENABLED)\n+\t\t\tvq->stats.iotlb_hits++;\n \t\treturn vva;\n+\t}\n+\n+\tif (dev->flags & VIRTIO_DEV_STATS_ENABLED)\n+\t\tvq->stats.iotlb_misses++;\n \n \tiova += tmp_size;\n \ndiff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h\nindex 0c7669e8c9..8c078decab 100644\n--- a/lib/vhost/vhost.h\n+++ b/lib/vhost/vhost.h\n@@ -132,6 +132,9 @@ struct virtqueue_stats {\n \t/* Size bins in array as RFC 2819, undersized [0], 64 [1], etc */\n \tuint64_t size_bins[8];\n \tuint64_t guest_notifications;\n+\tuint64_t iotlb_hits;\n+\tuint64_t iotlb_misses;\n+\tuint64_t iotlb_errors;\n };\n \n /**\n",
    "prefixes": [
        "5/5"
    ]
}