get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97104,
    "url": "http://patchwork.dpdk.org/api/patches/97104/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210819070908.25773-6-joyce.kong@arm.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": "<20210819070908.25773-6-joyce.kong@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210819070908.25773-6-joyce.kong@arm.com",
    "date": "2021-08-19T07:09:05",
    "name": "[v1,5/8] examples/l2fwd-jobstats: use compiler atomics for stats sync",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f1a0eac01bf6a1e8e0078f3e3e1adab41069ce65",
    "submitter": {
        "id": 970,
        "url": "http://patchwork.dpdk.org/api/people/970/?format=api",
        "name": "Joyce Kong",
        "email": "joyce.kong@arm.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/20210819070908.25773-6-joyce.kong@arm.com/mbox/",
    "series": [
        {
            "id": 18348,
            "url": "http://patchwork.dpdk.org/api/series/18348/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18348",
            "date": "2021-08-19T07:09:00",
            "name": "use compiler atomic builtins for examples",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18348/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/97104/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/97104/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 96C32A0C47;\n\tThu, 19 Aug 2021 09:10:11 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 24B9141223;\n\tThu, 19 Aug 2021 09:09:42 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 7A91341223\n for <dev@dpdk.org>; Thu, 19 Aug 2021 09:09:40 +0200 (CEST)",
            "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 0C9F5101E;\n Thu, 19 Aug 2021 00:09:40 -0700 (PDT)",
            "from net-arm-n1sdp.shanghai.arm.com (net-arm-n1sdp.shanghai.arm.com\n [10.169.208.222])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E4D683F40C;\n Thu, 19 Aug 2021 00:09:37 -0700 (PDT)"
        ],
        "From": "Joyce Kong <joyce.kong@arm.com>",
        "To": "",
        "Cc": "dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com,\n honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, nd@arm.com",
        "Date": "Thu, 19 Aug 2021 02:09:05 -0500",
        "Message-Id": "<20210819070908.25773-6-joyce.kong@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210819070908.25773-1-joyce.kong@arm.com>",
        "References": "<20210819070908.25773-1-joyce.kong@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v1 5/8] examples/l2fwd-jobstats: use compiler\n atomics for stats sync",
        "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": "Convert rte_atomic usages to compiler atomic built-ins\nfor stats_read_pending sync in l2fwd_jobstats module.\n\nSigned-off-by: Joyce Kong <joyce.kong@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\n examples/l2fwd-jobstats/main.c | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c\nindex bbb4a27a6d..99a17de181 100644\n--- a/examples/l2fwd-jobstats/main.c\n+++ b/examples/l2fwd-jobstats/main.c\n@@ -16,7 +16,6 @@\n #include <rte_memcpy.h>\n #include <rte_eal.h>\n #include <rte_launch.h>\n-#include <rte_atomic.h>\n #include <rte_cycles.h>\n #include <rte_prefetch.h>\n #include <rte_lcore.h>\n@@ -81,7 +80,7 @@ struct lcore_queue_conf {\n \tstruct rte_jobstats idle_job;\n \tstruct rte_jobstats_context jobs_context;\n \n-\trte_atomic16_t stats_read_pending;\n+\tuint16_t stats_read_pending;\n \trte_spinlock_t lock;\n } __rte_cache_aligned;\n /* >8 End of list of queues to be polled for given lcore. */\n@@ -155,9 +154,9 @@ show_lcore_stats(unsigned lcore_id)\n \tuint64_t collection_time = rte_get_timer_cycles();\n \n \t/* Ask forwarding thread to give us stats. */\n-\trte_atomic16_set(&qconf->stats_read_pending, 1);\n+\t__atomic_store_n(&qconf->stats_read_pending, 1, __ATOMIC_RELAXED);\n \trte_spinlock_lock(&qconf->lock);\n-\trte_atomic16_set(&qconf->stats_read_pending, 0);\n+\t__atomic_store_n(&qconf->stats_read_pending, 0, __ATOMIC_RELAXED);\n \n \t/* Collect context statistics. */\n \tstats_period = ctx->state_time - ctx->start_time;\n@@ -526,8 +525,8 @@ l2fwd_main_loop(void)\n \t\t\t\trepeats++;\n \t\t\t\tneed_manage = qconf->flush_timer.expire < now;\n \t\t\t\t/* Check if we was esked to give a stats. */\n-\t\t\t\tstats_read_pending =\n-\t\t\t\t\t\trte_atomic16_read(&qconf->stats_read_pending);\n+\t\t\t\tstats_read_pending = __atomic_load_n(&qconf->stats_read_pending,\n+\t\t\t\t\t\t__ATOMIC_RELAXED);\n \t\t\t\tneed_manage |= stats_read_pending;\n \n \t\t\t\tfor (i = 0; i < qconf->n_rx_port && !need_manage; i++)\n",
    "prefixes": [
        "v1",
        "5/8"
    ]
}