get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134258,
    "url": "http://patches.dpdk.org/api/patches/134258/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231114110006.91148-2-haijie1@huawei.com/",
    "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": "<20231114110006.91148-2-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114110006.91148-2-haijie1@huawei.com",
    "date": "2023-11-14T10:59:45",
    "name": "[v3,01/22] app/graph: replace strtok with reentrant version",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "5d3b4a8210eb61e6e77cf63eb6b794d56f36021c",
    "submitter": {
        "id": 2935,
        "url": "http://patches.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@huawei.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231114110006.91148-2-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 30291,
            "url": "http://patches.dpdk.org/api/series/30291/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30291",
            "date": "2023-11-14T10:59:44",
            "name": "replace strtok with reentrant version",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/30291/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134258/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134258/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 BEA8043329;\n\tTue, 14 Nov 2023 12:10:03 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 415E1402ED;\n\tTue, 14 Nov 2023 12:09:59 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id BC9C34027D\n for <dev@dpdk.org>; Tue, 14 Nov 2023 12:09:55 +0100 (CET)",
            "from kwepemd100004.china.huawei.com (unknown [172.30.72.53])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SV3Tk4hbBzWhH1;\n Tue, 14 Nov 2023 19:09:30 +0800 (CST)",
            "from localhost.localdomain (10.67.165.2) by\n kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.2.1258.23; Tue, 14 Nov 2023 19:09:51 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "<dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>, Rakesh Kudurumalla\n <rkudurumalla@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Jerin Jacob <jerinj@marvell.com>",
        "CC": "<haijie1@huawei.com>, <lihuisong@huawei.com>, <fengchengwen@huawei.com>",
        "Subject": "[PATCH v3 01/22] app/graph: replace strtok with reentrant version",
        "Date": "Tue, 14 Nov 2023 18:59:45 +0800",
        "Message-ID": "<20231114110006.91148-2-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20231114110006.91148-1-haijie1@huawei.com>",
        "References": "<20231113104550.2138654-1-haijie1@huawei.com>\n <20231114110006.91148-1-haijie1@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.2]",
        "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n kwepemd100004.china.huawei.com (7.221.188.31)",
        "X-CFilter-Loop": "Reflected",
        "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": "Multiple threads calling the same function may cause condition\nrace issues, which often leads to abnormal behavior and can cause\nmore serious vulnerabilities such as abnormal termination, denial\nof service, and compromised data integrity.\n\nThe strtok() is non-reentrant, it is better to replace it with a\nreentrant version.\n\nFixes: 5c59002a34f3 (\"app/graph: add graph commands\")\nFixes: 984a315a5804 (\"app/graph: add parser utility\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/graph/graph.c |  5 +++--\n app/graph/utils.c | 15 +++++++++------\n 2 files changed, 12 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/app/graph/graph.c b/app/graph/graph.c\nindex a65723a196da..316950948160 100644\n--- a/app/graph/graph.c\n+++ b/app/graph/graph.c\n@@ -103,9 +103,10 @@ parser_usecases_read(char *usecases)\n {\n \tbool valid = false;\n \tuint32_t i, j = 0;\n+\tchar *sp = NULL;\n \tchar *token;\n \n-\ttoken = strtok(usecases, \",\");\n+\ttoken = strtok_r(usecases, \",\", &sp);\n \twhile (token != NULL) {\n \t\tfor (i = 0; i < RTE_DIM(supported_usecases); i++) {\n \t\t\tif (strcmp(supported_usecases[i], token) == 0) {\n@@ -116,7 +117,7 @@ parser_usecases_read(char *usecases)\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n-\t\ttoken = strtok(NULL, \",\");\n+\t\ttoken = strtok_r(NULL, \",\", &sp);\n \t}\n \n \treturn valid;\ndiff --git a/app/graph/utils.c b/app/graph/utils.c\nindex c7b6ae83cf1f..ae2ff225c394 100644\n--- a/app/graph/utils.c\n+++ b/app/graph/utils.c\n@@ -101,13 +101,14 @@ int\n parser_ip4_read(uint32_t *value, char *p)\n {\n \tuint8_t shift = 24;\n+\tchar *sp = NULL;\n \tuint32_t ip = 0;\n \tchar *token;\n \n-\ttoken = strtok(p, \".\");\n+\ttoken = strtok_r(p, \".\", &sp);\n \twhile (token != NULL) {\n \t\tip |= (((uint32_t)strtoul(token, NULL, 10)) << shift);\n-\t\ttoken = strtok(NULL, \".\");\n+\t\ttoken = strtok_r(NULL, \".\", &sp);\n \t\tshift -= 8;\n \t}\n \n@@ -120,13 +121,14 @@ int\n parser_ip6_read(uint8_t *value, char *p)\n {\n \tuint64_t val = 0;\n+\tchar *sp = NULL;\n \tchar *token;\n \n-\ttoken = strtok(p, \":\");\n+\ttoken = strtok_r(p, \":\", &sp);\n \twhile (token != NULL) {\n \t\thex_string_to_uint64(&val, token);\n \t\t*value = val;\n-\t\ttoken = strtok(NULL, \":\");\n+\t\ttoken = strtok_r(NULL, \":\", &sp);\n \t\tvalue++;\n \t\tval = 0;\n \t}\n@@ -139,13 +141,14 @@ parser_mac_read(uint64_t *value, char *p)\n {\n \tuint64_t mac = 0, val = 0;\n \tuint8_t shift = 40;\n+\tchar *sp = NULL;\n \tchar *token;\n \n-\ttoken = strtok(p, \":\");\n+\ttoken = strtok_r(p, \":\", &sp);\n \twhile (token != NULL) {\n \t\thex_string_to_uint64(&val, token);\n \t\tmac |= val << shift;\n-\t\ttoken = strtok(NULL, \":\");\n+\t\ttoken = strtok_r(NULL, \":\", &sp);\n \t\tshift -= 8;\n \t\tval = 0;\n \t}\n",
    "prefixes": [
        "v3",
        "01/22"
    ]
}