get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41579,
    "url": "http://patches.dpdk.org/api/patches/41579/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/153002994991.22089.16713275746085839135.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": "<153002994991.22089.16713275746085839135.stgit@T460>",
    "list_archive_url": "https://inbox.dpdk.org/dev/153002994991.22089.16713275746085839135.stgit@T460",
    "date": "2018-06-26T16:19:09",
    "name": "[v1,1/5] vhost: unify VhostUserMsg usage",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "49b6adf239b18899efc4fb07dd882b69d237c208",
    "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/153002994991.22089.16713275746085839135.stgit@T460/mbox/",
    "series": [
        {
            "id": 246,
            "url": "http://patches.dpdk.org/api/series/246/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=246",
            "date": "2018-06-26T16:19:02",
            "name": "vhost_user.c code cleanup",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/246/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41579/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41579/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 3BEDF1BB09;\n\tTue, 26 Jun 2018 18:19:13 +0200 (CEST)",
            "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id A92371B60B\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 18:19:12 +0200 (CEST)",
            "by mail-wm0-f68.google.com with SMTP id z137-v6so2497608wmc.0\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 09:19:12 -0700 (PDT)",
            "from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id\n\tx5-v6sm2617425wrr.3.2018.06.26.09.19.10\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Jun 2018 09:19:11 -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=S2hfINd+0OaSELPa37VybVZgVCvJixS7nuHCjLSxeu0=;\n\tb=kLPAF0QHAl0hw1We6jRuoBoMUl2LlyrnsiF5EJOMvTP1kiZIZJdYKYQDR4C1eQutBY\n\tINd35IFERthUgB3G3i+oXHyc4F/RDEV7GjZDqkKRqSQxx7Sk1qbq2qaHvsy4vfg3mnSQ\n\ttmxDC5zUzzfR0LYV8ouA/I+Kr0fbybtpt6T95E1Mc3F2vA2jET21frAV3FiJAfo72hZt\n\t1cZzCOyM+X6SWs7m+Yc2fprFo3pbAQqvX+laUpeYQP/i646IfqJ3Pfdu4p+3urnnqYpA\n\tW53EYg6fU++YTooa5Nl7TObUfv3MgHoKC6U2NpT7mzSq9aBFS6nqAl5SrE8+s0+whxmq\n\ty5TA==",
        "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=S2hfINd+0OaSELPa37VybVZgVCvJixS7nuHCjLSxeu0=;\n\tb=UqVXN/Gs6+TuG+K4yO3rPJexx87Dml3hyjPEZmwHde18J4PVm2EkJQQwv3LbepzXQz\n\tuOLyeu1ekkE3+dDZTfZRjuqLkdywqztmbpC6XhIIHGlEz0ahCreyM555G5NmQmrFR58W\n\tlr3S2RVggIyk3tJebljtsYNesFpu6cVyl9Cvb0Z94oqS2jo2jLXf1yUa05tetLu09X/d\n\tgQ3fX4OiDBVtifC+Lk2CjdD/HnGUvbyBs2LDGdeYeKyhzEsVUn3MfxxJ58+yPJVA9ZZO\n\tzy5QyuDXFAVheygtt7xovY3b5t2g9mM49C7wG/jLGL95TyjdtkO+N4hhjIV7ipqnYU44\n\tvdnw==",
        "X-Gm-Message-State": "APt69E0zO8PTxHXOR44+ZfxH3osiLGUwmyUJ3ALHxx0ump1Ozc81T6t3\n\tUOZ4fh+O7Q6eESM9RfVcE1oIy6cq",
        "X-Google-Smtp-Source": "AAOMgpcVPEmTMo21GTh/ENi/EmEdOcFzGKcTmWWBVutKLJ+h4zp2tZ3zUmixHVdK7pyRLpcFTdbS4g==",
        "X-Received": "by 2002:a1c:8312:: with SMTP id\n\tf18-v6mr2231801wmd.127.1530029951942; \n\tTue, 26 Jun 2018 09:19:11 -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": "Tue, 26 Jun 2018 19:19:09 +0300",
        "Message-ID": "<153002994991.22089.16713275746085839135.stgit@T460>",
        "In-Reply-To": "<153002988259.22089.8523468795459281187.stgit@T460>",
        "References": "<153002988259.22089.8523468795459281187.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 v1 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 26cfebec0..9b5598871 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -706,10 +706,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@@ -730,7 +730,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@@ -766,7 +766,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@@ -905,16 +905,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@@ -926,17 +926,17 @@ vhost_user_set_vring_call(struct virtio_net *dev, struct VhostUserMsg *pmsg)\n }\n \n static void\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@@ -1058,7 +1058,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@@ -1089,7 +1089,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@@ -1156,7 +1156,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@@ -1185,7 +1185,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@@ -1201,7 +1201,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@@ -1267,7 +1267,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@@ -1313,7 +1313,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@@ -1342,7 +1342,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@@ -1352,7 +1352,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@@ -1366,7 +1366,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@@ -1457,7 +1457,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@@ -1745,7 +1745,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@@ -1775,7 +1775,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": [
        "v1",
        "1/5"
    ]
}