get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98507,
    "url": "http://patchwork.dpdk.org/api/patches/98507/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210909231312.2572006-4-honnappa.nagarahalli@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": "<20210909231312.2572006-4-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210909231312.2572006-4-honnappa.nagarahalli@arm.com",
    "date": "2021-09-09T23:13:09",
    "name": "[v2,3/6] eal: lcore state FINISHED is not required",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3cfaf5c04e8e6fe818ff38d31cb38a48e2fe91af",
    "submitter": {
        "id": 1045,
        "url": "http://patchwork.dpdk.org/api/people/1045/?format=api",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210909231312.2572006-4-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 18807,
            "url": "http://patchwork.dpdk.org/api/series/18807/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18807",
            "date": "2021-09-09T23:13:06",
            "name": "Use correct memory ordering in eal functions",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/18807/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/98507/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/98507/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 6C71DA0547;\n\tFri, 10 Sep 2021 01:13:57 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A80CB41139;\n\tFri, 10 Sep 2021 01:13:46 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 9D769410F5\n for <dev@dpdk.org>; Fri, 10 Sep 2021 01:13:42 +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 1A105101E;\n Thu,  9 Sep 2021 16:13:42 -0700 (PDT)",
            "from 2p2660v4-1.austin.arm.com (2p2660v4-1.austin.arm.com\n [10.118.13.211])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 11F883F766;\n Thu,  9 Sep 2021 16:13:42 -0700 (PDT)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "To": "dev@dpdk.org, honnappa.nagarahalli@arm.com, konstantin.ananyev@intel.com,\n david.marchand@redhat.com, feifei.wang2@arm.com",
        "Cc": "ruifeng.wang@arm.com, nd@arm.com, Ola Liljedahl <ola.liljedahl@arm.com>,\n Feifei Wang <feifei.wang@arm.com>",
        "Date": "Thu,  9 Sep 2021 18:13:09 -0500",
        "Message-Id": "<20210909231312.2572006-4-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210909231312.2572006-1-honnappa.nagarahalli@arm.com>",
        "References": "<20210224212018.17576-1-honnappa.nagarahalli@arm.com>\n <20210909231312.2572006-1-honnappa.nagarahalli@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 3/6] eal: lcore state FINISHED is not required",
        "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": "FINISHED state seems to be used to indicate that the worker's update\nof the 'state' is not visible to other threads. There seems to be no\nrequirement to have such a state.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>\nReviewed-by: Feifei Wang <feifei.wang@arm.com>\n---\n drivers/event/dpaa2/dpaa2_eventdev_selftest.c |  2 +-\n drivers/event/octeontx/ssovf_evdev_selftest.c |  2 +-\n drivers/event/sw/sw_evdev_selftest.c          |  4 ++--\n examples/l2fwd-keepalive/main.c               |  3 +--\n lib/eal/common/eal_common_launch.c            |  7 ++-----\n lib/eal/freebsd/eal_thread.c                  |  4 ++--\n lib/eal/include/rte_launch.h                  |  9 +++++----\n lib/eal/include/rte_service.h                 |  4 +---\n lib/eal/linux/eal_thread.c                    | 10 ++--------\n lib/eal/windows/eal_thread.c                  | 10 ++--------\n 10 files changed, 19 insertions(+), 36 deletions(-)",
    "diff": "diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c\nindex cd7311a94d..bbbd20951f 100644\n--- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c\n+++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c\n@@ -468,7 +468,7 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count)\n \tRTE_SET_USED(count);\n \n \tprint_cycles = cycles = rte_get_timer_cycles();\n-\twhile (rte_eal_get_lcore_state(lcore) != FINISHED) {\n+\twhile (rte_eal_get_lcore_state(lcore) != WAIT) {\n \t\tuint64_t new_cycles = rte_get_timer_cycles();\n \n \t\tif (new_cycles - print_cycles > rte_get_timer_hz()) {\ndiff --git a/drivers/event/octeontx/ssovf_evdev_selftest.c b/drivers/event/octeontx/ssovf_evdev_selftest.c\nindex 528f99dd84..d7b0d22111 100644\n--- a/drivers/event/octeontx/ssovf_evdev_selftest.c\n+++ b/drivers/event/octeontx/ssovf_evdev_selftest.c\n@@ -579,7 +579,7 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count)\n \tRTE_SET_USED(count);\n \n \tprint_cycles = cycles = rte_get_timer_cycles();\n-\twhile (rte_eal_get_lcore_state(lcore) != FINISHED) {\n+\twhile (rte_eal_get_lcore_state(lcore) != WAIT) {\n \t\tuint64_t new_cycles = rte_get_timer_cycles();\n \n \t\tif (new_cycles - print_cycles > rte_get_timer_hz()) {\ndiff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c\nindex d53e903129..9768d3a0c7 100644\n--- a/drivers/event/sw/sw_evdev_selftest.c\n+++ b/drivers/event/sw/sw_evdev_selftest.c\n@@ -3140,8 +3140,8 @@ worker_loopback(struct test *t, uint8_t disable_implicit_release)\n \trte_eal_remote_launch(worker_loopback_worker_fn, t, w_lcore);\n \n \tprint_cycles = cycles = rte_get_timer_cycles();\n-\twhile (rte_eal_get_lcore_state(p_lcore) != FINISHED ||\n-\t\t\trte_eal_get_lcore_state(w_lcore) != FINISHED) {\n+\twhile (rte_eal_get_lcore_state(p_lcore) != WAIT ||\n+\t\t\trte_eal_get_lcore_state(w_lcore) != WAIT) {\n \n \t\trte_service_run_iter_on_app_lcore(t->service_id, 1);\n \ndiff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c\nindex 4e1a17cfe4..b4f9d7334b 100644\n--- a/examples/l2fwd-keepalive/main.c\n+++ b/examples/l2fwd-keepalive/main.c\n@@ -507,8 +507,7 @@ dead_core(__rte_unused void *ptr_data, const int id_core)\n \tif (terminate_signal_received)\n \t\treturn;\n \tprintf(\"Dead core %i - restarting..\\n\", id_core);\n-\tif (rte_eal_get_lcore_state(id_core) == FINISHED) {\n-\t\trte_eal_wait_lcore(id_core);\n+\tif (rte_eal_get_lcore_state(id_core) == WAIT) {\n \t\trte_eal_remote_launch(l2fwd_launch_one_lcore, NULL, id_core);\n \t} else {\n \t\tprintf(\"..false positive!\\n\");\ndiff --git a/lib/eal/common/eal_common_launch.c b/lib/eal/common/eal_common_launch.c\nindex 34f854ad80..78fd940267 100644\n--- a/lib/eal/common/eal_common_launch.c\n+++ b/lib/eal/common/eal_common_launch.c\n@@ -26,14 +26,11 @@ rte_eal_wait_lcore(unsigned worker_id)\n \tif (lcore_config[worker_id].state == WAIT)\n \t\treturn 0;\n \n-\twhile (lcore_config[worker_id].state != WAIT &&\n-\t       lcore_config[worker_id].state != FINISHED)\n+\twhile (lcore_config[worker_id].state != WAIT)\n \t\trte_pause();\n \n \trte_rmb();\n \n-\t/* we are in finished state, go to wait state */\n-\tlcore_config[worker_id].state = WAIT;\n \treturn lcore_config[worker_id].ret;\n }\n \n@@ -62,7 +59,7 @@ rte_eal_mp_remote_launch(int (*f)(void *), void *arg,\n \n \tif (call_main == CALL_MAIN) {\n \t\tlcore_config[main_lcore].ret = f(arg);\n-\t\tlcore_config[main_lcore].state = FINISHED;\n+\t\tlcore_config[main_lcore].state = WAIT;\n \t}\n \n \treturn 0;\ndiff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c\nindex 17b8f39966..e5e3edf79b 100644\n--- a/lib/eal/freebsd/eal_thread.c\n+++ b/lib/eal/freebsd/eal_thread.c\n@@ -28,7 +28,7 @@\n /*\n  * Send a message to a worker lcore identified by worker_id to call a\n  * function f with argument arg. Once the execution is done, the\n- * remote lcore switch in FINISHED state.\n+ * remote lcore switches to WAIT state.\n  */\n int\n rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id)\n@@ -140,7 +140,7 @@ eal_thread_loop(__rte_unused void *arg)\n \t\tlcore_config[lcore_id].f = NULL;\n \t\tlcore_config[lcore_id].arg = NULL;\n \t\trte_wmb();\n-\t\tlcore_config[lcore_id].state = FINISHED;\n+\t\tlcore_config[lcore_id].state = WAIT;\n \t}\n \n \t/* never reached */\ndiff --git a/lib/eal/include/rte_launch.h b/lib/eal/include/rte_launch.h\nindex 22a901ce62..ed0bb4762a 100644\n--- a/lib/eal/include/rte_launch.h\n+++ b/lib/eal/include/rte_launch.h\n@@ -19,9 +19,10 @@ extern \"C\" {\n  * State of an lcore.\n  */\n enum rte_lcore_state_t {\n-\tWAIT,       /**< waiting a new command */\n-\tRUNNING,    /**< executing command */\n-\tFINISHED,   /**< command executed */\n+\tWAIT,\n+\t/**< waiting for new command */\n+\tRUNNING,\n+\t/**< executing command */\n };\n \n /**\n@@ -41,7 +42,7 @@ typedef int (lcore_function_t)(void *);\n  *\n  * When the remote lcore receives the message, it switches to\n  * the RUNNING state, then calls the function f with argument arg. Once the\n- * execution is done, the remote lcore switches to a FINISHED state and\n+ * execution is done, the remote lcore switches to WAIT state and\n  * the return value of f is stored in a local variable to be read using\n  * rte_eal_wait_lcore().\n  *\ndiff --git a/lib/eal/include/rte_service.h b/lib/eal/include/rte_service.h\nindex c7d037d862..646533e871 100644\n--- a/lib/eal/include/rte_service.h\n+++ b/lib/eal/include/rte_service.h\n@@ -321,9 +321,7 @@ int32_t rte_service_lcore_count(void);\n  * from duty, just unmaps all services / cores, and stops() the service cores.\n  * The runstate of services is not modified.\n  *\n- * The cores that are stopped with this call, are in FINISHED state and\n- * the application must take care of bringing them back to a launchable state:\n- * e.g. call *rte_eal_lcore_wait* on the lcore_id.\n+ * The cores that are stopped with this call, are in WAIT state.\n  *\n  * @retval 0 Success\n  */\ndiff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c\nindex a0a0091040..c79e09c9ad 100644\n--- a/lib/eal/linux/eal_thread.c\n+++ b/lib/eal/linux/eal_thread.c\n@@ -28,7 +28,7 @@\n /*\n  * Send a message to a worker lcore identified by worker_id to call a\n  * function f with argument arg. Once the execution is done, the\n- * remote lcore switch in FINISHED state.\n+ * remote lcore switches to WAIT state.\n  */\n int\n rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned int worker_id)\n@@ -141,13 +141,7 @@ eal_thread_loop(__rte_unused void *arg)\n \t\tlcore_config[lcore_id].arg = NULL;\n \t\trte_wmb();\n \n-\t\t/* when a service core returns, it should go directly to WAIT\n-\t\t * state, because the application will not lcore_wait() for it.\n-\t\t */\n-\t\tif (lcore_config[lcore_id].core_role == ROLE_SERVICE)\n-\t\t\tlcore_config[lcore_id].state = WAIT;\n-\t\telse\n-\t\t\tlcore_config[lcore_id].state = FINISHED;\n+\t\tlcore_config[lcore_id].state = WAIT;\n \t}\n \n \t/* never reached */\ndiff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c\nindex e08abcf21f..977911905e 100644\n--- a/lib/eal/windows/eal_thread.c\n+++ b/lib/eal/windows/eal_thread.c\n@@ -19,7 +19,7 @@\n /*\n  * Send a message to a worker lcore identified by worker_id to call a\n  * function f with argument arg. Once the execution is done, the\n- * remote lcore switch in FINISHED state.\n+ * remote lcore switches to WAIT state.\n  */\n int\n rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int worker_id)\n@@ -125,13 +125,7 @@ eal_thread_loop(void *arg __rte_unused)\n \t\tlcore_config[lcore_id].arg = NULL;\n \t\trte_wmb();\n \n-\t\t/* when a service core returns, it should go directly to WAIT\n-\t\t * state, because the application will not lcore_wait() for it.\n-\t\t */\n-\t\tif (lcore_config[lcore_id].core_role == ROLE_SERVICE)\n-\t\t\tlcore_config[lcore_id].state = WAIT;\n-\t\telse\n-\t\t\tlcore_config[lcore_id].state = FINISHED;\n+\t\tlcore_config[lcore_id].state = WAIT;\n \t}\n }\n \n",
    "prefixes": [
        "v2",
        "3/6"
    ]
}