get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75983,
    "url": "http://patchwork.dpdk.org/api/patches/75983/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200826092002.19395-1-diogo.behrens@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200826092002.19395-1-diogo.behrens@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200826092002.19395-1-diogo.behrens@huawei.com",
    "date": "2020-08-26T09:20:02",
    "name": "librte_eal: fix mcslock hang on weak memory",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "04f34407279a636a440dc6083553316b7ec65c22",
    "submitter": {
        "id": 1937,
        "url": "http://patchwork.dpdk.org/api/people/1937/?format=api",
        "name": "Diogo Behrens",
        "email": "diogo.behrens@huawei.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200826092002.19395-1-diogo.behrens@huawei.com/mbox/",
    "series": [
        {
            "id": 11799,
            "url": "http://patchwork.dpdk.org/api/series/11799/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11799",
            "date": "2020-08-26T09:20:02",
            "name": "librte_eal: fix mcslock hang on weak memory",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/11799/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/75983/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/75983/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 28E66A04B1;\n\tWed, 26 Aug 2020 11:20:38 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 73EF44F9C;\n\tWed, 26 Aug 2020 11:20:37 +0200 (CEST)",
            "from huawei.com (lhrrgout.huawei.com [185.176.76.210])\n by dpdk.org (Postfix) with ESMTP id CC6E41F1C\n for <dev@dpdk.org>; Wed, 26 Aug 2020 11:20:35 +0200 (CEST)",
            "from lhreml728-chm.china.huawei.com (unknown [172.18.7.106])\n by Forcepoint Email with ESMTP id 1E0625CE3FFC13825177;\n Wed, 26 Aug 2020 10:20:34 +0100 (IST)",
            "from debian.fritz.box (10.198.195.7) by\n lhreml728-chm.china.huawei.com (10.201.108.79) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.1913.5; Wed, 26 Aug 2020 10:20:16 +0100"
        ],
        "From": "Diogo Behrens <diogo.behrens@huawei.com>",
        "To": "Phil Yang <phil.yang@arm.com>",
        "CC": "<dev@dpdk.org>",
        "Date": "Wed, 26 Aug 2020 11:20:02 +0200",
        "Message-ID": "<20200826092002.19395-1-diogo.behrens@huawei.com>",
        "X-Mailer": "git-send-email 2.28.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.198.195.7]",
        "X-ClientProxiedBy": "lhreml727-chm.china.huawei.com (10.201.108.78) To\n lhreml728-chm.china.huawei.com (10.201.108.79)",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH] librte_eal: fix mcslock hang on weak memory",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The initialization me->locked=1 in lock() must happen before\n    next->locked=0 in unlock(), otherwise a thread may hang forever,\n    waiting me->locked become 0. On weak memory systems (such as ARMv8),\n    the current implementation allows me->locked=1 to be reordered with\n    announcing the node (pred->next=me) and, consequently, to be\n    reordered with next->locked=0 in unlock().\n\n    This fix adds a release barrier to pred->next=me, forcing\n    me->locked=1 to happen before this operation.\n\nSigned-off-by: Diogo Behrens <diogo.behrens@huawei.com>\n---\n lib/librte_eal/include/generic/rte_mcslock.h | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h\nindex 2bef28351..ce553f547 100644\n--- a/lib/librte_eal/include/generic/rte_mcslock.h\n+++ b/lib/librte_eal/include/generic/rte_mcslock.h\n@@ -68,7 +68,14 @@ rte_mcslock_lock(rte_mcslock_t **msl, rte_mcslock_t *me)\n \t\t */\n \t\treturn;\n \t}\n-\t__atomic_store_n(&prev->next, me, __ATOMIC_RELAXED);\n+\t/* The store to me->next above should also complete before the node is\n+\t * visible to predecessor thread releasing the lock. Hence, the store\n+\t * prev->next also requires release semantics. Note that, for example,\n+\t * on ARM, the release semantics in the exchange operation is not\n+\t * strong as a release fence and is not sufficient to enforce the\n+\t * desired order here.\n+\t */\n+\t__atomic_store_n(&prev->next, me, __ATOMIC_RELEASE);\n \n \t/* The while-load of me->locked should not move above the previous\n \t * store to prev->next. Otherwise it will cause a deadlock. Need a\n",
    "prefixes": []
}