Show a patch.

GET /api/patches/42275/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 42275,
    "url": "http://patches.dpdk.org/api/patches/42275/",
    "web_url": "http://patches.dpdk.org/patch/42275/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180704215438.5579-9-maxime.coquelin@redhat.com>",
    "date": "2018-07-04T21:54:31",
    "name": "[v7,08/15] vhost: append shadow used ring function names with split",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "cc81b2d3cf1eb4a942679eedb610d6a625b88e49",
    "submitter": {
        "id": 512,
        "url": "http://patches.dpdk.org/api/people/512/",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/patch/42275/mbox/",
    "series": [
        {
            "id": 404,
            "url": "http://patches.dpdk.org/api/series/404/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=404",
            "date": "2018-07-04T21:54:23",
            "name": "Vhost: add support to packed ring layout",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/404/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42275/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42275/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<20180704215438.5579-1-maxime.coquelin@redhat.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2A1EC1BF63;\n\tWed,  4 Jul 2018 23:55:04 +0200 (CEST)",
            "from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73])\n\tby dpdk.org (Postfix) with ESMTP id 230F31BF51\n\tfor <dev@dpdk.org>; Wed,  4 Jul 2018 23:55:02 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6])\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 B9FF5402242D;\n\tWed,  4 Jul 2018 21:55:01 +0000 (UTC)",
            "from localhost.localdomain (ovpn-112-34.ams2.redhat.com\n\t[10.36.112.34])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id E1C2A2156880;\n\tWed,  4 Jul 2018 21:54:59 +0000 (UTC)"
        ],
        "References": "<20180704215438.5579-1-maxime.coquelin@redhat.com>",
        "Delivered-To": "patchwork@dpdk.org",
        "X-BeenThere": "dev@dpdk.org",
        "X-Scanned-By": "MIMEDefang 2.78 on 10.11.54.6",
        "Message-Id": "<20180704215438.5579-9-maxime.coquelin@redhat.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Precedence": "list",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-Greylist": [
            "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.11.55.6]); Wed, 04 Jul 2018 21:55:01 +0000 (UTC)",
            "inspected by milter-greylist-4.5.16 (mx1.redhat.com\n\t[10.11.55.6]); \n\tWed, 04 Jul 2018 21:55:01 +0000 (UTC) for IP:'10.11.54.6'\n\tDOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com'\n\tHELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:''"
        ],
        "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>",
        "To": "tiwei.bie@intel.com, zhihong.wang@intel.com, jfreimann@redhat.com,\n\tdev@dpdk.org",
        "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>",
        "Date": "Wed,  4 Jul 2018 23:54:31 +0200",
        "Cc": "mst@redhat.com, jasowang@redhat.com, wexu@redhat.com,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v7 08/15] vhost: append shadow used ring function\n\tnames with split"
    },
    "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 7705c853b..7db3877d4 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@@ -1047,7 +1048,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@@ -1058,7 +1060,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@@ -1090,7 +1092,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@@ -1137,7 +1139,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": [
        "v7",
        "08/15"
    ]
}