Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45216/?format=api
http://patches.dpdk.org/api/patches/45216/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/153780247799.17494.1497329604412264404.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": "<153780247799.17494.1497329604412264404.stgit@T460>", "list_archive_url": "https://inbox.dpdk.org/dev/153780247799.17494.1497329604412264404.stgit@T460", "date": "2018-09-24T15:21:18", "name": "[v5,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/153780247799.17494.1497329604412264404.stgit@T460/mbox/", "series": [ { "id": 1468, "url": "http://patches.dpdk.org/api/series/1468/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1468", "date": "2018-09-24T15:21:10", "name": "vhost_user.c code cleanup", "version": 5, "mbox": "http://patches.dpdk.org/series/1468/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/45216/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/45216/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 6D5455B1C;\n\tMon, 24 Sep 2018 17:21:21 +0200 (CEST)", "from mail-wr1-f68.google.com (mail-wr1-f68.google.com\n\t[209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 65C615B1C\n\tfor <dev@dpdk.org>; Mon, 24 Sep 2018 17:21:20 +0200 (CEST)", "by mail-wr1-f68.google.com with SMTP id e1-v6so20120139wrt.3\n\tfor <dev@dpdk.org>; Mon, 24 Sep 2018 08:21:20 -0700 (PDT)", "from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id\n\tk63-v6sm34175917wmd.46.2018.09.24.08.21.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 24 Sep 2018 08:21:19 -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=TDZvPgk57ZCsnTo8SlwuVcyX2eDfXeu9FMn8UaXawc35sPEJL/qEd3C5kp6zrLgTLd\n\tI+4Z++dxCkoOCDpzTpYOpX8Sn41KLYRYcge1uoA+C9lU8s2QLkTvOfrOSg4PTRxISIQh\n\tclkT4eihoPSZOwv/UyknwOPOl2N2n+A6T+FnyEyZU/R63++8Aj5jdVuwNY0aQHTVcd7x\n\tdsAzMw3yQUzvE/5m6VsNpZABipxc/TyJbBIFL5wyVXj2FHaJ2hL3GUyzDeUxemccAdnl\n\t39e3I+2RKgBvFjZIdbe5WVuV+fRmK0rI6diU56GFWcMGcasduG0fJTTsI5r7UMpNaijs\n\tFusw==", "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=V9yf04nWtdFgkYt/OgE8u9jviZSeiNyiwQ4s6Tn7p0SrXS8Wi1IQ/L0nrJ6ooIMAcW\n\tSvq5wIWJAzrtfo4JjK6jUHj6ydnfmGh0e6G4n4BosowXWqnRIJ+E8bXNxFZ3PWUSv258\n\tTdAl9lB+1apLku7h6Z1i8ZYlV7fz58cikUHyteFGldnK2aYqi80jOzmndJqIVau5gPa6\n\tMnFlo5mgchaUJmiSXPKmhuGhU6Muk44adY/OTPxGWIOxBK/oVqQgBOh7O5RhFnwf7bGo\n\t2EE+Z7XrO2FL95e0+3sGd6hahF6Xw8orxSmT0VsLr1svk5VenUZkKIQJAAW/Mggr7LAN\n\toqww==", "X-Gm-Message-State": "ABuFfojFVUcdUN13nCC2YhxoglL/kEM7fC6gbfZkasPBnfmlW8v1uhJ7\n\t3fqkmdRN7gkWTlPOO04+WtOJd1lG8EeqHw==", "X-Google-Smtp-Source": "ACcGV61PDZ6iFQ+RZCAienS61zrIul9Va0iZlEGIoHi6cQQftP3kXr0GftI0xsEILg5cgbe1v16XkA==", "X-Received": "by 2002:adf:b643:: with SMTP id\n\ti3-v6mr1432949wre.14.1537802479827; \n\tMon, 24 Sep 2018 08:21:19 -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 18:21:18 +0300", "Message-ID": "<153780247799.17494.1497329604412264404.stgit@T460>", "In-Reply-To": "<153780242838.17494.4512397995243433980.stgit@T460>", "References": "<153780242838.17494.4512397995243433980.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 v5 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": [ "v5", "1/5" ] }{ "id": 45216, "url": "