Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42470/?format=api
http://patches.dpdk.org/api/patches/42470/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180706070722.2043-9-maxime.coquelin@redhat.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": "<20180706070722.2043-9-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180706070722.2043-9-maxime.coquelin@redhat.com", "date": "2018-07-06T07:07:15", "name": "[v9,08/15] vhost: append shadow used ring function names with split", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "cc81b2d3cf1eb4a942679eedb610d6a625b88e49", "submitter": { "id": 512, "url": "http://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.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/20180706070722.2043-9-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 450, "url": "http://patches.dpdk.org/api/series/450/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=450", "date": "2018-07-06T07:07:07", "name": "Vhost: add support to packed ring layout", "version": 9, "mbox": "http://patches.dpdk.org/series/450/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42470/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/42470/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 B9D061BFCA;\n\tFri, 6 Jul 2018 09:07:43 +0200 (CEST)", "from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73])\n\tby dpdk.org (Postfix) with ESMTP id ED8281BFBB\n\tfor <dev@dpdk.org>; Fri, 6 Jul 2018 09:07:42 +0200 (CEST)", "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 97089818BAFC;\n\tFri, 6 Jul 2018 07:07:42 +0000 (UTC)", "from localhost.localdomain (unknown [10.36.112.10])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id DB67E2026D68;\n\tFri, 6 Jul 2018 07:07:40 +0000 (UTC)" ], "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "tiwei.bie@intel.com, zhihong.wang@intel.com, jfreimann@redhat.com,\n\tdev@dpdk.org", "Cc": "mst@redhat.com, jasowang@redhat.com, wexu@redhat.com,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Fri, 6 Jul 2018 09:07:15 +0200", "Message-Id": "<20180706070722.2043-9-maxime.coquelin@redhat.com>", "In-Reply-To": "<20180706070722.2043-1-maxime.coquelin@redhat.com>", "References": "<20180706070722.2043-1-maxime.coquelin@redhat.com>", "X-Scanned-By": "MIMEDefang 2.78 on 10.11.54.4", "X-Greylist": [ "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.11.55.8]); Fri, 06 Jul 2018 07:07:42 +0000 (UTC)", "inspected by milter-greylist-4.5.16 (mx1.redhat.com\n\t[10.11.55.8]); \n\tFri, 06 Jul 2018 07:07:42 +0000 (UTC) for IP:'10.11.54.4'\n\tDOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com'\n\tHELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:''" ], "Subject": "[dpdk-dev] [PATCH v9 08/15] vhost: append shadow used ring function\n\tnames with split", "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": "Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/librte_vhost/virtio_net.c | 28 +++++++++++++++-------------\n 1 file changed, 15 insertions(+), 13 deletions(-)", "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex bdfd6ebef..ae256e062 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -77,8 +77,9 @@ free_ind_table(void *idesc)\n }\n \n static __rte_always_inline void\n-do_flush_shadow_used_ring(struct virtio_net *dev, struct vhost_virtqueue *vq,\n-\t\t\t uint16_t to, uint16_t from, uint16_t size)\n+do_flush_shadow_used_ring_split(struct virtio_net *dev,\n+\t\t\tstruct vhost_virtqueue *vq,\n+\t\t\tuint16_t to, uint16_t from, uint16_t size)\n {\n \trte_memcpy(&vq->used->ring[to],\n \t\t\t&vq->shadow_used_ring[from],\n@@ -89,22 +90,22 @@ do_flush_shadow_used_ring(struct virtio_net *dev, struct vhost_virtqueue *vq,\n }\n \n static __rte_always_inline void\n-flush_shadow_used_ring(struct virtio_net *dev, struct vhost_virtqueue *vq)\n+flush_shadow_used_ring_split(struct virtio_net *dev, struct vhost_virtqueue *vq)\n {\n \tuint16_t used_idx = vq->last_used_idx & (vq->size - 1);\n \n \tif (used_idx + vq->shadow_used_idx <= vq->size) {\n-\t\tdo_flush_shadow_used_ring(dev, vq, used_idx, 0,\n+\t\tdo_flush_shadow_used_ring_split(dev, vq, used_idx, 0,\n \t\t\t\t\t vq->shadow_used_idx);\n \t} else {\n \t\tuint16_t size;\n \n \t\t/* update used ring interval [used_idx, vq->size] */\n \t\tsize = vq->size - used_idx;\n-\t\tdo_flush_shadow_used_ring(dev, vq, used_idx, 0, size);\n+\t\tdo_flush_shadow_used_ring_split(dev, vq, used_idx, 0, size);\n \n \t\t/* update the left half used ring interval [0, left_size] */\n-\t\tdo_flush_shadow_used_ring(dev, vq, 0, size,\n+\t\tdo_flush_shadow_used_ring_split(dev, vq, 0, size,\n \t\t\t\t\t vq->shadow_used_idx - size);\n \t}\n \tvq->last_used_idx += vq->shadow_used_idx;\n@@ -120,7 +121,7 @@ flush_shadow_used_ring(struct virtio_net *dev, struct vhost_virtqueue *vq)\n }\n \n static __rte_always_inline void\n-update_shadow_used_ring(struct vhost_virtqueue *vq,\n+update_shadow_used_ring_split(struct vhost_virtqueue *vq,\n \t\t\t uint16_t desc_idx, uint16_t len)\n {\n \tuint16_t i = vq->shadow_used_idx++;\n@@ -353,7 +354,7 @@ reserve_avail_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\t\t\t\tVHOST_ACCESS_RW) < 0))\n \t\t\treturn -1;\n \t\tlen = RTE_MIN(len, size);\n-\t\tupdate_shadow_used_ring(vq, head_idx, len);\n+\t\tupdate_shadow_used_ring_split(vq, head_idx, len);\n \t\tsize -= len;\n \n \t\tcur_idx++;\n@@ -579,7 +580,7 @@ virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tdo_data_copy_enqueue(dev, vq);\n \n \tif (likely(vq->shadow_used_idx)) {\n-\t\tflush_shadow_used_ring(dev, vq);\n+\t\tflush_shadow_used_ring_split(dev, vq);\n \t\tvhost_vring_call(dev, vq);\n \t}\n \n@@ -1048,7 +1049,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tnext = TAILQ_NEXT(zmbuf, next);\n \n \t\t\tif (mbuf_is_consumed(zmbuf->mbuf)) {\n-\t\t\t\tupdate_shadow_used_ring(vq, zmbuf->desc_idx, 0);\n+\t\t\t\tupdate_shadow_used_ring_split(vq,\n+\t\t\t\t\t\tzmbuf->desc_idx, 0);\n \t\t\t\tnr_updated += 1;\n \n \t\t\t\tTAILQ_REMOVE(&vq->zmbuf_list, zmbuf, next);\n@@ -1059,7 +1061,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\t}\n \t\t}\n \n-\t\tflush_shadow_used_ring(dev, vq);\n+\t\tflush_shadow_used_ring_split(dev, vq);\n \t\tvhost_vring_call(dev, vq);\n \t}\n \n@@ -1091,7 +1093,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tbreak;\n \n \t\tif (likely(dev->dequeue_zero_copy == 0))\n-\t\t\tupdate_shadow_used_ring(vq, head_idx, 0);\n+\t\t\tupdate_shadow_used_ring_split(vq, head_idx, 0);\n \n \t\trte_prefetch0((void *)(uintptr_t)buf_vec[0].buf_addr);\n \n@@ -1138,7 +1140,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tdo_data_copy_dequeue(vq);\n \t\tif (unlikely(i < count))\n \t\t\tvq->shadow_used_idx = i;\n-\t\tflush_shadow_used_ring(dev, vq);\n+\t\tflush_shadow_used_ring_split(dev, vq);\n \t\tvhost_vring_call(dev, vq);\n \t}\n \n", "prefixes": [ "v9", "08/15" ] }{ "id": 42470, "url": "