get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53811,
    "url": "http://patches.dpdk.org/api/patches/53811/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190529130420.6428-5-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": "<20190529130420.6428-5-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190529130420.6428-5-maxime.coquelin@redhat.com",
    "date": "2019-05-29T13:04:19",
    "name": "[v3,4/5] vhost: simplify descriptor's buffer prefetching",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "473703b80bff382610055df5aff3a9ba6ab9ad1f",
    "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/20190529130420.6428-5-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 4809,
            "url": "http://patches.dpdk.org/api/series/4809/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4809",
            "date": "2019-05-29T13:04:15",
            "name": "vhost: I-cache pressure optimizations",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/4809/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53811/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/53811/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 D35E21B9BF;\n\tWed, 29 May 2019 15:05:18 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id BCEA81B9B0\n\tfor <dev@dpdk.org>; Wed, 29 May 2019 15:05:13 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\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 2547944FB1;\n\tWed, 29 May 2019 13:05:07 +0000 (UTC)",
            "from localhost.localdomain (ovpn-112-24.ams2.redhat.com\n\t[10.36.112.24])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 8CE0A1715C;\n\tWed, 29 May 2019 13:05:02 +0000 (UTC)"
        ],
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, tiwei.bie@intel.com, david.marchand@redhat.com,\n\tjfreimann@redhat.com, bruce.richardson@intel.com,\n\tzhihong.wang@intel.com, \n\tkonstantin.ananyev@intel.com, mattias.ronnblom@ericsson.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Wed, 29 May 2019 15:04:19 +0200",
        "Message-Id": "<20190529130420.6428-5-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20190529130420.6428-1-maxime.coquelin@redhat.com>",
        "References": "<20190529130420.6428-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]); Wed, 29 May 2019 13:05:12 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v3 4/5] vhost: simplify descriptor's buffer\n\tprefetching",
        "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": "Now that we have a single function to map the descriptors\nbuffers, let's prefetch them there as it is the earliest\nplace we can do it.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nReviewed-by: Tiwei Bie <tiwei.bie@intel.com>\n---\n lib/librte_vhost/virtio_net.c | 32 ++------------------------------\n 1 file changed, 2 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 4564e9bcc9..8f0e784f77 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -286,6 +286,8 @@ map_one_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tif (unlikely(!desc_addr))\n \t\t\treturn -1;\n \n+\t\trte_prefetch0((void *)(uintptr_t)desc_addr);\n+\n \t\tbuf_vec[vec_id].buf_iova = desc_iova;\n \t\tbuf_vec[vec_id].buf_addr = desc_addr;\n \t\tbuf_vec[vec_id].buf_len  = desc_chunck_len;\n@@ -666,9 +668,6 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tbuf_iova = buf_vec[vec_idx].buf_iova;\n \tbuf_len = buf_vec[vec_idx].buf_len;\n \n-\tif (nr_vec > 1)\n-\t\trte_prefetch0((void *)(uintptr_t)buf_vec[1].buf_addr);\n-\n \tif (unlikely(buf_len < dev->vhost_hlen && nr_vec <= 1)) {\n \t\terror = -1;\n \t\tgoto out;\n@@ -711,10 +710,6 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tbuf_iova = buf_vec[vec_idx].buf_iova;\n \t\t\tbuf_len = buf_vec[vec_idx].buf_len;\n \n-\t\t\t/* Prefetch next buffer address. */\n-\t\t\tif (vec_idx + 1 < nr_vec)\n-\t\t\t\trte_prefetch0((void *)(uintptr_t)\n-\t\t\t\t\t\tbuf_vec[vec_idx + 1].buf_addr);\n \t\t\tbuf_offset = 0;\n \t\t\tbuf_avail  = buf_len;\n \t\t}\n@@ -812,8 +807,6 @@ virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tbreak;\n \t\t}\n \n-\t\trte_prefetch0((void *)(uintptr_t)buf_vec[0].buf_addr);\n-\n \t\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) current index %d | end index %d\\n\",\n \t\t\tdev->vid, vq->last_avail_idx,\n \t\t\tvq->last_avail_idx + num_buffers);\n@@ -861,8 +854,6 @@ virtio_dev_rx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tbreak;\n \t\t}\n \n-\t\trte_prefetch0((void *)(uintptr_t)buf_vec[0].buf_addr);\n-\n \t\tVHOST_LOG_DEBUG(VHOST_DATA, \"(%d) current index %d | end index %d\\n\",\n \t\t\tdev->vid, vq->last_avail_idx,\n \t\t\tvq->last_avail_idx + num_buffers);\n@@ -1118,9 +1109,6 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tgoto out;\n \t}\n \n-\tif (likely(nr_vec > 1))\n-\t\trte_prefetch0((void *)(uintptr_t)buf_vec[1].buf_addr);\n-\n \tif (virtio_net_with_host_offload(dev)) {\n \t\tif (unlikely(buf_len < sizeof(struct virtio_net_hdr))) {\n \t\t\t/*\n@@ -1131,7 +1119,6 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\thdr = &tmp_hdr;\n \t\t} else {\n \t\t\thdr = (struct virtio_net_hdr *)((uintptr_t)buf_addr);\n-\t\t\trte_prefetch0(hdr);\n \t\t}\n \t}\n \n@@ -1161,9 +1148,6 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tbuf_avail = buf_vec[vec_idx].buf_len - dev->vhost_hlen;\n \t}\n \n-\trte_prefetch0((void *)(uintptr_t)\n-\t\t\t(buf_addr + buf_offset));\n-\n \tPRINT_PACKET(dev,\n \t\t\t(uintptr_t)(buf_addr + buf_offset),\n \t\t\t(uint32_t)buf_avail, 0);\n@@ -1229,14 +1213,6 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tbuf_iova = buf_vec[vec_idx].buf_iova;\n \t\t\tbuf_len = buf_vec[vec_idx].buf_len;\n \n-\t\t\t/*\n-\t\t\t * Prefecth desc n + 1 buffer while\n-\t\t\t * desc n buffer is processed.\n-\t\t\t */\n-\t\t\tif (vec_idx + 1 < nr_vec)\n-\t\t\t\trte_prefetch0((void *)(uintptr_t)\n-\t\t\t\t\t\tbuf_vec[vec_idx + 1].buf_addr);\n-\n \t\t\tbuf_offset = 0;\n \t\t\tbuf_avail  = buf_len;\n \n@@ -1380,8 +1356,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tif (likely(dev->dequeue_zero_copy == 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 \t\tpkts[i] = rte_pktmbuf_alloc(mbuf_pool);\n \t\tif (unlikely(pkts[i] == NULL)) {\n \t\t\tRTE_LOG(ERR, VHOST_DATA,\n@@ -1491,8 +1465,6 @@ virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\tupdate_shadow_used_ring_packed(vq, buf_id, 0,\n \t\t\t\t\tdesc_count);\n \n-\t\trte_prefetch0((void *)(uintptr_t)buf_vec[0].buf_addr);\n-\n \t\tpkts[i] = rte_pktmbuf_alloc(mbuf_pool);\n \t\tif (unlikely(pkts[i] == NULL)) {\n \t\t\tRTE_LOG(ERR, VHOST_DATA,\n",
    "prefixes": [
        "v3",
        "4/5"
    ]
}