get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96523,
    "url": "http://patchwork.dpdk.org/api/patches/96523/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210802101847.3462-8-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": "<20210802101847.3462-8-joyce.kong@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210802101847.3462-8-joyce.kong@arm.com",
    "date": "2021-08-02T10:18:42",
    "name": "[v1,07/12] app/eventdev: use compiler atomic builtins for packets sync",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "01100fe57d86dd2350ce80dd33c8eb0fdc0161a4",
    "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/20210802101847.3462-8-joyce.kong@arm.com/mbox/",
    "series": [
        {
            "id": 18128,
            "url": "http://patchwork.dpdk.org/api/series/18128/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18128",
            "date": "2021-08-02T10:18:35",
            "name": "use compiler atomic builtins for app",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18128/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96523/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/96523/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 C4574A0C41;\n\tMon,  2 Aug 2021 12:20:45 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B11AF41139;\n\tMon,  2 Aug 2021 12:20:45 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id AE1FA41139\n for <dev@dpdk.org>; Mon,  2 Aug 2021 12:20:44 +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 34606D6E;\n Mon,  2 Aug 2021 03:20:44 -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 7C6943F70D;\n Mon,  2 Aug 2021 03:20:37 -0700 (PDT)"
        ],
        "From": "Joyce Kong <joyce.kong@arm.com>",
        "To": "thomas@monjalon.net, david.marchand@redhat.com,\n honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com,\n konstantin.ananyev@intel.com, rsanford@akamai.com,\n erik.g.carrillo@intel.com, olivier.matz@6wind.com, yipeng1.wang@intel.com,\n sameh.gobriel@intel.com, bruce.richardson@intel.com,\n vladimir.medvedkin@intel.com, anatoly.burakov@intel.com,\n andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com,\n declan.doherty@intel.com, ciara.power@intel.com, xiaoyun.li@intel.com,\n nicolas.chautru@intel.com, maryam.tahhan@intel.com,\n reshma.pattan@intel.com, cristian.dumitrescu@intel.com",
        "Cc": "dev@dpdk.org,\n\tnd@arm.com",
        "Date": "Mon,  2 Aug 2021 05:18:42 -0500",
        "Message-Id": "<20210802101847.3462-8-joyce.kong@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210802101847.3462-1-joyce.kong@arm.com>",
        "References": "<20210802101847.3462-1-joyce.kong@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v1 07/12] app/eventdev: use compiler atomic\n builtins for packets 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 outstanding_pkts sync in eventdev cases.\n\nSigned-off-by: Joyce Kong <joyce.kong@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\n---\n app/test-eventdev/evt_main.c          | 1 -\n app/test-eventdev/test_order_atq.c    | 4 ++--\n app/test-eventdev/test_order_common.c | 4 ++--\n app/test-eventdev/test_order_common.h | 8 ++++----\n app/test-eventdev/test_order_queue.c  | 4 ++--\n 5 files changed, 10 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c\nindex a8d304bab3..01434691e1 100644\n--- a/app/test-eventdev/evt_main.c\n+++ b/app/test-eventdev/evt_main.c\n@@ -6,7 +6,6 @@\n #include <unistd.h>\n #include <signal.h>\n \n-#include <rte_atomic.h>\n #include <rte_debug.h>\n #include <rte_eal.h>\n #include <rte_eventdev.h>\ndiff --git a/app/test-eventdev/test_order_atq.c b/app/test-eventdev/test_order_atq.c\nindex 71215a07b6..2fee4b4daa 100644\n--- a/app/test-eventdev/test_order_atq.c\n+++ b/app/test-eventdev/test_order_atq.c\n@@ -28,7 +28,7 @@ order_atq_worker(void *arg, const bool flow_id_cap)\n \t\tuint16_t event = rte_event_dequeue_burst(dev_id, port,\n \t\t\t\t\t&ev, 1, 0);\n \t\tif (!event) {\n-\t\t\tif (rte_atomic64_read(outstand_pkts) <= 0)\n+\t\t\tif (__atomic_load_n(outstand_pkts, __ATOMIC_RELAXED) <= 0)\n \t\t\t\tbreak;\n \t\t\trte_pause();\n \t\t\tcontinue;\n@@ -64,7 +64,7 @@ order_atq_worker_burst(void *arg, const bool flow_id_cap)\n \t\t\t\tBURST_SIZE, 0);\n \n \t\tif (nb_rx == 0) {\n-\t\t\tif (rte_atomic64_read(outstand_pkts) <= 0)\n+\t\t\tif (__atomic_load_n(outstand_pkts, __ATOMIC_RELAXED) <= 0)\n \t\t\t\tbreak;\n \t\t\trte_pause();\n \t\t\tcontinue;\ndiff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c\nindex d7760061ba..ff7813f9c2 100644\n--- a/app/test-eventdev/test_order_common.c\n+++ b/app/test-eventdev/test_order_common.c\n@@ -187,7 +187,7 @@ order_test_setup(struct evt_test *test, struct evt_options *opt)\n \t\tevt_err(\"failed to allocate t->expected_flow_seq memory\");\n \t\tgoto exp_nomem;\n \t}\n-\trte_atomic64_set(&t->outstand_pkts, opt->nb_pkts);\n+\t__atomic_store_n(&t->outstand_pkts, opt->nb_pkts, __ATOMIC_RELAXED);\n \tt->err = false;\n \tt->nb_pkts = opt->nb_pkts;\n \tt->nb_flows = opt->nb_flows;\n@@ -294,7 +294,7 @@ order_launch_lcores(struct evt_test *test, struct evt_options *opt,\n \n \twhile (t->err == false) {\n \t\tuint64_t new_cycles = rte_get_timer_cycles();\n-\t\tint64_t remaining = rte_atomic64_read(&t->outstand_pkts);\n+\t\tint64_t remaining = __atomic_load_n(&t->outstand_pkts, __ATOMIC_RELAXED);\n \n \t\tif (remaining <= 0) {\n \t\t\tt->result = EVT_TEST_SUCCESS;\ndiff --git a/app/test-eventdev/test_order_common.h b/app/test-eventdev/test_order_common.h\nindex cd9d6009ec..1507265928 100644\n--- a/app/test-eventdev/test_order_common.h\n+++ b/app/test-eventdev/test_order_common.h\n@@ -48,7 +48,7 @@ struct test_order {\n \t * The atomic_* is an expensive operation,Since it is a functional test,\n \t * We are using the atomic_ operation to reduce the code complexity.\n \t */\n-\trte_atomic64_t outstand_pkts;\n+\tuint64_t outstand_pkts;\n \tenum evt_test_result result;\n \tuint32_t nb_flows;\n \tuint64_t nb_pkts;\n@@ -95,7 +95,7 @@ static __rte_always_inline void\n order_process_stage_1(struct test_order *const t,\n \t\tstruct rte_event *const ev, const uint32_t nb_flows,\n \t\tuint32_t *const expected_flow_seq,\n-\t\trte_atomic64_t *const outstand_pkts)\n+\t\tuint64_t *const outstand_pkts)\n {\n \tconst uint32_t flow = (uintptr_t)ev->mbuf % nb_flows;\n \t/* compare the seqn against expected value */\n@@ -113,7 +113,7 @@ order_process_stage_1(struct test_order *const t,\n \t */\n \texpected_flow_seq[flow]++;\n \trte_pktmbuf_free(ev->mbuf);\n-\trte_atomic64_sub(outstand_pkts, 1);\n+\t__atomic_fetch_sub(outstand_pkts, 1, __ATOMIC_RELAXED);\n }\n \n static __rte_always_inline void\n@@ -132,7 +132,7 @@ order_process_stage_invalid(struct test_order *const t,\n \tconst uint8_t port = w->port_id;\\\n \tconst uint32_t nb_flows = t->nb_flows;\\\n \tuint32_t *expected_flow_seq = t->expected_flow_seq;\\\n-\trte_atomic64_t *outstand_pkts = &t->outstand_pkts;\\\n+\tuint64_t *outstand_pkts = &t->outstand_pkts;\\\n \tif (opt->verbose_level > 1)\\\n \t\tprintf(\"%s(): lcore %d dev_id %d port=%d\\n\",\\\n \t\t\t__func__, rte_lcore_id(), dev_id, port)\ndiff --git a/app/test-eventdev/test_order_queue.c b/app/test-eventdev/test_order_queue.c\nindex 621367805a..80eaea5cf5 100644\n--- a/app/test-eventdev/test_order_queue.c\n+++ b/app/test-eventdev/test_order_queue.c\n@@ -28,7 +28,7 @@ order_queue_worker(void *arg, const bool flow_id_cap)\n \t\tuint16_t event = rte_event_dequeue_burst(dev_id, port,\n \t\t\t\t\t&ev, 1, 0);\n \t\tif (!event) {\n-\t\t\tif (rte_atomic64_read(outstand_pkts) <= 0)\n+\t\t\tif (__atomic_load_n(outstand_pkts, __ATOMIC_RELAXED) <= 0)\n \t\t\t\tbreak;\n \t\t\trte_pause();\n \t\t\tcontinue;\n@@ -64,7 +64,7 @@ order_queue_worker_burst(void *arg, const bool flow_id_cap)\n \t\t\t\tBURST_SIZE, 0);\n \n \t\tif (nb_rx == 0) {\n-\t\t\tif (rte_atomic64_read(outstand_pkts) <= 0)\n+\t\t\tif (__atomic_load_n(outstand_pkts, __ATOMIC_RELAXED) <= 0)\n \t\t\t\tbreak;\n \t\t\trte_pause();\n \t\t\tcontinue;\n",
    "prefixes": [
        "v1",
        "07/12"
    ]
}