Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44779/?format=api
https://patches.dpdk.org/api/patches/44779/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1537172244-64874-1-git-send-email-gavin.hu@arm.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": "<1537172244-64874-1-git-send-email-gavin.hu@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1537172244-64874-1-git-send-email-gavin.hu@arm.com", "date": "2018-09-17T08:17:22", "name": "[v3,1/3] ring: read tail using atomic load", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "77e49069697e67915aaf9a0b92032a43fa009e05", "submitter": { "id": 1018, "url": "https://patches.dpdk.org/api/people/1018/?format=api", "name": "Gavin Hu", "email": "gavin.hu@arm.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1537172244-64874-1-git-send-email-gavin.hu@arm.com/mbox/", "series": [ { "id": 1347, "url": "https://patches.dpdk.org/api/series/1347/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1347", "date": "2018-09-17T08:17:22", "name": "[v3,1/3] ring: read tail using atomic load", "version": 3, "mbox": "https://patches.dpdk.org/series/1347/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44779/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/44779/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 B30184F98;\n\tMon, 17 Sep 2018 10:17:43 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id AC5F84F91;\n\tMon, 17 Sep 2018 10:17:41 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DC9BD80D;\n\tMon, 17 Sep 2018 01:17:40 -0700 (PDT)", "from net-arm-thunderx2.shanghai.arm.com\n\t(net-arm-thunderx2.shanghai.arm.com [10.169.40.70])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t6CBDF3F5C0; Mon, 17 Sep 2018 01:17:39 -0700 (PDT)" ], "From": "Gavin Hu <gavin.hu@arm.com>", "To": "dev@dpdk.org", "Cc": "gavin.hu@arm.com, Honnappa.Nagarahalli@arm.com, steve.capper@arm.com,\n\tOla.Liljedahl@arm.com, jerin.jacob@caviumnetworks.com, nd@arm.com,\n\tstable@dpdk.org", "Date": "Mon, 17 Sep 2018 16:17:22 +0800", "Message-Id": "<1537172244-64874-1-git-send-email-gavin.hu@arm.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<20180807031943.5331-1-gavin.hu@arm.com>", "References": "<20180807031943.5331-1-gavin.hu@arm.com>", "Subject": "[dpdk-dev] [PATCH v3 1/3] ring: read tail using atomic load", "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": "In update_tail, read ht->tail using __atomic_load.Although the\ncompiler currently seems to be doing the right thing even without\n_atomic_load, we don't want to give the compiler freedom to optimise\nwhat should be an atomic load, it should not be arbitarily moved\naround.\n\nFixes: 39368ebfc6 (\"ring: introduce C11 memory model barrier option\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>\nReviewed-by: Steve Capper <steve.capper@arm.com>\nReviewed-by: Ola Liljedahl <Ola.Liljedahl@arm.com>\n---\n lib/librte_ring/rte_ring_c11_mem.h | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h\nindex 94df3c4..234fea0 100644\n--- a/lib/librte_ring/rte_ring_c11_mem.h\n+++ b/lib/librte_ring/rte_ring_c11_mem.h\n@@ -21,7 +21,8 @@ update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val,\n \t * we need to wait for them to complete\n \t */\n \tif (!single)\n-\t\twhile (unlikely(ht->tail != old_val))\n+\t\twhile (unlikely(old_val != __atomic_load_n(&ht->tail,\n+\t\t\t\t\t\t__ATOMIC_RELAXED)))\n \t\t\trte_pause();\n \n \t__atomic_store_n(&ht->tail, new_val, __ATOMIC_RELEASE);\n", "prefixes": [ "v3", "1/3" ] }{ "id": 44779, "url": "