get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134259,
    "url": "http://patches.dpdk.org/api/patches/134259/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231114110006.91148-6-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-6-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114110006.91148-6-haijie1@huawei.com",
    "date": "2023-11-14T10:59:49",
    "name": "[v3,05/22] app/dma-perf: replace strtok with reentrant version",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "be88eedecbdfffb6cbad2a255253c38bc57efe3d",
    "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-6-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/134259/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134259/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 868B243329;\n\tTue, 14 Nov 2023 12:10:09 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 752E540648;\n\tTue, 14 Nov 2023 12:10:00 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 02362402E4\n for <dev@dpdk.org>; Tue, 14 Nov 2023 12:09:55 +0100 (CET)",
            "from kwepemd100004.china.huawei.com (unknown [172.30.72.57])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SV3Tm6pfFzWhJ8;\n Tue, 14 Nov 2023 19:09:32 +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:54 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "<dev@dpdk.org>, Cheng Jiang <honest.jiang@foxmail.com>,\n Chenbo Xia <chenbox@nvidia.com>, Chengwen Feng <fengchengwen@huawei.com>,\n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Jiayu Hu <hujiayu.hu@foxmail.com>",
        "CC": "<haijie1@huawei.com>, <lihuisong@huawei.com>",
        "Subject": "[PATCH v3 05/22] app/dma-perf: replace strtok with reentrant version",
        "Date": "Tue, 14 Nov 2023 18:59:49 +0800",
        "Message-ID": "<20231114110006.91148-6-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: 623dc9364dc6 (\"app/dma-perf: introduce DMA performance test\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test-dma-perf/main.c | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test-dma-perf/main.c b/app/test-dma-perf/main.c\nindex e5bccc27da5e..38780939578e 100644\n--- a/app/test-dma-perf/main.c\n+++ b/app/test-dma-perf/main.c\n@@ -164,6 +164,7 @@ parse_lcore(struct test_configure *test_case, const char *value)\n \tuint16_t len;\n \tchar *input;\n \tstruct lcore_dma_map_t *lcore_dma_map;\n+\tchar *sp = NULL;\n \n \tif (test_case == NULL || value == NULL)\n \t\treturn -1;\n@@ -175,7 +176,7 @@ parse_lcore(struct test_configure *test_case, const char *value)\n \n \tmemset(lcore_dma_map, 0, sizeof(struct lcore_dma_map_t));\n \n-\tchar *token = strtok(input, \", \");\n+\tchar *token = strtok_r(input, \", \", &sp);\n \twhile (token != NULL) {\n \t\tif (lcore_dma_map->cnt >= MAX_LCORE_NB) {\n \t\t\tfree(input);\n@@ -185,7 +186,7 @@ parse_lcore(struct test_configure *test_case, const char *value)\n \t\tuint16_t lcore_id = atoi(token);\n \t\tlcore_dma_map->lcores[lcore_dma_map->cnt++] = lcore_id;\n \n-\t\ttoken = strtok(NULL, \", \");\n+\t\ttoken = strtok_r(NULL, \", \", &sp);\n \t}\n \n \tfree(input);\n@@ -201,6 +202,7 @@ parse_lcore_dma(struct test_configure *test_case, const char *value)\n \tchar *start, *end, *substr;\n \tuint16_t lcore_id;\n \tint ret = 0;\n+\tchar *sp = NULL;\n \n \tif (test_case == NULL || value == NULL)\n \t\treturn -1;\n@@ -216,7 +218,7 @@ parse_lcore_dma(struct test_configure *test_case, const char *value)\n \t\tgoto out;\n \t}\n \n-\tsubstr = strtok(addrs, \",\");\n+\tsubstr = strtok_r(addrs, \",\", &sp);\n \tif (substr == NULL) {\n \t\tfprintf(stderr, \"No input DMA address\\n\");\n \t\tret = -1;\n@@ -258,7 +260,7 @@ parse_lcore_dma(struct test_configure *test_case, const char *value)\n \t\tstrlcpy(lcore_dma_map->dma_names[lcore_dma_map->cnt], ptrs[1],\n \t\t\t\tRTE_DEV_NAME_MAX_LEN);\n \t\tlcore_dma_map->cnt++;\n-\t\tsubstr = strtok(NULL, \",\");\n+\t\tsubstr = strtok_r(NULL, \",\", &sp);\n \t} while (substr != NULL);\n \n out:\n@@ -486,6 +488,7 @@ main(int argc, char *argv[])\n \tchar *rst_path_ptr = NULL;\n \tchar rst_path[PATH_MAX];\n \tint new_argc;\n+\tchar *sp = NULL;\n \n \tmemset(args, 0, sizeof(args));\n \n@@ -504,7 +507,7 @@ main(int argc, char *argv[])\n \t}\n \tif (rst_path_ptr == NULL) {\n \t\tstrlcpy(rst_path, cfg_path_ptr, PATH_MAX);\n-\t\tchar *token = strtok(basename(rst_path), \".\");\n+\t\tchar *token = strtok_r(basename(rst_path), \".\", &sp);\n \t\tif (token == NULL) {\n \t\t\tprintf(\"Config file error.\\n\");\n \t\t\treturn -1;\n",
    "prefixes": [
        "v3",
        "05/22"
    ]
}