get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134260,
    "url": "http://patchwork.dpdk.org/api/patches/134260/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231114110006.91148-7-haijie1@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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-7-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114110006.91148-7-haijie1@huawei.com",
    "date": "2023-11-14T10:59:50",
    "name": "[v3,06/22] app/test-fib: replace strtok with reentrant version",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "6e610dd1a6f2df52de61837e93359f4f04071bd7",
    "submitter": {
        "id": 2935,
        "url": "http://patchwork.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@huawei.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231114110006.91148-7-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 30291,
            "url": "http://patchwork.dpdk.org/api/series/30291/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30291",
            "date": "2023-11-14T10:59:44",
            "name": "replace strtok with reentrant version",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/30291/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/134260/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/134260/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 6FE7E43329;\n\tTue, 14 Nov 2023 12:10:15 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 916884067D;\n\tTue, 14 Nov 2023 12:10:01 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 471CF4027B\n for <dev@dpdk.org>; Tue, 14 Nov 2023 12:09:56 +0100 (CET)",
            "from kwepemd100004.china.huawei.com (unknown [172.30.72.53])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SV3Tn2sYKzWhLp\n for <dev@dpdk.org>; Tue, 14 Nov 2023 19:09:33 +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>, Vladimir Medvedkin <vladimir.medvedkin@intel.com>",
        "CC": "<haijie1@huawei.com>, <lihuisong@huawei.com>, <fengchengwen@huawei.com>",
        "Subject": "[PATCH v3 06/22] app/test-fib: replace strtok with reentrant version",
        "Date": "Tue, 14 Nov 2023 18:59:50 +0800",
        "Message-ID": "<20231114110006.91148-7-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: 103809d032cd (\"app/test-fib: add test application for FIB\")\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test-fib/main.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test-fib/main.c b/app/test-fib/main.c\nindex 75a56135f212..8e5d17b13028 100644\n--- a/app/test-fib/main.c\n+++ b/app/test-fib/main.c\n@@ -223,9 +223,9 @@ parse_distrib(uint8_t depth_lim, const uint32_t n)\n \tuint32_t nrpd[128 + 1] = {0}; /* number of routes per depth */\n \tuint32_t n_routes;\n \tuint8_t depth, ratio, ratio_acc = 0;\n-\tchar *in;\n+\tchar *in, *sp = NULL;\n \n-\tin = strtok(distrib_string, \",\");\n+\tin = strtok_r(distrib_string, \",\", &sp);\n \n \t/*parse configures routes percentage ratios*/\n \twhile (in != NULL) {\n@@ -265,7 +265,7 @@ parse_distrib(uint8_t depth_lim, const uint32_t n)\n \t\t}\n \n \t\t/*number of configured depths in*/\n-\t\tin = strtok(NULL, \",\");\n+\t\tin = strtok_r(NULL, \",\", &sp);\n \t}\n \n \tif (ratio_acc > 100) {\n@@ -542,10 +542,10 @@ parse_lookup(FILE *f, int af)\n \tint ret, i = 0;\n \tuint8_t *tbl = (uint8_t *)config.lookup_tbl;\n \tint step = (af == AF_INET) ? 4 : 16;\n-\tchar *s;\n+\tchar *s, *sp = NULL;\n \n \twhile (fgets(line, sizeof(line), f) != NULL) {\n-\t\ts = strtok(line, \" \\t\\n\");\n+\t\ts = strtok_r(line, \" \\t\\n\", &sp);\n \t\tif (s == NULL)\n \t\t\treturn -EINVAL;\n \t\tret = inet_pton(af, s, &tbl[i]);\n",
    "prefixes": [
        "v3",
        "06/22"
    ]
}