get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 103292,
    "url": "https://patches.dpdk.org/api/patches/103292/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211101060007.2632418-6-feifei.wang2@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": "<20211101060007.2632418-6-feifei.wang2@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211101060007.2632418-6-feifei.wang2@arm.com",
    "date": "2021-11-01T06:00:07",
    "name": "[v9,5/5] distributor: use wait until scheme",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ecebe950f4690b893372cfbce63427d941da1509",
    "submitter": {
        "id": 1771,
        "url": "https://patches.dpdk.org/api/people/1771/?format=api",
        "name": "Feifei Wang",
        "email": "feifei.wang2@arm.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211101060007.2632418-6-feifei.wang2@arm.com/mbox/",
    "series": [
        {
            "id": 20158,
            "url": "https://patches.dpdk.org/api/series/20158/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20158",
            "date": "2021-11-01T06:00:02",
            "name": "add new helper for wait scheme",
            "version": 9,
            "mbox": "https://patches.dpdk.org/series/20158/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/103292/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/103292/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 469A2A0C52;\n\tMon,  1 Nov 2021 07:00:54 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ACD5741130;\n\tMon,  1 Nov 2021 07:00:35 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 8A15741130\n for <dev@dpdk.org>; Mon,  1 Nov 2021 07:00:34 +0100 (CET)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1642ED6E;\n Sun, 31 Oct 2021 23:00:34 -0700 (PDT)",
            "from net-x86-dell-8268.shanghai.arm.com\n (net-x86-dell-8268.shanghai.arm.com [10.169.210.102])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E49EC3F70D;\n Sun, 31 Oct 2021 23:00:30 -0700 (PDT)"
        ],
        "From": "Feifei Wang <feifei.wang2@arm.com>",
        "To": "David Hunt <david.hunt@intel.com>",
        "Cc": "dev@dpdk.org, nd@arm.com, jerinjacobk@gmail.com,\n stephen@networkplumber.org, thomas@monjalon.net, david.marchand@redhat.com,\n Feifei Wang <feifei.wang2@arm.com>, Ruifeng Wang <ruifeng.wang@arm.com>,\n Jerin Jacob <jerinj@marvell.com>",
        "Date": "Mon,  1 Nov 2021 14:00:07 +0800",
        "Message-Id": "<20211101060007.2632418-6-feifei.wang2@arm.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211101060007.2632418-1-feifei.wang2@arm.com>",
        "References": "<20210902053253.3017858-1-feifei.wang2@arm.com>\n <20211101060007.2632418-1-feifei.wang2@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v9 5/5] distributor: use wait until scheme",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Instead of polling for bufptr64 to be updated, use\nwait until scheme for this case.\n\nSigned-off-by: Feifei Wang <feifei.wang2@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nAcked-by: Jerin Jacob <jerinj@marvell.com>\n---\n lib/distributor/rte_distributor_single.c | 10 ++++------\n 1 file changed, 4 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/lib/distributor/rte_distributor_single.c b/lib/distributor/rte_distributor_single.c\nindex f4725b1d0b..b653620688 100644\n--- a/lib/distributor/rte_distributor_single.c\n+++ b/lib/distributor/rte_distributor_single.c\n@@ -33,9 +33,8 @@ rte_distributor_request_pkt_single(struct rte_distributor_single *d,\n \tunion rte_distributor_buffer_single *buf = &d->bufs[worker_id];\n \tint64_t req = (((int64_t)(uintptr_t)oldpkt) << RTE_DISTRIB_FLAG_BITS)\n \t\t\t| RTE_DISTRIB_GET_BUF;\n-\twhile (unlikely(__atomic_load_n(&buf->bufptr64, __ATOMIC_RELAXED)\n-\t\t\t& RTE_DISTRIB_FLAGS_MASK))\n-\t\trte_pause();\n+\tRTE_WAIT_UNTIL_MASKED(&buf->bufptr64, RTE_DISTRIB_FLAGS_MASK,\n+\t\t==, 0, __ATOMIC_RELAXED);\n \n \t/* Sync with distributor on GET_BUF flag. */\n \t__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);\n@@ -74,9 +73,8 @@ rte_distributor_return_pkt_single(struct rte_distributor_single *d,\n \tunion rte_distributor_buffer_single *buf = &d->bufs[worker_id];\n \tuint64_t req = (((int64_t)(uintptr_t)oldpkt) << RTE_DISTRIB_FLAG_BITS)\n \t\t\t| RTE_DISTRIB_RETURN_BUF;\n-\twhile (unlikely(__atomic_load_n(&buf->bufptr64, __ATOMIC_RELAXED)\n-\t\t\t& RTE_DISTRIB_FLAGS_MASK))\n-\t\trte_pause();\n+\tRTE_WAIT_UNTIL_MASKED(&buf->bufptr64, RTE_DISTRIB_FLAGS_MASK,\n+\t\t==, 0, __ATOMIC_RELAXED);\n \n \t/* Sync with distributor on RETURN_BUF flag. */\n \t__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);\n",
    "prefixes": [
        "v9",
        "5/5"
    ]
}