Show a patch.

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

{
    "id": 43219,
    "url": "http://patches.dpdk.org/api/patches/43219/",
    "web_url": "http://patches.dpdk.org/patch/43219/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<153202760738.21481.2953475302358332226.stgit@T460>",
    "date": "2018-07-19T19:13:27",
    "name": "[v2,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/",
        "name": "Nikolay Nikolaev",
        "email": "nicknickolaev@gmail.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/patch/43219/mbox/",
    "series": [
        {
            "id": 681,
            "url": "http://patches.dpdk.org/api/series/681/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=681",
            "date": "2018-07-19T19:13:20",
            "name": "vhost_user.c code cleanup",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/681/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43219/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43219/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "To": "maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com",
        "X-Google-Smtp-Source": "AAOMgpf3M197jWU2KhaxA7cDJpwbvInJnJhwIzwkxdI9zbi/LyYg4cTGxzd+8TGFr3vyGz51vJd1cw==",
        "X-Gm-Message-State": "AOUpUlGSLEITRMuWDrLkRRE7pIIkBNor5J7iATXGrMP0bApktqhBAzhD\n\tGRBfPOfsvqptU2tZK8JEs6chpijt6FE=",
        "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=LlwHzfaxIoFmiP+qbtyHxok2KSAD9DezgDgcQ0/NNkQ=;\n\tb=RaYcZ0QtcdoZOdJsB+7ZvReEW//faJzn1ACwQnzUUrvzRSd3vcU5XchBJ5ja14cdZA\n\te6cHI4z9M2liSAyeVGT2uUd6WXN+tYXq0gMzKkXCkx1wQ80f7Sp8jZUyJlPtRWOMtZ3l\n\toKQj0eYioL0is77FJnJH4QgfR468nTJBG6PKm96W889pQTKjOq3uswaSv0+KavLUD1qK\n\teNbp9PmMKjomodOsZfyyy5NwcNpNpH86XMttFSq7wG74rktu7+xuk8NPhzEXA/b+4R9s\n\tD918LaQFn7vu+SIY1t8JhZIFtgD+CDUNTycmsYPuS0oWwwjeSo+sz3xhmWBL+3+woftS\n\t6hVA==",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Message-ID": "<153202760738.21481.2953475302358332226.stgit@T460>",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 834AA5B20;\n\tThu, 19 Jul 2018 21:13:30 +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 9D10D5B1C\n\tfor <dev@dpdk.org>; Thu, 19 Jul 2018 21:13:29 +0200 (CEST)",
            "by mail-wm0-f68.google.com with SMTP id z13-v6so7465194wma.5\n\tfor <dev@dpdk.org>; Thu, 19 Jul 2018 12:13:29 -0700 (PDT)",
            "from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id\n\tr8-v6sm148056wmh.37.2018.07.19.12.13.28\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 19 Jul 2018 12:13:28 -0700 (PDT)"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 1/5] vhost: unify VhostUserMsg usage",
        "In-Reply-To": "<153202755842.21481.1772155561595981441.stgit@T460>",
        "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-Post": "<mailto:dev@dpdk.org>",
        "Cc": "dev@dpdk.org",
        "Precedence": "list",
        "From": "Nikolay Nikolaev <nicknickolaev@gmail.com>",
        "X-Received": "by 2002:a1c:cbc1:: with SMTP id\n\tb184-v6mr5319418wmg.149.1532027609070; \n\tThu, 19 Jul 2018 12:13:29 -0700 (PDT)",
        "Content-Transfer-Encoding": "7bit",
        "MIME-Version": "1.0",
        "References": "<153202755842.21481.1772155561595981441.stgit@T460>",
        "X-Original-To": "patchwork@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Delivered-To": "patchwork@dpdk.org",
        "Date": "Thu, 19 Jul 2018 22:13:27 +0300",
        "X-Mailman-Version": "2.1.15",
        "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=LlwHzfaxIoFmiP+qbtyHxok2KSAD9DezgDgcQ0/NNkQ=;\n\tb=L0vNfTCv3Cfd5UQeqx9D6KKPddEB+NMLHQLjYfWTA5Gn5Eseo43jGJVh5qKRQbe998\n\tb8W+8XqWcF1ZMJEcvVgax2Jtw56dpxvS/8edhNe4bKMRFCSVzA6IK6bLw3JYlLXkP2ux\n\toOfu1GEp+OGmI+85d3fBl60lywwGhqiKQVOlwSU2aY8qORONapn4aE0oXQQX0h/CbdQu\n\taHP29jnQCunso/X56hIGu5dPIJqeZLylyomNu1FgjeSkOeqVd7GkTTahBAjKLgyxsCZ4\n\tnxEo69aWHzZYtSiBGgmQd6GuRfmlVyLx0yQ6qxfkajkntCWJRIuz3IchEeFsbT4MURmf\n\tinrw==",
        "User-Agent": "StGit/0.17.1-dirty"
    },
    "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 dc53ff712..d51616695 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -778,10 +778,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@@ -802,7 +802,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@@ -838,7 +838,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@@ -987,16 +987,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@@ -1008,17 +1008,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@@ -1145,7 +1145,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@@ -1176,7 +1176,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@@ -1243,7 +1243,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@@ -1272,7 +1272,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@@ -1288,7 +1288,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@@ -1354,7 +1354,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@@ -1400,7 +1400,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@@ -1429,7 +1429,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@@ -1439,7 +1439,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@@ -1453,7 +1453,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@@ -1544,7 +1544,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@@ -1832,7 +1832,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@@ -1862,7 +1862,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": [
        "v2",
        "1/5"
    ]
}