get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131206,
    "url": "https://patches.dpdk.org/api/patches/131206/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230906162226.1618088-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": "<20230906162226.1618088-10-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230906162226.1618088-10-thomas@monjalon.net",
    "date": "2023-09-06T16:12:26",
    "name": "[09/11] test: convert threads creation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230906162226.1618088-10-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 29438,
            "url": "https://patches.dpdk.org/api/series/29438/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29438",
            "date": "2023-09-06T16:12:17",
            "name": "rework thread management",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/29438/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/131206/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/131206/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 C390442529;\n\tWed,  6 Sep 2023 18:24:05 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B0318402F1;\n\tWed,  6 Sep 2023 18:23:58 +0200 (CEST)",
            "from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com\n [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id A5246402E3\n for <dev@dpdk.org>; Wed,  6 Sep 2023 18:23:56 +0200 (CEST)",
            "from compute3.internal (compute3.nyi.internal [10.202.2.43])\n by mailout.west.internal (Postfix) with ESMTP id 54A8832004AE;\n Wed,  6 Sep 2023 12:23:55 -0400 (EDT)",
            "from mailfrontend2 ([10.202.2.163])\n by compute3.internal (MEProxy); Wed, 06 Sep 2023 12:23:55 -0400",
            "by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n 6 Sep 2023 12:23:53 -0400 (EDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n cc:cc:content-transfer-encoding:content-type:date:date:from:from\n :in-reply-to:in-reply-to:message-id:mime-version:references\n :reply-to:sender:subject:subject:to:to; s=fm1; t=1694017434; x=\n 1694103834; bh=1ju67lAKKDS00A0PCUGCUdDu8iEiMW6LIw6MSEQb598=; b=W\n tQzKuewq5eylAGeWVB8NmS831BAn8QC+Nj6AVEPxVzeosI8ztkPPAsh+X/uBP8qf\n cIyZ3cvY3hJpVMsPs5uG3C5crWlO8pGS8zHAslOzSqXDaDc0RdwnhsWAfhbx2trL\n Q23IyvdB1f+kPG/7djg7wxdfDhuaWJLFXEeajK5eQCDD+gLSIrCiNnhUYNyG7ZlH\n Gzsey/T6tEW6p8GUME66V8mZYBl6jjtzLziB1IsumQuoopOXwtQS5guCRiIsbz+x\n hchHiGMU3u6cZxOgc9/X1ekWlBUxny4oMAwHzyfLYDtVoSeJ0yb5vVUaQGONoNWJ\n Wj04uI3eEJDUPIJJt9kYA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:cc:content-transfer-encoding\n :content-type:date:date:feedback-id:feedback-id:from:from\n :in-reply-to:in-reply-to:message-id:mime-version:references\n :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy\n :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1694017434; x=\n 1694103834; bh=1ju67lAKKDS00A0PCUGCUdDu8iEiMW6LIw6MSEQb598=; b=L\n GrkQY8LSH3LmHzY5gXP19Uwt1guU3NWxrNFW3PcKYhWTRQA6Ii5EB+br+T6ghy+e\n m8ynhhR/7hKC8SJFK/rYD0+s797LQpIlo1jUjVwlhbHdcPulzgvKBWae2yz8Krcc\n haAiuac8eqK/2yMEr/Dchld8A3ivQXexiOnbv2/7bkXKx8KKsSJmeJT7KncgHWjx\n 4p5sJ6OqU0Ab7OdDup8ZmpZ2guH6dpc1u2a5gb6AU0LsSiftFhcaA5lqKPkbRvDo\n FiDUrSOUJ9Jj/bKa56SbNqO8JPw+xQ2fH9AtVY0mh4PzBnbW82YiFwuJQBJPf8g6\n UB0u98GxkHl1g3nYq2/Jg=="
        ],
        "X-ME-Sender": "<xms:mqf4ZE_29KTlmzbIkWrEv92VFrDxnDm2Kd0_56-V2AOtQBXiUrENcQ>\n <xme:mqf4ZMv1YSzNxdUHXynjiqHRx7tQpZ_koHgA6ER4L2noBHDEB0W9G-Bv5l27exCTB\n lBIps8EbbX0qzJ-DQ>",
        "X-ME-Received": "\n <xmr:mqf4ZKBhDoFoybaKHaIWlhqHTCUZeYvxnoT_kE01ETcgig6QD3jLOLd15UEXqDBdYnUEkpMlQirRSddT3q3YYupYvzd_plE>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedviedrudehfedguddttdcutefuodetggdotefrod\n ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh\n necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd\n enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhho\n mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne\n cuggftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfet\n veekhefhieelhfdtnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilh\n hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth",
        "X-ME-Proxy": "<xmx:mqf4ZEe9OOOXZYnFf1Hozqb7AozaX4JHfryiVutgROJGzrl755ttog>\n <xmx:mqf4ZJMl7gT-SBcFDFngzt-a5ijtDXzJWK5IP-l9fwvyYoYyuwQYQQ>\n <xmx:mqf4ZOmtkq0ua5-i0FQfnc-aGNERFbP9BKE5Qpk6QYNbkbfHHi9V8Q>\n <xmx:mqf4ZOoeFZYpBtZb_ilmfnZnIWxVYg-ETM4C7y_e0yCcDcWhG_6_DQ>",
        "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 Reshma Pattan <reshma.pattan@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH 09/11] test: convert threads creation",
        "Date": "Wed,  6 Sep 2023 18:12:26 +0200",
        "Message-ID": "<20230906162226.1618088-10-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.42.0",
        "In-Reply-To": "<20230906162226.1618088-1-thomas@monjalon.net>",
        "References": "<20230906162226.1618088-1-thomas@monjalon.net>",
        "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": "Calls to pthread for thread creation are replaced with the rte_thread API.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\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": [
        "09/11"
    ]
}