get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118191,
    "url": "http://patches.dpdk.org/api/patches/118191/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221014062100.5761-1-markus.theil@tu-ilmenau.de/",
    "project": {
        "id": 1,
        "url": "http://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": "<20221014062100.5761-1-markus.theil@tu-ilmenau.de>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221014062100.5761-1-markus.theil@tu-ilmenau.de",
    "date": "2022-10-14T06:20:59",
    "name": "[1/2] eal: expose lcore pthread id",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5627286152ae9453e0c111f1a34e21701e58c556",
    "submitter": {
        "id": 747,
        "url": "http://patches.dpdk.org/api/people/747/?format=api",
        "name": "Markus Theil",
        "email": "markus.theil@tu-ilmenau.de"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20221014062100.5761-1-markus.theil@tu-ilmenau.de/mbox/",
    "series": [
        {
            "id": 25228,
            "url": "http://patches.dpdk.org/api/series/25228/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25228",
            "date": "2022-10-14T06:20:59",
            "name": "[1/2] eal: expose lcore pthread id",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/25228/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/118191/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/118191/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 EAC67A00C3;\n\tFri, 14 Oct 2022 08:21:15 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9F1CC4021E;\n\tFri, 14 Oct 2022 08:21:15 +0200 (CEST)",
            "from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de [141.24.186.67])\n by mails.dpdk.org (Postfix) with ESMTP id 8EB8C4014F\n for <dev@dpdk.org>; Fri, 14 Oct 2022 08:21:14 +0200 (CEST)",
            "from isengard.fritz.box (p54aef542.dip0.t-ipconnect.de\n [84.174.245.66])\n by smail.rz.tu-ilmenau.de (Postfix) with ESMTPA id 44D68580098;\n Fri, 14 Oct 2022 08:21:14 +0200 (CEST)"
        ],
        "From": "Markus Theil <markus.theil@tu-ilmenau.de>",
        "To": "dev@dpdk.org",
        "Cc": "Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>",
        "Subject": "[PATCH 1/2] eal: expose lcore pthread id",
        "Date": "Fri, 14 Oct 2022 08:20:59 +0200",
        "Message-Id": "<20221014062100.5761-1-markus.theil@tu-ilmenau.de>",
        "X-Mailer": "git-send-email 2.38.0",
        "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: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>\n\nAlso expose the pthread id of each lcore, in\norder to allow modification of pthread attributes,\nfor example use rte_thread_setname without executing\npthread_self() on the maybe already running lcore.\n\nThe rte_lcore_to_thread_id function is added to API.\n\nSigned-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>\n---\n lib/eal/common/eal_common_lcore.c |  9 +++++++++\n lib/eal/include/rte_lcore.h       | 14 ++++++++++++++\n lib/eal/version.map               |  1 +\n 3 files changed, 24 insertions(+)",
    "diff": "diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c\nindex 06c594b022..48c333cff1 100644\n--- a/lib/eal/common/eal_common_lcore.c\n+++ b/lib/eal/common/eal_common_lcore.c\n@@ -114,6 +114,15 @@ rte_lcore_to_socket_id(unsigned int lcore_id)\n \treturn lcore_config[lcore_id].socket_id;\n }\n \n+int\n+rte_lcore_to_thread_id(int lcore_id, pthread_t *thread_id) {\n+\tif (unlikely(lcore_id < 0 || lcore_id >= RTE_MAX_LCORE))\n+\t\treturn -1;\n+\n+\t*thread_id = lcore_config[lcore_id].thread_id;\n+\treturn 0;\n+}\n+\n static int\n socket_id_cmp(const void *a, const void *b)\n {\ndiff --git a/lib/eal/include/rte_lcore.h b/lib/eal/include/rte_lcore.h\nindex 4d3978512c..3ccd0a73b9 100644\n--- a/lib/eal/include/rte_lcore.h\n+++ b/lib/eal/include/rte_lcore.h\n@@ -171,6 +171,20 @@ rte_lcore_to_socket_id(unsigned int lcore_id);\n  */\n int rte_lcore_to_cpu_id(int lcore_id);\n \n+/**\n+ * Get the ID of the thread of the specified lcore\n+ *\n+ * @param lcore_id\n+ *   the targeted lcore, which MUST be between 0 and RTE_MAX_LCORE-1.\n+ * @param thread_id\n+ *   the thread id is returned in this argument if lcore_id is in range\n+ * @return\n+ *   0 on success, or -1 if out of range\n+ */\n+__rte_experimental\n+int\n+rte_lcore_to_thread_id(int lcore_id, pthread_t *thread_id);\n+\n #ifdef RTE_HAS_CPUSET\n \n /**\ndiff --git a/lib/eal/version.map b/lib/eal/version.map\nindex 2d64a2592e..2e57242920 100644\n--- a/lib/eal/version.map\n+++ b/lib/eal/version.map\n@@ -440,6 +440,7 @@ EXPERIMENTAL {\n \trte_thread_detach;\n \trte_thread_equal;\n \trte_thread_join;\n+\trte_lcore_to_thread_id;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "1/2"
    ]
}