get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 10671,
    "url": "https://patches.dpdk.org/api/patches/10671/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1455863563-15751-4-git-send-email-i.maximets@samsung.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1455863563-15751-4-git-send-email-i.maximets@samsung.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1455863563-15751-4-git-send-email-i.maximets@samsung.com",
    "date": "2016-02-19T06:32:42",
    "name": "[dpdk-dev,RFC,3/4] 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": "https://patches.dpdk.org/api/people/323/?format=api",
        "name": "Ilya Maximets",
        "email": "i.maximets@samsung.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1455863563-15751-4-git-send-email-i.maximets@samsung.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/10671/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/10671/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 2A869C4CE;\n\tFri, 19 Feb 2016 07:33:00 +0100 (CET)",
            "from mailout3.w1.samsung.com (mailout3.w1.samsung.com\n\t[210.118.77.13]) by dpdk.org (Postfix) with ESMTP id 6366EC48C\n\tfor <dev@dpdk.org>; Fri, 19 Feb 2016 07:32:58 +0100 (CET)",
            "from eucpsbgm2.samsung.com (unknown [203.254.199.245])\n\tby mailout3.w1.samsung.com\n\t(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5\n\t2014)) with ESMTP id <0O2S00BF67IXYE70@mailout3.w1.samsung.com> for\n\tdev@dpdk.org; Fri, 19 Feb 2016 06:32:57 +0000 (GMT)",
            "from eusync4.samsung.com ( [203.254.199.214])\n\tby eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 7B.48.21385.917B6C65;\n\tFri, 19 Feb 2016 06:32:57 +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 <0O2S00G447IL8D70@eusync4.samsung.com>; Fri,\n\t19 Feb 2016 06:32:57 +0000 (GMT)"
        ],
        "X-AuditID": "cbfec7f5-f79b16d000005389-54-56c6b7193107",
        "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 09:32:42 +0300",
        "Message-id": "<1455863563-15751-4-git-send-email-i.maximets@samsung.com>",
        "X-Mailer": "git-send-email 2.5.0",
        "In-reply-to": "<1455863563-15751-1-git-send-email-i.maximets@samsung.com>",
        "References": "<1455863563-15751-1-git-send-email-i.maximets@samsung.com>",
        "X-Brightmail-Tracker": "H4sIAAAAAAAAA+NgFprCLMWRmVeSWpSXmKPExsVy+t/xa7qS24+FGay9I2Dx7tN2Jov2mWeZ\n\tLK60/2S3mDjJxGL60wiLybOlLK5PuMDqwO6x4UQ/q8evBUtZPRbvecnkcefaHjaPeScDPfq2\n\trGIMYIvisklJzcksSy3St0vgyvi+7g1rwXO+iqkLlzM1MP7k7mLk5JAQMJH4PvMwE4QtJnHh\n\t3nq2LkYuDiGBpYwSc670QTmtTBKt324xglSxCehInFp9BMwWEUiQOLL/NytIEbPAMkaJiycm\n\tA43i4BAWiJaYtIIdxGQRUJWY/YQLpJxXwE3ie8sCVpCwhICcxIIL6SBhTgF3iS+bWsAmCgGV\n\t9J3dxTiBkXcBI8MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxNjJCw+rqDcekxq0OMAhyMSjy8\n\tFXrHwoRYE8uKK3MPMUpwMCuJ8Or6A4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzztz1PkRIID2x\n\tJDU7NbUgtQgmy8TBKdXAuHTOl0im1ZoRhYZWYr5iZi8NXi7Vb56Qub6mxuVJiPKmxfvOeV5b\n\t+9E1/mlGi+fEjSu8Ndy03ecwd8icu/5uY/UtX8vFmsLXN02QcNbXfzHfRESeofbL4fKjdz/0\n\tNyY/SGN87LUtVvXX2m+nZ+a8Cgz5e1pb2ahob9OqDVuuqDAGee39+T3xlRJLcUaioRZzUXEi\n\tAHJp2tonAgAA",
        "Cc": "Ilya Maximets <i.maximets@samsung.com>,\n\tDyasly Sergey <s.dyasly@samsung.com>",
        "Subject": "[dpdk-dev] [PATCH RFC 3/4] vhost: avoid reordering of used->idx and\n\tlast_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",
        "3/4"
    ]
}