get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130313,
    "url": "http://patchwork.dpdk.org/api/patches/130313/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230815013826.1288972-8-okaya@kernel.org/",
    "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": "<20230815013826.1288972-8-okaya@kernel.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230815013826.1288972-8-okaya@kernel.org",
    "date": "2023-08-15T01:38:26",
    "name": "[v1,7/7] eal: initialize worker threads once",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "67db17f8abf5d10c1078e1868f200ff9f61a2ac4",
    "submitter": {
        "id": 2903,
        "url": "http://patchwork.dpdk.org/api/people/2903/?format=api",
        "name": "Sinan Kaya",
        "email": "okaya@kernel.org"
    },
    "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/20230815013826.1288972-8-okaya@kernel.org/mbox/",
    "series": [
        {
            "id": 29223,
            "url": "http://patchwork.dpdk.org/api/series/29223/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29223",
            "date": "2023-08-15T01:38:19",
            "name": "support reinit flow",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/29223/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/130313/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/130313/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 5099A43067;\n\tTue, 15 Aug 2023 03:39:19 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F0E8F43279;\n\tTue, 15 Aug 2023 03:38:46 +0200 (CEST)",
            "from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217])\n by mails.dpdk.org (Postfix) with ESMTP id CDD9843251\n for <dev@dpdk.org>; Tue, 15 Aug 2023 03:38:39 +0200 (CEST)",
            "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits))\n (No client certificate requested)\n by dfw.source.kernel.org (Postfix) with ESMTPS id 5D86C6133D\n for <dev@dpdk.org>; Tue, 15 Aug 2023 01:38:39 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 80D94C433CA;\n Tue, 15 Aug 2023 01:38:38 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1692063518;\n bh=UbZct1QFrYwLo+HTrCgJoL0nQvWSvUSISHA9M4IuOLM=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=j+3/9OWuMfd8PDXZFPGhCgzT1DM2iJobiYhOXKm+uwmg50Ym4QpPp/wq4Eml4QHbk\n AI3vsOAsLjM9ZDp9PLGgDQ5hxaPF4qSUH4CgyVxspjin24BvITcb6r6XQPk0/bozky\n WNd81qR1WM6L6umnW7BpHo9i6zfVWdZkKHOhYUDfPmCcIfBuauOqKe/Ayyrl8xpMIg\n ki/751OHX3qfavPs5gp1ug7luZRkSqPFsLJWs+Twa7CVOGzdYv/CZ/xqSnSuJMShCh\n QYCpZivx3qtSuK5HNdg44vXgobQWnw29qOs7+ZDNaxM+e7ZrS6GaU0d9wx/HkzxJ12\n f5+FiIkfZSo0w==",
        "From": "okaya@kernel.org",
        "To": "",
        "Cc": "dev@dpdk.org,\n\tSinan Kaya <okaya@kernel.org>",
        "Subject": "[PATCH v1 7/7] eal: initialize worker threads once",
        "Date": "Mon, 14 Aug 2023 21:38:26 -0400",
        "Message-Id": "<20230815013826.1288972-8-okaya@kernel.org>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230815013826.1288972-1-okaya@kernel.org>",
        "References": "<20230815013826.1288972-1-okaya@kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "From: Sinan Kaya <okaya@kernel.org>\n\nSigned-off-by: Sinan Kaya <okaya@kernel.org>\n---\n lib/eal/linux/eal.c | 68 ++++++++++++++++++++++++---------------------\n 1 file changed, 36 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 5fd81d71cb..63190a4e70 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -1236,46 +1236,50 @@ rte_eal_init(int argc, char **argv)\n \t\tconfig->main_lcore, (uintptr_t)pthread_self(), cpuset,\n \t\tret == 0 ? \"\" : \"...\");\n \n-\tRTE_LCORE_FOREACH_WORKER(i) {\n+\tstatic int worker_initialized = 0;\n+\tif (worker_initialized == 0) {\n+\t\tRTE_LCORE_FOREACH_WORKER(i) {\n \n \t\t/*\n \t\t * create communication pipes between main thread\n \t\t * and children\n \t\t */\n-\t\tif (pipe(lcore_config[i].pipe_main2worker) < 0)\n-\t\t\trte_panic(\"Cannot create pipe\\n\");\n-\t\tif (pipe(lcore_config[i].pipe_worker2main) < 0)\n-\t\t\trte_panic(\"Cannot create pipe\\n\");\n-\n-\t\tlcore_config[i].state = WAIT;\n-\n-\t\t/* create a thread for each lcore */\n-\t\tret = eal_worker_thread_create(i);\n-\t\tif (ret != 0)\n-\t\t\trte_panic(\"Cannot create thread\\n\");\n-\n-\t\t/* Set thread_name for aid in debugging. */\n-\t\tsnprintf(thread_name, sizeof(thread_name),\n-\t\t\t\"rte-worker-%d\", i);\n-\t\tret = rte_thread_setname(lcore_config[i].thread_id,\n-\t\t\t\t\t\tthread_name);\n-\t\tif (ret != 0)\n-\t\t\tRTE_LOG(DEBUG, EAL,\n-\t\t\t\t\"Cannot set name for lcore thread\\n\");\n+\t\t\tif (pipe(lcore_config[i].pipe_main2worker) < 0)\n+\t\t\t\trte_panic(\"Cannot create pipe\\n\");\n+\t\t\tif (pipe(lcore_config[i].pipe_worker2main) < 0)\n+\t\t\t\trte_panic(\"Cannot create pipe\\n\");\n+\n+\t\t\tlcore_config[i].state = WAIT;\n+\n+\t\t\t/* create a thread for each lcore */\n+\t\t\tret = eal_worker_thread_create(i);\n+\t\t\tif (ret != 0)\n+\t\t\t\trte_panic(\"Cannot create thread\\n\");\n+\n+\t\t\t/* Set thread_name for aid in debugging. */\n+\t\t\tsnprintf(thread_name, sizeof(thread_name),\n+\t\t\t\t\"rte-worker-%d\", i);\n+\t\t\tret = rte_thread_setname(lcore_config[i].thread_id,\n+\t\t\t\t\t\t\tthread_name);\n+\t\t\tif (ret != 0)\n+\t\t\t\tRTE_LOG(DEBUG, EAL,\n+\t\t\t\t\t\"Cannot set name for lcore thread\\n\");\n+\n+\t\t\tret = pthread_setaffinity_np(lcore_config[i].thread_id,\n+\t\t\t\tsizeof(rte_cpuset_t), &lcore_config[i].cpuset);\n+\t\t\tif (ret != 0)\n+\t\t\t\trte_panic(\"Cannot set affinity\\n\");\n+\t\t}\n \n-\t\tret = pthread_setaffinity_np(lcore_config[i].thread_id,\n-\t\t\tsizeof(rte_cpuset_t), &lcore_config[i].cpuset);\n-\t\tif (ret != 0)\n-\t\t\trte_panic(\"Cannot set affinity\\n\");\n+\t\t/*\n+\t\t * Launch a dummy function on all worker lcores, so that main lcore\n+\t\t * knows they are all ready when this function returns.\n+\t\t */\n+\t\trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN);\n+\t\trte_eal_mp_wait_lcore();\n+\t\tworker_initialized = 1;\n \t}\n \n-\t/*\n-\t * Launch a dummy function on all worker lcores, so that main lcore\n-\t * knows they are all ready when this function returns.\n-\t */\n-\trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN);\n-\trte_eal_mp_wait_lcore();\n-\n \t/* initialize services so vdevs register service during bus_probe. */\n \tret = rte_service_init();\n \tif (ret) {\n",
    "prefixes": [
        "v1",
        "7/7"
    ]
}