get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135009,
    "url": "http://patches.dpdk.org/api/patches/135009/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231211095110.18946-8-fengchengwen@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": "<20231211095110.18946-8-fengchengwen@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231211095110.18946-8-fengchengwen@huawei.com",
    "date": "2023-12-11T09:51:05",
    "name": "[RFC,v3,07/12] argparse: provide parsing known type API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "da7825f648ae293889ca94ae7ef1b1315c29e782",
    "submitter": {
        "id": 2146,
        "url": "http://patches.dpdk.org/api/people/2146/?format=api",
        "name": "fengchengwen",
        "email": "fengchengwen@huawei.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231211095110.18946-8-fengchengwen@huawei.com/mbox/",
    "series": [
        {
            "id": 30348,
            "url": "http://patches.dpdk.org/api/series/30348/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30348",
            "date": "2023-11-21T12:26:51",
            "name": "[24.03,RFC] argparse: add argparse library",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30348/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/135009/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/135009/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 DB158436C8;\n\tMon, 11 Dec 2023 10:54:30 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4DAD340EDF;\n\tMon, 11 Dec 2023 10:54:27 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 38D1240ED3\n for <dev@dpdk.org>; Mon, 11 Dec 2023 10:54:24 +0100 (CET)",
            "from mail.maildlp.com (unknown [172.19.163.174])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SpcXW6hGdzZcmB;\n Mon, 11 Dec 2023 17:54:19 +0800 (CST)",
            "from dggpeml500024.china.huawei.com (unknown [7.185.36.10])\n by mail.maildlp.com (Postfix) with ESMTPS id 11B3A14040F;\n Mon, 11 Dec 2023 17:54:23 +0800 (CST)",
            "from localhost.localdomain (10.50.165.33) by\n dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.35; Mon, 11 Dec 2023 17:54:22 +0800"
        ],
        "From": "Chengwen Feng <fengchengwen@huawei.com>",
        "To": "<dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>,\n <stephen@networkplumber.org>",
        "CC": "<tangkunshan@huawei.com>",
        "Subject": "[RFC v3 07/12] argparse: provide parsing known type API",
        "Date": "Mon, 11 Dec 2023 09:51:05 +0000",
        "Message-ID": "<20231211095110.18946-8-fengchengwen@huawei.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20231211095110.18946-1-fengchengwen@huawei.com>",
        "References": "<20231121122651.7078-1-fengchengwen@huawei.com>\n <20231211095110.18946-1-fengchengwen@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.50.165.33]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n dggpeml500024.china.huawei.com (7.185.36.10)",
        "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": "Provide API which could parsing the value from the input string based\non the value type. This API could used in user callback when parsing\nstring by argparse or kvargs library.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n lib/argparse/rte_argparse.c | 19 +++++++++++++++++++\n lib/argparse/rte_argparse.h | 19 +++++++++++++++++++\n lib/argparse/version.map    |  1 +\n 3 files changed, 39 insertions(+)",
    "diff": "diff --git a/lib/argparse/rte_argparse.c b/lib/argparse/rte_argparse.c\nindex cc5493c6be..6b82f58eaf 100644\n--- a/lib/argparse/rte_argparse.c\n+++ b/lib/argparse/rte_argparse.c\n@@ -600,3 +600,22 @@ rte_argparse_parse(struct rte_argparse *obj, int argc, char **argv)\n \t\texit(ret);\n \treturn ret;\n }\n+\n+int\n+rte_argparse_parse_type(const char *str, uint64_t val_type, void *val)\n+{\n+\tuint32_t cmp_max = RTE_FIELD_GET64(ARG_ATTR_VAL_TYPE_MASK, RTE_ARGPARSE_ARG_VALUE_MAX);\n+\tstruct rte_argparse_arg arg = {\n+\t\t.name_long = str,\n+\t\t.name_short = NULL,\n+\t\t.val_saver = val,\n+\t\t.val_set = NULL,\n+\t\t.flags = val_type,\n+\t};\n+\tuint32_t value_type = arg_attr_val_type(&arg);\n+\n+\tif (value_type == 0 || value_type >= cmp_max)\n+\t\treturn -EINVAL;\n+\n+\treturn parse_arg_autosave(&arg, str);\n+}\ndiff --git a/lib/argparse/rte_argparse.h b/lib/argparse/rte_argparse.h\nindex 72eea7cf87..5e40431e5b 100644\n--- a/lib/argparse/rte_argparse.h\n+++ b/lib/argparse/rte_argparse.h\n@@ -184,6 +184,25 @@ struct rte_argparse {\n __rte_experimental\n int rte_argparse_parse(struct rte_argparse *obj, int argc, char **argv);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Parse the value from the input string based on the value type.\n+ *\n+ * @param str\n+ *   Input string.\n+ * @param val_type\n+ *   The value type, @see RTE_ARGPARSE_ARG_VALUE_INT or other type.\n+ * @param val\n+ *   Saver for the value.\n+ *\n+ * @return\n+ *   0 on success. Otherwise negative value is returned.\n+ */\n+__rte_experimental\n+int rte_argparse_parse_type(const char *str, uint64_t val_type, void *val);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/argparse/version.map b/lib/argparse/version.map\nindex 1c176f69e9..9b68464600 100644\n--- a/lib/argparse/version.map\n+++ b/lib/argparse/version.map\n@@ -2,6 +2,7 @@ EXPERIMENTAL {\n \tglobal:\n \n \trte_argparse_parse;\n+\trte_argparse_parse_type;\n \n \tlocal: *;\n };\n",
    "prefixes": [
        "RFC",
        "v3",
        "07/12"
    ]
}