get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44750,
    "url": "http://patches.dpdk.org/api/patches/44750/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/153698882681.23049.10483393218056672951.stgit@T460/",
    "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": "<153698882681.23049.10483393218056672951.stgit@T460>",
    "list_archive_url": "https://inbox.dpdk.org/dev/153698882681.23049.10483393218056672951.stgit@T460",
    "date": "2018-09-15T05:20:26",
    "name": "[v3,1/5] vhost: unify VhostUserMsg usage",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "79592362f398aea30ad629784c3be6d7804dc423",
    "submitter": {
        "id": 1062,
        "url": "http://patches.dpdk.org/api/people/1062/?format=api",
        "name": "Nikolay Nikolaev",
        "email": "nicknickolaev@gmail.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/153698882681.23049.10483393218056672951.stgit@T460/mbox/",
    "series": [
        {
            "id": 1332,
            "url": "http://patches.dpdk.org/api/series/1332/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1332",
            "date": "2018-09-15T05:20:19",
            "name": "vhost: vhost_user.c code cleanup",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/1332/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44750/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44750/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 EAF024C94;\n\tSat, 15 Sep 2018 07:20:30 +0200 (CEST)",
            "from mail-wm1-f65.google.com (mail-wm1-f65.google.com\n\t[209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 7CB1F2BD5\n\tfor <dev@dpdk.org>; Sat, 15 Sep 2018 07:20:29 +0200 (CEST)",
            "by mail-wm1-f65.google.com with SMTP id n11-v6so3940820wmc.2\n\tfor <dev@dpdk.org>; Fri, 14 Sep 2018 22:20:29 -0700 (PDT)",
            "from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id\n\tf6-v6sm6323398wrr.68.2018.09.14.22.20.27\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 14 Sep 2018 22:20:28 -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=8taa9XgI5YYGxpKLquS4UvJx3nBqTBYDZP5xcINngKE=;\n\tb=pufiPCIpTBazefzzOv6RfY9REzjo0cXa9GAQeI2kjnvRNJV6PHYXA8XL3bfTqcVFfM\n\tTsSsoaDeSaREZAQGxmLoj/Ch/Rbq5ZbjWArQTDXEfqSFAKUvlRVaMjm6I7210KGKNWBf\n\tiQ6uk+AZYfsU59TmPOMFxiIP+70uj1cHk7NRne1YD3Hf6xEanCEgTxC3yBQus55YQ0tF\n\tr/UDEiVbfVxBukWtKIc7hO3j65EFgMjwSdAW3D9GqeSzNPXMmOd0m+qNlx+9aq7LEr0j\n\tggXpxea4qRYjBorK+oYBI3km2khrAVnLUDEdPg6Ztqo7O6jRf2mF/GXOmwOr+PIC1Z55\n\tJiQQ==",
        "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=8taa9XgI5YYGxpKLquS4UvJx3nBqTBYDZP5xcINngKE=;\n\tb=i1qvYrJbRnLk2EDWyKwnycpInMllMMROLccqBj8+AowbOObPiC7cLocBoUzldqUohY\n\takDqmlhhkzYa65eELL7NCY+8IcFvgDmP7qxM8cDqE9ys8WdLHEltN7pX5iykujjGB3zX\n\tnEQd89W2RYmt1Dq2VdRF6JTO9DGx6QfRBcuP0B6RG0zOFY9ltbvZ0d5ichsQoot7Qps8\n\taXzjxbkExZ8b67ZuhnH4dw+2/VwostoZDOCvjJdwgpQpDPqXPd2pADffyUHAKFw8vbs1\n\tjPm4Y9KPf43LbmfCHrTemjyAX5enGV/02O0hhR6k8s/f9DqP5S04DauJH7GknEF7fhHO\n\tC55Q==",
        "X-Gm-Message-State": "APzg51C/DHLPuNMWh1mWPOS297PCSzg8WaqJLJoIBY+J8vR9X8pj4YKD\n\tzX/5pMqLNU7Fzddh5STXjvBOkoDGKPG/cg==",
        "X-Google-Smtp-Source": "ANB0VdYf5fUHuWEL5CLeMqOWDpc3tJBO3MXIaisxmEajK+OyYfxX4GJstzkwFcKHEjY9P7HNEv6U9Q==",
        "X-Received": "by 2002:a1c:578a:: with SMTP id\n\tl132-v6mr4455588wmb.16.1536988828892; \n\tFri, 14 Sep 2018 22:20:28 -0700 (PDT)",
        "From": "Nikolay Nikolaev <nicknickolaev@gmail.com>",
        "To": "maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Sat, 15 Sep 2018 08:20:26 +0300",
        "Message-ID": "<153698882681.23049.10483393218056672951.stgit@T460>",
        "In-Reply-To": "<153698873346.23049.10966616323159180622.stgit@T460>",
        "References": "<153698873346.23049.10966616323159180622.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 v3 1/5] vhost: unify 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": "Use the typedef version of struct VhostUserMsg. Also unify the related\nparameter name.\n\nSigned-off-by: Nikolay Nikolaev <nicknickolaev@gmail.com>\n---\n lib/librte_vhost/vhost_user.c |   50 +++++++++++++++++++++--------------------\n 1 file changed, 25 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 63d145b2d..b05b57670 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\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, 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, 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, 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@@ -1153,7 +1153,7 @@ vhost_user_set_vring_enable(struct virtio_net *dev,\n \n static void\n vhost_user_get_protocol_features(struct virtio_net *dev,\n-\t\t\t\t struct VhostUserMsg *msg)\n+\t\t\t\t VhostUserMsg *msg)\n {\n \tuint64_t features, protocol_features;\n \n@@ -1189,7 +1189,7 @@ vhost_user_set_protocol_features(struct virtio_net *dev,\n }\n \n static int\n-vhost_user_set_log_base(struct virtio_net *dev, struct VhostUserMsg *msg)\n+vhost_user_set_log_base(struct virtio_net *dev, VhostUserMsg *msg)\n {\n \tint fd = msg->fds[0];\n \tuint64_t size, off;\n@@ -1256,7 +1256,7 @@ vhost_user_set_log_base(struct virtio_net *dev, struct VhostUserMsg *msg)\n  * a flag 'broadcast_rarp' to let rte_vhost_dequeue_burst() inject it.\n  */\n static int\n-vhost_user_send_rarp(struct virtio_net *dev, struct VhostUserMsg *msg)\n+vhost_user_send_rarp(struct virtio_net *dev, VhostUserMsg *msg)\n {\n \tuint8_t *mac = (uint8_t *)&msg->payload.u64;\n \tstruct rte_vdpa_device *vdpa_dev;\n@@ -1285,7 +1285,7 @@ vhost_user_send_rarp(struct virtio_net *dev, struct VhostUserMsg *msg)\n }\n \n static int\n-vhost_user_net_set_mtu(struct virtio_net *dev, struct VhostUserMsg *msg)\n+vhost_user_net_set_mtu(struct virtio_net *dev, VhostUserMsg *msg)\n {\n \tif (msg->payload.u64 < VIRTIO_MIN_MTU ||\n \t\t\tmsg->payload.u64 > VIRTIO_MAX_MTU) {\n@@ -1301,7 +1301,7 @@ vhost_user_net_set_mtu(struct virtio_net *dev, struct VhostUserMsg *msg)\n }\n \n static int\n-vhost_user_set_req_fd(struct virtio_net *dev, struct VhostUserMsg *msg)\n+vhost_user_set_req_fd(struct virtio_net *dev, VhostUserMsg *msg)\n {\n \tint fd = msg->fds[0];\n \n@@ -1367,7 +1367,7 @@ is_vring_iotlb_invalidate(struct vhost_virtqueue *vq,\n }\n \n static int\n-vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg)\n+vhost_user_iotlb_msg(struct virtio_net **pdev, VhostUserMsg *msg)\n {\n \tstruct virtio_net *dev = *pdev;\n \tstruct vhost_iotlb_msg *imsg = &msg->payload.iotlb;\n@@ -1413,7 +1413,7 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg)\n \n /* return bytes# of read on success or negative val on failure. */\n static int\n-read_vhost_message(int sockfd, struct VhostUserMsg *msg)\n+read_vhost_message(int sockfd, VhostUserMsg *msg)\n {\n \tint ret;\n \n@@ -1442,7 +1442,7 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg)\n }\n \n static int\n-send_vhost_message(int sockfd, struct VhostUserMsg *msg, int *fds, int fd_num)\n+send_vhost_message(int sockfd, VhostUserMsg *msg, int *fds, int fd_num)\n {\n \tif (!msg)\n \t\treturn 0;\n@@ -1452,7 +1452,7 @@ send_vhost_message(int sockfd, struct VhostUserMsg *msg, int *fds, int fd_num)\n }\n \n static int\n-send_vhost_reply(int sockfd, struct VhostUserMsg *msg)\n+send_vhost_reply(int sockfd, VhostUserMsg *msg)\n {\n \tif (!msg)\n \t\treturn 0;\n@@ -1466,7 +1466,7 @@ send_vhost_reply(int sockfd, struct VhostUserMsg *msg)\n }\n \n static int\n-send_vhost_slave_message(struct virtio_net *dev, struct VhostUserMsg *msg,\n+send_vhost_slave_message(struct virtio_net *dev, VhostUserMsg *msg,\n \t\t\t int *fds, int fd_num)\n {\n \tint ret;\n@@ -1557,7 +1557,7 @@ int\n vhost_user_msg_handler(int vid, int fd)\n {\n \tstruct virtio_net *dev;\n-\tstruct VhostUserMsg msg;\n+\tVhostUserMsg msg;\n \tstruct rte_vdpa_device *vdpa_dev;\n \tint did = -1;\n \tint ret;\n@@ -1850,7 +1850,7 @@ int\n vhost_user_iotlb_miss(struct virtio_net *dev, uint64_t iova, uint8_t perm)\n {\n \tint ret;\n-\tstruct VhostUserMsg msg = {\n+\tVhostUserMsg msg = {\n \t\t.request.slave = VHOST_USER_SLAVE_IOTLB_MSG,\n \t\t.flags = VHOST_USER_VERSION,\n \t\t.size = sizeof(msg.payload.iotlb),\n@@ -1880,7 +1880,7 @@ static int vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,\n \tint *fdp = NULL;\n \tsize_t fd_num = 0;\n \tint ret;\n-\tstruct VhostUserMsg msg = {\n+\tVhostUserMsg msg = {\n \t\t.request.slave = VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,\n \t\t.flags = VHOST_USER_VERSION | VHOST_USER_NEED_REPLY,\n \t\t.size = sizeof(msg.payload.area),\n",
    "prefixes": [
        "v3",
        "1/5"
    ]
}