get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10679,
    "url": "http://patches.dpdk.org/api/patches/10679/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1455879400-17827-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": "<1455879400-17827-4-git-send-email-i.maximets@samsung.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1455879400-17827-4-git-send-email-i.maximets@samsung.com",
    "date": "2016-02-19T10:56:40",
    "name": "[dpdk-dev,RFC,v2,3/3] vhost: avoid reordering of used->idx and last_used_idx updating.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5d68de6a5992f45d8b65d3b635e8203d5ac8904a",
    "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/1455879400-17827-4-git-send-email-i.maximets@samsung.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/10679/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/10679/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 389DBC4F6;\n\tFri, 19 Feb 2016 11:56:58 +0100 (CET)",
            "from mailout1.w1.samsung.com (mailout1.w1.samsung.com\n\t[210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 0B191C4E2\n\tfor <dev@dpdk.org>; Fri, 19 Feb 2016 11:56:55 +0100 (CET)",
            "from eucpsbgm1.samsung.com (unknown [203.254.199.244])\n\tby mailout1.w1.samsung.com\n\t(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5\n\t2014)) with ESMTP id <0O2S00AR0JQT9S20@mailout1.w1.samsung.com> for\n\tdev@dpdk.org; Fri, 19 Feb 2016 10:56:53 +0000 (GMT)",
            "from eusync4.samsung.com ( [203.254.199.214])\n\tby eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 33.CC.16778.5F4F6C65;\n\tFri, 19 Feb 2016 10:56:53 +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 <0O2S001Z8JQJEA80@eusync4.samsung.com>; Fri,\n\t19 Feb 2016 10:56:53 +0000 (GMT)"
        ],
        "X-AuditID": "cbfec7f4-f79026d00000418a-f5-56c6f4f5dec6",
        "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": "Fri, 19 Feb 2016 13:56:40 +0300",
        "Message-id": "<1455879400-17827-4-git-send-email-i.maximets@samsung.com>",
        "X-Mailer": "git-send-email 2.5.0",
        "In-reply-to": "<1455879400-17827-1-git-send-email-i.maximets@samsung.com>",
        "References": "<1455879400-17827-1-git-send-email-i.maximets@samsung.com>",
        "X-Brightmail-Tracker": "H4sIAAAAAAAAA+NgFprKLMWRmVeSWpSXmKPExsVy+t/xa7pfvxwLM/h3U9Xi3aftTBbtM88y\n\tWVxp/8luMXGSicX0pxEWk2dLWVyfcIHVgd1jw4l+Vo9fC5ayeize85LJ4861PWwe804GevRt\n\tWcUYwBbFZZOSmpNZllqkb5fAlfF93RvWgud8FVMXLmdqYPzJ3cXIySEhYCLx92kTG4QtJnHh\n\t3nowW0hgKaNE66PULkYuILuVSWLW7HZWkASbgI7EqdVHGEFsEYEEiSP7f7OCFDELLGOUuHhi\n\tMhNIQlggTmJnQyvYJBYBVYmeuTvBGngF3CSmPVkDZHMAbZOTWHAhHSTMKeAu8f/HF3aIxW4S\n\tM96fY5zAyLuAkWEVo2hqaXJBcVJ6rqFecWJucWleul5yfu4mRkhgfdnBuPiY1SFGAQ5GJR7e\n\tCwbHwoRYE8uKK3MPMUpwMCuJ8Na+AgrxpiRWVqUW5ccXleakFh9ilOZgURLnnbvrfYiQQHpi\n\tSWp2ampBahFMlomDU6qBUXq1sbphVOIGi7bIrr8WGV9evrvr91Jgj6iBw8H29/+z7un8iQxw\n\tnz7P5XuTZvtat0lh73xzN82+FeNUd/ZcNcfy5SKeJg+vXDvIwhXMNuVUTM4uYQZ/nW8fDxQU\n\tFKyZfnfBFZVTbD1Nt9c787y64M11MGhP1cyi6MJwhrXHdbisPj57le0Ro8RSnJFoqMVcVJwI\n\tAFhZ/sMoAgAA",
        "Cc": "Ilya Maximets <i.maximets@samsung.com>,\n\tDyasly Sergey <s.dyasly@samsung.com>",
        "Subject": "[dpdk-dev] [PATCH RFC v2 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 9095fb1..a03f687 100644\n--- a/lib/librte_vhost/vhost_rxtx.c\n+++ b/lib/librte_vhost/vhost_rxtx.c\n@@ -281,10 +281,13 @@ 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 \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@@ -586,19 +589,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",
        "v2",
        "3/3"
    ]
}