Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/20398/?format=api
https://patches.dpdk.org/api/patches/20398/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170213142820.8964-4-maxime.coquelin@redhat.com/", "project": { "id": 1, "url": "https://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": "<20170213142820.8964-4-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20170213142820.8964-4-maxime.coquelin@redhat.com", "date": "2017-02-13T14:28:16", "name": "[dpdk-dev,3/7] vhost: Add new ready status flag", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "78f13a1dac78f3afa2ed283dea7f2321bab56a8a", "submitter": { "id": 512, "url": "https://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 355, "url": "https://patches.dpdk.org/api/users/355/?format=api", "username": "yliu", "first_name": "Yuanhan", "last_name": "Liu", "email": "yuanhan.liu@linux.intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170213142820.8964-4-maxime.coquelin@redhat.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/20398/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/20398/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 717FFF932;\n\tMon, 13 Feb 2017 15:28:57 +0100 (CET)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id D69FEF610\n\tfor <dev@dpdk.org>; Mon, 13 Feb 2017 15:28:43 +0100 (CET)", "from int-mx11.intmail.prod.int.phx2.redhat.com\n\t(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 48D2C80472;\n\tMon, 13 Feb 2017 14:28:44 +0000 (UTC)", "from max-t460s.redhat.com (ovpn-117-88.ams2.redhat.com\n\t[10.36.117.88])\n\tby int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id v1DESW19014561; Mon, 13 Feb 2017 09:28:42 -0500" ], "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "aconole@redhat.com, sodey@sonusnet.com, yuanhan.liu@linux.intel.com,\n\tjianfeng.tan@intel.com, dev@dpdk.org", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Mon, 13 Feb 2017 15:28:16 +0100", "Message-Id": "<20170213142820.8964-4-maxime.coquelin@redhat.com>", "In-Reply-To": "<20170213142820.8964-1-maxime.coquelin@redhat.com>", "References": "<20170213142820.8964-1-maxime.coquelin@redhat.com>", "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.24", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]); Mon, 13 Feb 2017 14:28:44 +0000 (UTC)", "Subject": "[dpdk-dev] [PATCH 3/7] vhost: Add new ready status flag", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch adds a new status flag indicating the Virtio device\nis ready to operate.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/librte_vhost/vhost.h | 2 ++\n lib/librte_vhost/vhost_user.c | 20 +++++++++++++-------\n 2 files changed, 15 insertions(+), 7 deletions(-)", "diff": "diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex 549296f..e8b7e44 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -46,6 +46,8 @@\n \n /* Used to indicate that the device is running on a data core */\n #define VIRTIO_DEV_RUNNING 1\n+/* Used to indicate that the device is ready to operate */\n+#define VIRTIO_DEV_READY 2\n \n /* Backend value set by guest. */\n #define VIRTIO_DEV_STOPPED -1\ndiff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 69877a4..4726aaf 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -691,14 +691,18 @@ vhost_user_set_vring_kick(struct virtio_net *dev, struct VhostUserMsg *pmsg)\n \t\tclose(vq->kickfd);\n \tvq->kickfd = file.fd;\n \n-\tif (virtio_is_ready(dev) && !(dev->flags & VIRTIO_DEV_RUNNING)) {\n-\t\tif (dev->dequeue_zero_copy) {\n-\t\t\tRTE_LOG(INFO, VHOST_CONFIG,\n-\t\t\t\t\"dequeue zero copy is enabled\\n\");\n-\t\t}\n+\tif (virtio_is_ready(dev)) {\n+\t\tdev->flags |= VIRTIO_DEV_READY;\n+\n+\t\tif (!(dev->flags & VIRTIO_DEV_RUNNING)) {\n+\t\t\tif (dev->dequeue_zero_copy) {\n+\t\t\t\tRTE_LOG(INFO, VHOST_CONFIG,\n+\t\t\t\t\t\t\"dequeue zero copy is enabled\\n\");\n+\t\t\t}\n \n-\t\tif (notify_ops->new_device(dev->vid) == 0)\n-\t\t\tdev->flags |= VIRTIO_DEV_RUNNING;\n+\t\t\tif (notify_ops->new_device(dev->vid) == 0)\n+\t\t\t\tdev->flags |= VIRTIO_DEV_RUNNING;\n+\t\t}\n \t}\n }\n \n@@ -733,6 +737,8 @@ vhost_user_get_vring_base(struct virtio_net *dev,\n \t\tnotify_ops->destroy_device(dev->vid);\n \t}\n \n+\tdev->flags &= ~VIRTIO_DEV_READY;\n+\n \t/* Here we are safe to get the last used index */\n \tstate->num = vq->last_used_idx;\n \n", "prefixes": [ "dpdk-dev", "3/7" ] }{ "id": 20398, "url": "