get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124621,
    "url": "http://patchwork.dpdk.org/api/patches/124621/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1677718068-2412-3-git-send-email-roretzla@linux.microsoft.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": "<1677718068-2412-3-git-send-email-roretzla@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1677718068-2412-3-git-send-email-roretzla@linux.microsoft.com",
    "date": "2023-03-02T00:47:33",
    "name": "[02/17] telemetry: use previous value atomic fetch operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "df254aec63fc61124c2e2625cff99dab31833598",
    "submitter": {
        "id": 2077,
        "url": "http://patchwork.dpdk.org/api/people/2077/?format=api",
        "name": "Tyler Retzlaff",
        "email": "roretzla@linux.microsoft.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/1677718068-2412-3-git-send-email-roretzla@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 27214,
            "url": "http://patchwork.dpdk.org/api/series/27214/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=27214",
            "date": "2023-03-02T00:47:32",
            "name": "use __atomic operations returning previous value",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/27214/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/124621/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/124621/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 7D63341DAF;\n\tThu,  2 Mar 2023 01:48:10 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 68E344114B;\n\tThu,  2 Mar 2023 01:48:05 +0100 (CET)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id A1C7F40E2D\n for <dev@dpdk.org>; Thu,  2 Mar 2023 01:48:02 +0100 (CET)",
            "by linux.microsoft.com (Postfix, from userid 1086)\n id 0426A209FE0F; Wed,  1 Mar 2023 16:48:01 -0800 (PST)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 0426A209FE0F",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1677718082;\n bh=WAymalLmXCHQeCD3o4VXTvgzQGb7pJMgV91cFnILjHw=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=BIgblWidzRCMMeGD4Fm8jBDKpdUJzW9lWzzRwYIkoiuPyhdWCvuU2J8t0fqNZeI1C\n 77p6dSPGvDc8a6ncBu12Kr9MlbQ/42VJlb75JiWvqpctmxTShh1oDYsdC4ZY2kyYIk\n 0F/ujraeemBEloi6Ou3CMeKNYuJFjjLciPe0yRLw=",
        "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "Honnappa.Nagarahalli@arm.com, thomas@monjalon.net,\n Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "Subject": "[PATCH 02/17] telemetry: use previous value atomic fetch operations",
        "Date": "Wed,  1 Mar 2023 16:47:33 -0800",
        "Message-Id": "<1677718068-2412-3-git-send-email-roretzla@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1677718068-2412-1-git-send-email-roretzla@linux.microsoft.com>",
        "References": "<1677718068-2412-1-git-send-email-roretzla@linux.microsoft.com>",
        "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"
    },
    "content": "Use __atomic_fetch_{add,and,or,sub,xor} instead of\n__atomic_{add,and,or,sub,xor}_fetch when we have no interest in the\nresult of the operation.\n\nReduces unnecessary codegen that provided the result of the atomic\noperation that was not used.\n\nChange brings closer alignment with atomics available in C11 standard\nand will reduce review effort when they are integrated.\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/telemetry/telemetry.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c\nindex 7bceadc..deba7f3 100644\n--- a/lib/telemetry/telemetry.c\n+++ b/lib/telemetry/telemetry.c\n@@ -391,7 +391,7 @@ struct socket {\n \t\tbytes = read(s, buffer, sizeof(buffer) - 1);\n \t}\n \tclose(s);\n-\t__atomic_sub_fetch(&v2_clients, 1, __ATOMIC_RELAXED);\n+\t__atomic_fetch_sub(&v2_clients, 1, __ATOMIC_RELAXED);\n \treturn NULL;\n }\n \n@@ -414,7 +414,7 @@ struct socket {\n \t\t\t\tclose(s_accepted);\n \t\t\t\tcontinue;\n \t\t\t}\n-\t\t\t__atomic_add_fetch(s->num_clients, 1,\n+\t\t\t__atomic_fetch_add(s->num_clients, 1,\n \t\t\t\t\t__ATOMIC_RELAXED);\n \t\t}\n \t\trc = pthread_create(&th, NULL, s->fn,\n@@ -424,7 +424,7 @@ struct socket {\n \t\t\t\t strerror(rc));\n \t\t\tclose(s_accepted);\n \t\t\tif (s->num_clients != NULL)\n-\t\t\t\t__atomic_sub_fetch(s->num_clients, 1,\n+\t\t\t\t__atomic_fetch_sub(s->num_clients, 1,\n \t\t\t\t\t\t   __ATOMIC_RELAXED);\n \t\t\tcontinue;\n \t\t}\n",
    "prefixes": [
        "02/17"
    ]
}