get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45243,
    "url": "https://patches.dpdk.org/api/patches/45243/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/153782022417.27450.3107419616649123360.stgit@T460/",
    "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": "<153782022417.27450.3107419616649123360.stgit@T460>",
    "list_archive_url": "https://inbox.dpdk.org/dev/153782022417.27450.3107419616649123360.stgit@T460",
    "date": "2018-09-24T20:17:04",
    "name": "[v6,1/5] vhost: unify struct VhostUserMsg usage",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a833f48a01ca7c4e0df5ccc85d395a01f4e26eb3",
    "submitter": {
        "id": 1062,
        "url": "https://patches.dpdk.org/api/people/1062/?format=api",
        "name": "Nikolay Nikolaev",
        "email": "nicknickolaev@gmail.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/153782022417.27450.3107419616649123360.stgit@T460/mbox/",
    "series": [
        {
            "id": 1475,
            "url": "https://patches.dpdk.org/api/series/1475/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1475",
            "date": "2018-09-24T20:16:55",
            "name": "vhost: vhost_user.c code cleanup",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/1475/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45243/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45243/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CE2031B17F;\n\tMon, 24 Sep 2018 22:17:07 +0200 (CEST)",
            "from mail-wr1-f67.google.com (mail-wr1-f67.google.com\n\t[209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 08D751B170\n\tfor <dev@dpdk.org>; Mon, 24 Sep 2018 22:17:07 +0200 (CEST)",
            "by mail-wr1-f67.google.com with SMTP id t15so13077749wrx.1\n\tfor <dev@dpdk.org>; Mon, 24 Sep 2018 13:17:07 -0700 (PDT)",
            "from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id\n\te7-v6sm431977wrs.25.2018.09.24.13.17.05\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 24 Sep 2018 13:17:05 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:cc:date:message-id:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=pUfkQVMKM2Fv1RqwcmlLcUmN3XeXvKMFDpnlfeDA+38=;\n\tb=O4o55Solmb9InpE1cl+vBX40UfjfelKHd3Sz12hnt9OHaZrLjCKA23/0MUKYKnKvKU\n\tW2b3e5G2D4NDQ9qylEXgLAapQNm0EWZsWXk/j1fXR4rFrA4j+3ssdSaqLJIWiJhXzKpB\n\taxjGIMJOPI8MKEGjwWwmfsbVyFX0uwa3ybZSFA5d9Xr8iN3RxWi1jpkMwL9y9qTYp0EN\n\t7WhIl0TdUoNNZQKvC7ovySXD9nDwf55CVyGRiXIJpaHi04kas19ohoHQ3yUKWGT6fTBp\n\tpzoqPSrGqrAOvQ1trbD+ncTguBh/U9xGpzN5NXyZUzrwvDAfxcDCK5i9mEQIR1kyeWyh\n\t6PuQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=pUfkQVMKM2Fv1RqwcmlLcUmN3XeXvKMFDpnlfeDA+38=;\n\tb=GbgkguAkT3N4WtOsNDjTwr4Ykkp2Rm4ojZf9jgRM+9iz2OCyf15hRw7eXNvEid8nL5\n\tF9h2gel6+4aT8nu+Ojg4WT7kbx66vb3AgMGy+15sjbkQvnHFephWikgsISLx+VDimYqx\n\t0e4fojF0sIxNRvxIcVpY2f6FOyS2ESN0UqUlx1ITikkgQgHW1pd6gz2t2ThU4kL5mtLg\n\ttiRHtF71SOW1bb5c1QX7zHdianP9a2geSAbMQzOfKDPZbUYElD559h0kJC6gtdqWdXbV\n\trdp7EzFKY7FwtGSz0VKsnZJvXpw0gRaxxRahPV8AediSTKxboWNGO7AkiCo5XBYWKwtD\n\tffDA==",
        "X-Gm-Message-State": "ABuFfogGlbJGt9eEZTZe7dd4MyqzcXzPcmoRhY7czmVWr2dq5ZcBMVYe\n\tMWpyaJy0YeV7+wP82aX65LGMyYxHOFUQsQ==",
        "X-Google-Smtp-Source": "ACcGV616+fVaUwVGeBEZdE3t19zHTz8/rnFFdkhW72pMf0r4pemxrpnFBaBZ8GApRDTqzqOYPE0yhQ==",
        "X-Received": "by 2002:a5d:6a46:: with SMTP id\n\tt6-v6mr333024wrw.192.1537820226410; \n\tMon, 24 Sep 2018 13:17:06 -0700 (PDT)",
        "From": "Nikolay Nikolaev <nicknickolaev@gmail.com>",
        "To": "maxime.coquelin@redhat.com, anatoly.burakov@intel.com,\n\ttiwei.bie@intel.com, zhihong.wang@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Mon, 24 Sep 2018 23:17:04 +0300",
        "Message-ID": "<153782022417.27450.3107419616649123360.stgit@T460>",
        "In-Reply-To": "<153782013094.27450.17651924330876922486.stgit@T460>",
        "References": "<153782013094.27450.17651924330876922486.stgit@T460>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Subject": "[dpdk-dev] [PATCH v6 1/5] vhost: unify struct VhostUserMsg usage",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Do not use the typedef version of struct VhostUserMsg. Also unify the\nrelated parameter name.\n\nSigned-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>\n---\n lib/librte_vhost/vhost_user.c |   41 +++++++++++++++++++++--------------------\n 1 file changed, 21 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 63d145b2d..505db3bfc 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -250,7 +250,7 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features)\n  */\n static int\n vhost_user_set_vring_num(struct virtio_net *dev,\n-\t\t\t VhostUserMsg *msg)\n+\t\t\t struct VhostUserMsg *msg)\n {\n \tstruct vhost_virtqueue *vq = dev->virtqueue[msg->payload.state.index];\n \n@@ -611,7 +611,7 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)\n  * This function then converts these to our address space.\n  */\n static int\n-vhost_user_set_vring_addr(struct virtio_net **pdev, VhostUserMsg *msg)\n+vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg)\n {\n \tstruct vhost_virtqueue *vq;\n \tstruct vhost_vring_addr *addr = &msg->payload.addr;\n@@ -648,7 +648,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, VhostUserMsg *msg)\n  */\n static int\n vhost_user_set_vring_base(struct virtio_net *dev,\n-\t\t\t  VhostUserMsg *msg)\n+\t\t\t  struct VhostUserMsg *msg)\n {\n \tdev->virtqueue[msg->payload.state.index]->last_used_idx  =\n \t\t\tmsg->payload.state.num;\n@@ -780,10 +780,10 @@ vhost_memory_changed(struct VhostUserMemory *new,\n }\n \n static int\n-vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *pmsg)\n+vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg)\n {\n \tstruct virtio_net *dev = *pdev;\n-\tstruct VhostUserMemory memory = pmsg->payload.memory;\n+\tstruct VhostUserMemory memory = msg->payload.memory;\n \tstruct rte_vhost_mem_region *reg;\n \tvoid *mmap_addr;\n \tuint64_t mmap_size;\n@@ -804,7 +804,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *pmsg)\n \t\t\t\"(%d) memory regions not changed\\n\", dev->vid);\n \n \t\tfor (i = 0; i < memory.nregions; i++)\n-\t\t\tclose(pmsg->fds[i]);\n+\t\t\tclose(msg->fds[i]);\n \n \t\treturn 0;\n \t}\n@@ -845,7 +845,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *pmsg)\n \tdev->mem->nregions = memory.nregions;\n \n \tfor (i = 0; i < memory.nregions; i++) {\n-\t\tfd  = pmsg->fds[i];\n+\t\tfd  = msg->fds[i];\n \t\treg = &dev->mem->regions[i];\n \n \t\treg->guest_phys_addr = memory.regions[i].guest_phys_addr;\n@@ -994,16 +994,16 @@ virtio_is_ready(struct virtio_net *dev)\n }\n \n static void\n-vhost_user_set_vring_call(struct virtio_net *dev, struct VhostUserMsg *pmsg)\n+vhost_user_set_vring_call(struct virtio_net *dev, struct VhostUserMsg *msg)\n {\n \tstruct vhost_vring_file file;\n \tstruct vhost_virtqueue *vq;\n \n-\tfile.index = pmsg->payload.u64 & VHOST_USER_VRING_IDX_MASK;\n-\tif (pmsg->payload.u64 & VHOST_USER_VRING_NOFD_MASK)\n+\tfile.index = msg->payload.u64 & VHOST_USER_VRING_IDX_MASK;\n+\tif (msg->payload.u64 & VHOST_USER_VRING_NOFD_MASK)\n \t\tfile.fd = VIRTIO_INVALID_EVENTFD;\n \telse\n-\t\tfile.fd = pmsg->fds[0];\n+\t\tfile.fd = msg->fds[0];\n \tRTE_LOG(INFO, VHOST_CONFIG,\n \t\t\"vring call idx:%d file:%d\\n\", file.index, file.fd);\n \n@@ -1015,17 +1015,17 @@ vhost_user_set_vring_call(struct virtio_net *dev, struct VhostUserMsg *pmsg)\n }\n \n static int\n-vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *pmsg)\n+vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg)\n {\n \tstruct vhost_vring_file file;\n \tstruct vhost_virtqueue *vq;\n \tstruct virtio_net *dev = *pdev;\n \n-\tfile.index = pmsg->payload.u64 & VHOST_USER_VRING_IDX_MASK;\n-\tif (pmsg->payload.u64 & VHOST_USER_VRING_NOFD_MASK)\n+\tfile.index = msg->payload.u64 & VHOST_USER_VRING_IDX_MASK;\n+\tif (msg->payload.u64 & VHOST_USER_VRING_NOFD_MASK)\n \t\tfile.fd = VIRTIO_INVALID_EVENTFD;\n \telse\n-\t\tfile.fd = pmsg->fds[0];\n+\t\tfile.fd = msg->fds[0];\n \tRTE_LOG(INFO, VHOST_CONFIG,\n \t\t\"vring kick idx:%d file:%d\\n\", file.index, file.fd);\n \n@@ -1073,7 +1073,7 @@ free_zmbufs(struct vhost_virtqueue *vq)\n  */\n static int\n vhost_user_get_vring_base(struct virtio_net *dev,\n-\t\t\t  VhostUserMsg *msg)\n+\t\t\t  struct VhostUserMsg *msg)\n {\n \tstruct vhost_virtqueue *vq = dev->virtqueue[msg->payload.state.index];\n \n@@ -1126,7 +1126,7 @@ vhost_user_get_vring_base(struct virtio_net *dev,\n  */\n static int\n vhost_user_set_vring_enable(struct virtio_net *dev,\n-\t\t\t    VhostUserMsg *msg)\n+\t\t\t    struct VhostUserMsg *msg)\n {\n \tint enable = (int)msg->payload.state.num;\n \tint index = (int)msg->payload.state.index;\n@@ -1485,7 +1485,8 @@ send_vhost_slave_message(struct virtio_net *dev, struct VhostUserMsg *msg,\n  * Allocate a queue pair if it hasn't been allocated yet\n  */\n static int\n-vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev, VhostUserMsg *msg)\n+vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,\n+\t\t\tstruct VhostUserMsg *msg)\n {\n \tuint16_t vring_idx;\n \n@@ -1818,9 +1819,9 @@ vhost_user_msg_handler(int vid, int fd)\n }\n \n static int process_slave_message_reply(struct virtio_net *dev,\n-\t\t\t\t       const VhostUserMsg *msg)\n+\t\t\t\t       const struct VhostUserMsg *msg)\n {\n-\tVhostUserMsg msg_reply;\n+\tstruct VhostUserMsg msg_reply;\n \tint ret;\n \n \tif ((msg->flags & VHOST_USER_NEED_REPLY) == 0)\n",
    "prefixes": [
        "v6",
        "1/5"
    ]
}