get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10786,
    "url": "http://patches.dpdk.org/api/patches/10786/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1456314438-4021-4-git-send-email-i.maximets@samsung.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": "<1456314438-4021-4-git-send-email-i.maximets@samsung.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1456314438-4021-4-git-send-email-i.maximets@samsung.com",
    "date": "2016-02-24T11:47:18",
    "name": "[dpdk-dev,RFC,v3,3/3] vhost: avoid reordering of used->idx and last_used_idx updating.",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "1d3852162185ecd761b1307e45ef893007689034",
    "submitter": {
        "id": 323,
        "url": "http://patches.dpdk.org/api/people/323/?format=api",
        "name": "Ilya Maximets",
        "email": "i.maximets@samsung.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1456314438-4021-4-git-send-email-i.maximets@samsung.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/10786/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/10786/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 F0AA42BDB;\n\tWed, 24 Feb 2016 12:47:40 +0100 (CET)",
            "from mailout2.w1.samsung.com (mailout2.w1.samsung.com\n\t[210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 9CEBF2BD3\n\tfor <dev@dpdk.org>; Wed, 24 Feb 2016 12:47:37 +0100 (CET)",
            "from eucpsbgm1.samsung.com (unknown [203.254.199.244])\n\tby mailout2.w1.samsung.com\n\t(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5\n\t2014)) with ESMTP id <0O3100GR8VFD2GA0@mailout2.w1.samsung.com> for\n\tdev@dpdk.org; Wed, 24 Feb 2016 11:47:37 +0000 (GMT)",
            "from eusync4.samsung.com ( [203.254.199.214])\n\tby eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 12.06.16778.9589DC65;\n\tWed, 24 Feb 2016 11:47:37 +0000 (GMT)",
            "from imaximets.rnd.samsung.ru ([106.109.129.180])\n\tby eusync4.samsung.com\n\t(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5\n\t2014)) with ESMTPA id <0O3100380VF3RS40@eusync4.samsung.com>; Wed,\n\t24 Feb 2016 11:47:37 +0000 (GMT)"
        ],
        "X-AuditID": "cbfec7f4-f79026d00000418a-3d-56cd9859b0d8",
        "From": "Ilya Maximets <i.maximets@samsung.com>",
        "To": "dev@dpdk.org, Huawei Xie <huawei.xie@intel.com>,\n\tYuanhan Liu <yuanhan.liu@linux.intel.com>",
        "Date": "Wed, 24 Feb 2016 14:47:18 +0300",
        "Message-id": "<1456314438-4021-4-git-send-email-i.maximets@samsung.com>",
        "X-Mailer": "git-send-email 2.5.0",
        "In-reply-to": "<1456314438-4021-1-git-send-email-i.maximets@samsung.com>",
        "References": "<1456314438-4021-1-git-send-email-i.maximets@samsung.com>",
        "X-Brightmail-Tracker": "H4sIAAAAAAAAA+NgFlrBLMWRmVeSWpSXmKPExsVy+t/xa7qRM86GGWw4JWzx7tN2Jov2mWeZ\n\tLK60/2S3mDjJxGL60wiLYz2fWC0mz5ay+LJpOpvF9QkXWB04PS7232H02HCin9Xj14KlrB6N\n\tzyU8Fu95yeRx59oeNo95JwM9+rasYgzgiOKySUnNySxLLdK3S+DKOHYxq+AUf8WTSStZGhhP\n\t83QxcnJICJhI3L5xgh3CFpO4cG89WxcjF4eQwFJGif49m9khnFYmiU8HvzGDVLEJ6EicWn2E\n\tEcQWEUiQOLL/NytIEbPAb0aJHXuawIqEBeIkTszoALNZBFQlHh5sYAGxeQVcJW6sOgo0lQNo\n\tnZzEggvpIGFOATeJxbMWg5ULAZW8fXGcaQIj7wJGhlWMoqmlyQXFSem5hnrFibnFpXnpesn5\n\tuZsYIeH3ZQfj4mNWhxgFOBiVeHgfbDgTJsSaWFZcmXuIUYKDWUmEN27a2TAh3pTEyqrUovz4\n\totKc1OJDjNIcLErivHN3vQ8REkhPLEnNTk0tSC2CyTJxcEo1MMoU7nutvXvXmh7hjdWm38K+\n\tGq8rOH2B91r9uafndn/xE58TqnFGw78qUTrx2JqOD0eZHp44/Pv7yuiQU9dWpivvZfxe22N8\n\t5Pa/o/t+CQRX9weazoxLXZ/heGzRZJ8vu64pm8lIM+ll9Lkx5U05xzGnI10779Xktm/O7zlu\n\tv+WJPJ301OPalWdKLMUZiYZazEXFiQAOfDkXOwIAAA==",
        "Cc": "Dyasly Sergey <s.dyasly@samsung.com>,\n\tIlya Maximets <i.maximets@samsung.com>",
        "Subject": "[dpdk-dev] [PATCH RFC v3 3/3] vhost: avoid reordering of used->idx\n\tand last_used_idx updating.",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "Calling rte_vhost_enqueue_burst() simultaneously from different threads\nfor the same queue_id requires additional SMP memory barrier to avoid\nreordering of used->idx and last_used_idx updates.\n\nIn case of virtio_dev_rx() memory barrier rte_mb() simply moved one\ninstruction higher.\n\nSigned-off-by: Ilya Maximets <i.maximets@samsung.com>\n---\n lib/librte_vhost/vhost_rxtx.c | 16 ++++++++++++----\n 1 file changed, 12 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c\nindex a8e2582..4d37aa3 100644\n--- a/lib/librte_vhost/vhost_rxtx.c\n+++ b/lib/librte_vhost/vhost_rxtx.c\n@@ -323,13 +323,16 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,\n \t\trte_pause();\n \n \t*(volatile uint16_t *)&vq->used->idx += count;\n-\tvq->last_used_idx = res_end_idx;\n \tvhost_log_used_vring(dev, vq,\n \t\toffsetof(struct vring_used, idx),\n \t\tsizeof(vq->used->idx));\n \n-\t/* flush used->idx update before we read avail->flags. */\n+\t/*\n+\t * Flush used->idx update to make it visible to virtio and all other\n+\t * threads before allowing to modify it.\n+\t */\n \trte_mb();\n+\tvq->last_used_idx = res_end_idx;\n \n \t/* Kick the guest if necessary. */\n \tif (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))\n@@ -645,19 +648,24 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,\n \t\t\trte_pause();\n \n \t\t*(volatile uint16_t *)&vq->used->idx += entry_success;\n+\t\t/*\n+\t\t * Flush used->idx update to make it visible to all\n+\t\t * other threads before allowing to modify it.\n+\t\t */\n+\t\trte_smp_wmb();\n+\n \t\tvq->last_used_idx = res_cur_idx;\n \t}\n \n merge_rx_exit:\n \tif (likely(pkt_idx)) {\n-\t\t/* flush used->idx update before we read avail->flags. */\n+\t\t/* Flush used->idx update to make it visible to virtio. */\n \t\trte_mb();\n \n \t\t/* Kick the guest if necessary. */\n \t\tif (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))\n \t\t\teventfd_write(vq->callfd, (eventfd_t)1);\n \t}\n-\n \treturn pkt_idx;\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "v3",
        "3/3"
    ]
}