get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131395,
    "url": "https://patches.dpdk.org/api/patches/131395/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230913114351.1940459-10-thomas@monjalon.net/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<20230913114351.1940459-10-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230913114351.1940459-10-thomas@monjalon.net",
    "date": "2023-09-13T11:28:22",
    "name": "[v3,09/11] test: convert threads creation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2788c05589198c83b661596058ed7d0dc93499d3",
    "submitter": {
        "id": 685,
        "url": "https://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230913114351.1940459-10-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 29494,
            "url": "https://patches.dpdk.org/api/series/29494/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29494",
            "date": "2023-09-13T11:28:13",
            "name": "rework thread management",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/29494/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/131395/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/131395/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 8C3CD42588;\n\tWed, 13 Sep 2023 13:46:05 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1E16240608;\n\tWed, 13 Sep 2023 13:46:00 +0200 (CEST)",
            "from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com\n [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 5A97540A8A\n for <dev@dpdk.org>; Wed, 13 Sep 2023 13:45:58 +0200 (CEST)",
            "from compute5.internal (compute5.nyi.internal [10.202.2.45])\n by mailout.west.internal (Postfix) with ESMTP id EBEF4320089C;\n Wed, 13 Sep 2023 07:45:56 -0400 (EDT)",
            "from mailfrontend1 ([10.202.2.162])\n by compute5.internal (MEProxy); Wed, 13 Sep 2023 07:45:57 -0400",
            "by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n 13 Sep 2023 07:45:55 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n cc:cc:content-transfer-encoding:content-type:content-type:date\n :date:from:from:in-reply-to:in-reply-to:message-id:mime-version\n :references:reply-to:sender:subject:subject:to:to; s=fm2; t=\n 1694605556; x=1694691956; bh=yuYb/FScGlE53o8sIBUUC4AbBWAHIA9MsQv\n NXxUbr+k=; b=ON1wjjCEj5kJMxuNWXeZtdgRPqO9GFWT4QH9J6SJCmHzbwQY+3R\n O1MGwbakbM5kd/McGO8BihXVdyed/beVLsqf5iuoXhXwuXSpML2lPSDMH7V4Ce4P\n AeRG+a3GIW/gzrSq3LCF0PgOyeUkImGg6gogJXfhXmJEEP6QIleerZQFOOkCJ+Qw\n hhtKCEBrnnCwIPuAQeLtpyJzEOSabaPKrAa25UEiVChv0r04lUsgk3wfcuuzjwLQ\n DWFGk35Ik1zMXbVvE+aV3sYpWVwvLYF/A4JRVqoBhTPkplnTp8zyT0E/hPy8nMcK\n HPxq15UtpIVrI6xUh1LptCsA6L6+cVNys+Q==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:cc:content-transfer-encoding\n :content-type:content-type:date:date:feedback-id:feedback-id\n :from:from:in-reply-to:in-reply-to:message-id:mime-version\n :references:reply-to:sender:subject:subject:to:to:x-me-proxy\n :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=\n 1694605556; x=1694691956; bh=yuYb/FScGlE53o8sIBUUC4AbBWAHIA9MsQv\n NXxUbr+k=; b=oX7z0iA78dzB2LCXHw5oW+aF/jlwQFQkRj/imw0TKFrwzeR9Jtf\n dquWOfqTrjizPaIveIfReQVuXgTJS8qm/DYO8lGNgJWp1V5HgrkFeaZL6JVaeQT8\n OwKpC4FPmlkwGh9uo0fAQBPokneW19d0ZTvl0RUXA+Rx9+PkkmRbN3NCnPYnVxKX\n VSebqE83BMy1U2+9dy5B+M/EtpesF+waSMJbGlgj9V7abTykwmcRTFhl3vqpiMsN\n vbzd5Oy4eW/jpIzWlIoi4tPSt9vn8YBROsKZaoCz5Sp0CC9XMHZg0uhivlbfwxPb\n EZnWGmlVKDBs/SMzEerWpuL2cVekVvHFmEQ=="
        ],
        "X-ME-Sender": "<xms:9KABZS-DYWL_mH11L4QTnCT-4i3PyzNEEz_o9cKFqIr9eNXdLG_Dxw>\n <xme:9KABZSsxq3i256vHpfVLt5ICPt2n7gRWh7Pxb1RIyqN3q9k9ojc7Gv0VtWVSe7weE\n DYqHc0OFj221x867A>",
        "X-ME-Received": "\n <xmr:9KABZYDpFMRKS_-SJLrhRCzjTz3v7_HBMgqvx_ZJgbQ6VBKt_y_-4YS_yIEvdILwhkBDzQ>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedviedrudeikedggeegucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhho\n mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne\n cuggftrfgrthhtvghrnheptdeiffffgeefteelhfekueetueduffejgfelvedtieejudek\n gfevheetheehgeejnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilh\n hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth",
        "X-ME-Proxy": "<xmx:9KABZafXk81sYuQS4Dvs5U28vysb1xZ5QWRA55vfpq4GO7DJLhkPQg>\n <xmx:9KABZXOg6jclnHdXs8JB4dP3ScluVMBJBmy7sUBZyKVKiami0njlRQ>\n <xmx:9KABZUk_-L-sf3E6q0TJ191KDOYW0mVK5blJzWi8JHnRW0_8CwIBNQ>\n <xmx:9KABZS1ooyYxoMw5BI7FIZEesRoGEX9uZa5E-EQrrvSflb7EVvhKjg>",
        "Feedback-ID": "i47234305:Fastmail",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "Tyler Retzlaff <roretzla@linux.microsoft.com>,\n David Marchand <david.marchand@redhat.com>,\n Ferruh Yigit <ferruh.yigit@amd.com>,\n =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Reshma Pattan <reshma.pattan@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH v3 09/11] test: convert threads creation",
        "Date": "Wed, 13 Sep 2023 13:28:22 +0200",
        "Message-ID": "<20230913114351.1940459-10-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.42.0",
        "In-Reply-To": "<20230913114351.1940459-1-thomas@monjalon.net>",
        "References": "<20230906162226.1618088-1-thomas@monjalon.net>\n <20230913114351.1940459-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "Calls to pthread for thread creation are replaced with the rte_thread API.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nAcked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n app/test/process.h     | 10 +++++-----\n app/test/test_lcores.c |  9 ++++-----\n app/test/test_pdump.c  |  6 +++---\n app/test/test_pdump.h  |  2 +-\n 4 files changed, 13 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/app/test/process.h b/app/test/process.h\nindex 1f073b9c5c..af7bc3e0de 100644\n--- a/app/test/process.h\n+++ b/app/test/process.h\n@@ -28,8 +28,8 @@\n \n #ifdef RTE_LIB_PDUMP\n #ifdef RTE_NET_RING\n-#include <pthread.h>\n-extern void *send_pkts(void *empty);\n+#include <rte_thread.h>\n+extern uint32_t send_pkts(void *empty);\n extern uint16_t flag_for_send_pkts;\n #endif\n #endif\n@@ -49,7 +49,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)\n \tchar path[32];\n #ifdef RTE_LIB_PDUMP\n #ifdef RTE_NET_RING\n-\tpthread_t thread;\n+\trte_thread_t thread;\n \tint rc;\n #endif\n #endif\n@@ -136,7 +136,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)\n #ifdef RTE_LIB_PDUMP\n #ifdef RTE_NET_RING\n \tif ((strcmp(env_value, \"run_pdump_server_tests\") == 0)) {\n-\t\trc = pthread_create(&thread, NULL, &send_pkts, NULL);\n+\t\trc = rte_thread_create(&thread, NULL, send_pkts, NULL);\n \t\tif (rc != 0) {\n \t\t\trte_panic(\"Cannot start send pkts thread: %s\\n\",\n \t\t\t\t  strerror(rc));\n@@ -151,7 +151,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)\n #ifdef RTE_NET_RING\n \tif ((strcmp(env_value, \"run_pdump_server_tests\") == 0)) {\n \t\tflag_for_send_pkts = 0;\n-\t\tpthread_join(thread, NULL);\n+\t\trte_thread_join(thread, NULL);\n \t}\n #endif\n #endif\ndiff --git a/app/test/test_lcores.c b/app/test/test_lcores.c\nindex 0c96faa4cb..22225a9fd3 100644\n--- a/app/test/test_lcores.c\n+++ b/app/test/test_lcores.c\n@@ -2,7 +2,6 @@\n  * Copyright (c) 2020 Red Hat, Inc.\n  */\n \n-#include <pthread.h>\n #include <string.h>\n \n #include <rte_common.h>\n@@ -341,7 +340,7 @@ test_non_eal_lcores_callback(unsigned int eal_threads_count)\n \treturn -1;\n }\n \n-static void *ctrl_thread_loop(void *arg)\n+static uint32_t ctrl_thread_loop(void *arg)\n {\n \tstruct thread_context *t = arg;\n \n@@ -350,7 +349,7 @@ static void *ctrl_thread_loop(void *arg)\n \t/* Set the thread state to DONE */\n \tt->state = Thread_DONE;\n \n-\treturn NULL;\n+\treturn 0;\n }\n \n static int\n@@ -362,8 +361,8 @@ test_ctrl_thread(void)\n \t/* Create one control thread */\n \tt = &ctrl_thread_context;\n \tt->state = Thread_INIT;\n-\tif (rte_ctrl_thread_create((pthread_t *)&t->id, \"dpdk-test-ctrlt\",\n-\t\t\t\t\tNULL, ctrl_thread_loop, t) != 0)\n+\tif (rte_thread_create_control(&t->id, \"dpdk-test-ctrlt\",\n+\t\t\t\tctrl_thread_loop, t) != 0)\n \t\treturn -1;\n \n \t/* Wait till the control thread exits.\ndiff --git a/app/test/test_pdump.c b/app/test/test_pdump.c\nindex ea03056b47..adf49f0b54 100644\n--- a/app/test/test_pdump.c\n+++ b/app/test/test_pdump.c\n@@ -136,8 +136,8 @@ test_pdump_uninit(void)\n \treturn ret;\n }\n \n-void *\n-send_pkts(void *empty)\n+uint32_t\n+send_pkts(void *empty __rte_unused)\n {\n \tint ret = 0;\n \tstruct rte_mbuf *pbuf[NUM_PACKETS] = { };\n@@ -161,7 +161,7 @@ send_pkts(void *empty)\n \n \trte_eth_dev_stop(portid);\n \ttest_put_mbuf_to_pool(mp, pbuf);\n-\treturn empty;\n+\treturn 0;\n }\n \n /*\ndiff --git a/app/test/test_pdump.h b/app/test/test_pdump.h\nindex abef9a85ec..8746d61269 100644\n--- a/app/test/test_pdump.h\n+++ b/app/test/test_pdump.h\n@@ -9,7 +9,7 @@\n #define NUM_ITR 3\n \n /* sample test to send packets to the pdump client recursively */\n-void *send_pkts(void *port);\n+uint32_t send_pkts(void *empty);\n \n /* Sample test to create setup for the pdump server tests */\n int test_pdump_init(void);\n",
    "prefixes": [
        "v3",
        "09/11"
    ]
}