Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/64501/?format=api
http://patches.dpdk.org/api/patches/64501/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200113033133.55731-1-Cheng1.jiang@intel.com/", "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": "<20200113033133.55731-1-Cheng1.jiang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200113033133.55731-1-Cheng1.jiang@intel.com", "date": "2020-01-13T03:31:33", "name": "[v4] net/virtio: packed ring notification data feature support", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9e19bebf7ea5e7c15bdfb6bfe3837dec784c4c1a", "submitter": { "id": 1530, "url": "http://patches.dpdk.org/api/people/1530/?format=api", "name": "Jiang, Cheng1", "email": "Cheng1.jiang@intel.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/20200113033133.55731-1-Cheng1.jiang@intel.com/mbox/", "series": [ { "id": 8065, "url": "http://patches.dpdk.org/api/series/8065/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8065", "date": "2020-01-13T03:31:33", "name": "[v4] net/virtio: packed ring notification data feature support", "version": 4, "mbox": "http://patches.dpdk.org/series/8065/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/64501/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/64501/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8BC55A04F0;\n\tMon, 13 Jan 2020 04:36:22 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 170721D427;\n\tMon, 13 Jan 2020 04:36:22 +0100 (CET)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id C20F91D426\n for <dev@dpdk.org>; Mon, 13 Jan 2020 04:36:19 +0100 (CET)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 12 Jan 2020 19:36:18 -0800", "from dpdk-jiangcheng.sh.intel.com ([10.67.119.194])\n by fmsmga006.fm.intel.com with ESMTP; 12 Jan 2020 19:36:17 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.69,427,1571727600\"; d=\"scan'208\";a=\"424181052\"", "From": "Cheng Jiang <Cheng1.jiang@intel.com>", "To": "maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com,\n yong.liu@intel.com", "Cc": "dev@dpdk.org,\n\tCheng Jiang <Cheng1.jiang@intel.com>", "Date": "Mon, 13 Jan 2020 03:31:33 +0000", "Message-Id": "<20200113033133.55731-1-Cheng1.jiang@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20191223051543.41579-1-Cheng1.jiang@intel.com>", "References": "<20191223051543.41579-1-Cheng1.jiang@intel.com>", "Subject": "[dpdk-dev] [PATCH v4] net/virtio: packed ring notification data\n\tfeature support", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch supports the feature that the driver passes extra data\n(besides identifying the virtqueue) in its device notifications,\nexpanding the notifications to include the avail index and avail\nwrap counter.\n\nSigned-off-by: Cheng Jiang <Cheng1.jiang@intel.com>\n---\n\nv4:\n* Replaced used_wrap_counter with avail_wrap_counter.\n\nv3:\n* Modified the commit log to make it more detailed.\n* Modified the shift mode of notify_data to make it more intuitive.\n\nv2:\n* Removed rte_unused attribute in *hw.\n* Added some comments on notify_data.\n\n drivers/net/virtio/virtio_ethdev.h | 3 ++-\n drivers/net/virtio/virtio_pci.c | 29 +++++++++++++++++++++++++++--\n drivers/net/virtio/virtio_pci.h | 6 ++++++\n 3 files changed, 35 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h\nindex a10111758..cd8947656 100644\n--- a/drivers/net/virtio/virtio_ethdev.h\n+++ b/drivers/net/virtio/virtio_ethdev.h\n@@ -36,7 +36,8 @@\n \t 1ULL << VIRTIO_F_IN_ORDER |\t\\\n \t 1ULL << VIRTIO_F_RING_PACKED\t |\t\\\n \t 1ULL << VIRTIO_F_IOMMU_PLATFORM |\t\\\n-\t 1ULL << VIRTIO_F_ORDER_PLATFORM)\n+\t 1ULL << VIRTIO_F_ORDER_PLATFORM |\t\\\n+\t 1ULL << VIRTIO_F_NOTIFICATION_DATA)\n \n #define VIRTIO_PMD_SUPPORTED_GUEST_FEATURES\t\\\n \t(VIRTIO_PMD_DEFAULT_GUEST_FEATURES |\t\\\ndiff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c\nindex 4468e89cb..29a354bf7 100644\n--- a/drivers/net/virtio/virtio_pci.c\n+++ b/drivers/net/virtio/virtio_pci.c\n@@ -416,9 +416,34 @@ modern_del_queue(struct virtio_hw *hw, struct virtqueue *vq)\n }\n \n static void\n-modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue *vq)\n+modern_notify_queue(struct virtio_hw *hw, struct virtqueue *vq)\n {\n-\trte_write16(vq->vq_queue_index, vq->notify_addr);\n+\tuint32_t notify_data;\n+\n+\tif (!vtpci_with_feature(hw, VIRTIO_F_NOTIFICATION_DATA)) {\n+\t\trte_write16(vq->vq_queue_index, vq->notify_addr);\n+\t\treturn;\n+\t}\n+\n+\tif (vtpci_with_feature(hw, VIRTIO_F_RING_PACKED)) {\n+\t\t/*\n+\t\t * Bit[0:15]: vq queue index\n+\t\t * Bit[16:30]: avail index\n+\t\t * Bit[31]: avail wrap counter\n+\t\t */\n+\t\tnotify_data = ((uint32_t)(!!(vq->vq_packed.cached_flags &\n+\t\t\t\tVRING_PACKED_DESC_F_AVAIL)) << 31) |\n+\t\t\t\t((uint32_t)vq->vq_avail_idx << 16) |\n+\t\t\t\tvq->vq_queue_index;\n+\t} else {\n+\t\t/*\n+\t\t * Bit[0:15]: vq queue index\n+\t\t * Bit[16:31]: avail index\n+\t\t */\n+\t\tnotify_data = ((uint32_t)vq->vq_avail_idx << 16) |\n+\t\t\t\tvq->vq_queue_index;\n+\t}\n+\trte_write32(notify_data, vq->notify_addr);\n }\n \n const struct virtio_pci_ops modern_ops = {\ndiff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h\nindex a38cb45ad..7433d2f08 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -135,6 +135,12 @@ struct virtnet_ctl;\n */\n #define VIRTIO_F_ORDER_PLATFORM 36\n \n+/*\n+ * This feature indicates that the driver passes extra data (besides\n+ * identifying the virtqueue) in its device notifications.\n+ */\n+#define VIRTIO_F_NOTIFICATION_DATA 38\n+\n /* The Guest publishes the used index for which it expects an interrupt\n * at the end of the avail ring. Host should ignore the avail->flags field. */\n /* The Host publishes the avail index for which it expects a kick\n", "prefixes": [ "v4" ] }{ "id": 64501, "url": "