Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45174/?format=api
http://patches.dpdk.org/api/patches/45174/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/153765099015.29126.15895676194056985126.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": "<153765099015.29126.15895676194056985126.stgit@T460>", "list_archive_url": "https://inbox.dpdk.org/dev/153765099015.29126.15895676194056985126.stgit@T460", "date": "2018-09-22T21:16:30", "name": "[v4,1/5] vhost: unify struct VhostUserMsg usage", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a833f48a01ca7c4e0df5ccc85d395a01f4e26eb3", "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/153765099015.29126.15895676194056985126.stgit@T460/mbox/", "series": [ { "id": 1455, "url": "http://patches.dpdk.org/api/series/1455/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1455", "date": "2018-09-22T21:16:23", "name": "vhost: vhost_user.c code cleanup", "version": 4, "mbox": "http://patches.dpdk.org/series/1455/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/45174/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/45174/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 727CF4C74;\n\tSat, 22 Sep 2018 23:16:33 +0200 (CEST)", "from mail-wr1-f66.google.com (mail-wr1-f66.google.com\n\t[209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 82D1E2B92\n\tfor <dev@dpdk.org>; Sat, 22 Sep 2018 23:16:32 +0200 (CEST)", "by mail-wr1-f66.google.com with SMTP id v16-v6so16020190wro.11\n\tfor <dev@dpdk.org>; Sat, 22 Sep 2018 14:16:32 -0700 (PDT)", "from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id\n\tj66-v6sm44025909wrj.28.2018.09.22.14.16.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 22 Sep 2018 14:16:31 -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=LY2MiE1ai04mlUhiFwqZolBK+ENqzL4phF3oEwadsrKhfA2kGFn6XXekGWPjD1d8eE\n\tobn2dKo4+GmFcJGog1D4KY8MQlw9QN7r8gO+NY9w65PBRl13lxNrVbq2lg9N4r7jo5O6\n\tRIcMJSsdoLeJiMd4exj3+z1Z4xImdf+Y7NXI6RwVgu81QFLtQmlAtxAK9je3ukKuMJP/\n\tQTtu1GMe4ifJdDRmY+BpR/TRsXIyIcMdAjLOUeoWyamhy7kzl3827gnlWD7qcAn6AIWU\n\tJR/+zaAgkRyhj9l00Lg0YquUkgRMKZ0bfh2+N9t9k+izkk2utp0F+OszkR1sh7QdozO0\n\tliAg==", "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=ofrk/iD9/j8H2MrTSnf2resV/01xmO7giEuDHrR+UNok8Sq4IIGdYpDjsN8+zYmMOp\n\tbJspSOC/FC5C3kR+Y5s+K+Wfl1IZ3ESI2jbycMsEiV17ZXZjHwwJVkJ6O5hkbFUf7h//\n\tWoZ/CUmMspQnDdqA5HRr5CG8+aLJdPZxXaSNjTY5+k9YLWXTPY/zxCD020D3KGTGBDHT\n\tTO6Jq+PRWinaUUXsRZjHc1gVdxZf2Z7prjd8km1lg+4/xJ80gPIWWg7udArJgzWkqv3o\n\tLU0/xoU7GUcLRD8acSSskK25hizoU+WeWtrng7VYOQUnZ0w7KAq521sm/rFEOoikLyu/\n\toAeQ==", "X-Gm-Message-State": "ABuFfoikFVZYva/QV3vlMqgtFzK7Ik+/KeH8+z9xw3wDc6UFVKbr3ZG8\n\tgf5XXOwfuGBHUx2nOF5oY30fHP9+TfvbLQ==", "X-Google-Smtp-Source": "ACcGV639TeuXniWwpmOKb2bIxJ0MxYoGAiM3pMdP7h4HhgR+cvOmKikUgvNqQan9eN9r2tPjL4IOcw==", "X-Received": "by 2002:a5d:610b:: with SMTP id\n\tv11-v6mr3088888wrt.265.1537650991746; \n\tSat, 22 Sep 2018 14:16:31 -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": "Sun, 23 Sep 2018 00:16:30 +0300", "Message-ID": "<153765099015.29126.15895676194056985126.stgit@T460>", "In-Reply-To": "<153765091094.29126.1031571146095035538.stgit@T460>", "References": "<153765091094.29126.1031571146095035538.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 v4 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": [ "v4", "1/5" ] }{ "id": 45174, "url": "