get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138452,
    "url": "http://patches.dpdk.org/api/patches/138452/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240318111838.16991-4-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": "<20240318111838.16991-4-fengchengwen@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240318111838.16991-4-fengchengwen@huawei.com",
    "date": "2024-03-18T11:18:35",
    "name": "[v4,3/6] argparse: replace flag enum with marco",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "9c31b4ca7e74fce0ffb80657b444be80a708b382",
    "submitter": {
        "id": 2146,
        "url": "http://patches.dpdk.org/api/people/2146/?format=api",
        "name": "fengchengwen",
        "email": "fengchengwen@huawei.com"
    },
    "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/20240318111838.16991-4-fengchengwen@huawei.com/mbox/",
    "series": [
        {
            "id": 31544,
            "url": "http://patches.dpdk.org/api/series/31544/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31544",
            "date": "2024-03-18T11:18:32",
            "name": "refine argparse library",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/31544/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138452/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/138452/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 2B3DC43CE3;\n\tMon, 18 Mar 2024 12:21:28 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B2A4740A8A;\n\tMon, 18 Mar 2024 12:21:08 +0100 (CET)",
            "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by mails.dpdk.org (Postfix) with ESMTP id 9EE2D4027F\n for <dev@dpdk.org>; Mon, 18 Mar 2024 12:21:00 +0100 (CET)",
            "from mail.maildlp.com (unknown [172.19.163.44])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Tysn833DNz1xrfl;\n Mon, 18 Mar 2024 19:19:08 +0800 (CST)",
            "from dggpeml500024.china.huawei.com (unknown [7.185.36.10])\n by mail.maildlp.com (Postfix) with ESMTPS id 2B4241400C9;\n Mon, 18 Mar 2024 19:20:59 +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_256_GCM_SHA384) id\n 15.1.2507.35; Mon, 18 Mar 2024 19:20:58 +0800"
        ],
        "From": "Chengwen Feng <fengchengwen@huawei.com>",
        "To": "<thomas@monjalon.net>, <david.marchand@redhat.com>",
        "CC": "<dev@dpdk.org>",
        "Subject": "[PATCH v4 3/6] argparse: replace flag enum with marco",
        "Date": "Mon, 18 Mar 2024 11:18:35 +0000",
        "Message-ID": "<20240318111838.16991-4-fengchengwen@huawei.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20240318111838.16991-1-fengchengwen@huawei.com>",
        "References": "<20240220131502.47510-1-fengchengwen@huawei.com>\n <20240318111838.16991-1-fengchengwen@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.50.165.33]",
        "X-ClientProxiedBy": "dggems704-chm.china.huawei.com (10.3.19.181) 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": "The enum rte_argparse_flag's value is u64, but an enum in C is\nrepresented as an int. This commit replace these enum values with\nmacro.\n\nFixes: e3e579f5bab5 (\"argparse: introduce argparse library\")\nFixes: 5357c248c960 (\"argparse: parse unsigned integers\")\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n lib/argparse/rte_argparse.h | 78 ++++++++++++++++---------------------\n 1 file changed, 33 insertions(+), 45 deletions(-)",
    "diff": "diff --git a/lib/argparse/rte_argparse.h b/lib/argparse/rte_argparse.h\nindex 47e231bef9..a6a7790cb4 100644\n--- a/lib/argparse/rte_argparse.h\n+++ b/lib/argparse/rte_argparse.h\n@@ -37,52 +37,40 @@\n extern \"C\" {\n #endif\n \n+/**@{@name Flag definition (in bitmask form) for an argument\n+ *\n+ * @note Bits[0~1] represent the argument whether has value,\n+ * bits[2~9] represent the value type which used when autosave.\n+ *\n+ * @see struct rte_argparse_arg::flags\n+ */\n+/** The argument has no value. */\n+#define RTE_ARGPARSE_ARG_NO_VALUE       RTE_SHIFT_VAL64(1, 0)\n+/** The argument must have a value. */\n+#define RTE_ARGPARSE_ARG_REQUIRED_VALUE RTE_SHIFT_VAL64(2, 0)\n+/** The argument has optional value. */\n+#define RTE_ARGPARSE_ARG_OPTIONAL_VALUE RTE_SHIFT_VAL64(3, 0)\n+/** The argument's value is int type. */\n+#define RTE_ARGPARSE_ARG_VALUE_INT      RTE_SHIFT_VAL64(1, 2)\n+/** The argument's value is uint8 type. */\n+#define RTE_ARGPARSE_ARG_VALUE_U8       RTE_SHIFT_VAL64(2, 2)\n+/** The argument's value is uint16 type. */\n+#define RTE_ARGPARSE_ARG_VALUE_U16      RTE_SHIFT_VAL64(3, 2)\n+/** The argument's value is uint32 type. */\n+#define RTE_ARGPARSE_ARG_VALUE_U32      RTE_SHIFT_VAL64(4, 2)\n+/** The argument's value is uint64 type. */\n+#define RTE_ARGPARSE_ARG_VALUE_U64      RTE_SHIFT_VAL64(5, 2)\n+/** Max value type. */\n+#define RTE_ARGPARSE_ARG_VALUE_MAX      RTE_SHIFT_VAL64(6, 2)\n /**\n- * Flag definition (in bitmask form) for an argument.\n+ * Flag for that argument support occur multiple times.\n+ * This flag can be set only when the argument is optional.\n+ * When this flag is set, the callback type must be used for parsing.\n  */\n-enum rte_argparse_flag {\n-\t/*\n-\t * Bits 0-1: represent the argument whether has value.\n-\t */\n-\n-\t/** The argument has no value. */\n-\tRTE_ARGPARSE_ARG_NO_VALUE = RTE_SHIFT_VAL64(1, 0),\n-\t/** The argument must have a value. */\n-\tRTE_ARGPARSE_ARG_REQUIRED_VALUE = RTE_SHIFT_VAL64(2, 0),\n-\t/** The argument has optional value. */\n-\tRTE_ARGPARSE_ARG_OPTIONAL_VALUE = RTE_SHIFT_VAL64(3, 0),\n-\n-\n-\t/*\n-\t * Bits 2-9: represent the value type which used when autosave\n-\t */\n-\n-\t/** The argument's value is int type. */\n-\tRTE_ARGPARSE_ARG_VALUE_INT = RTE_SHIFT_VAL64(1, 2),\n-\t/** The argument's value is uint8 type. */\n-\tRTE_ARGPARSE_ARG_VALUE_U8 = RTE_SHIFT_VAL64(2, 2),\n-\t/** The argument's value is uint16 type. */\n-\tRTE_ARGPARSE_ARG_VALUE_U16 = RTE_SHIFT_VAL64(3, 2),\n-\t/** The argument's value is uint32 type. */\n-\tRTE_ARGPARSE_ARG_VALUE_U32 = RTE_SHIFT_VAL64(4, 2),\n-\t/** The argument's value is uint64 type. */\n-\tRTE_ARGPARSE_ARG_VALUE_U64 = RTE_SHIFT_VAL64(5, 2),\n-\t/** Max value type. */\n-\tRTE_ARGPARSE_ARG_VALUE_MAX = RTE_SHIFT_VAL64(6, 2),\n-\n-\n-\t/**\n-\t * Bit 10: flag for that argument support occur multiple times.\n-\t * This flag can be set only when the argument is optional.\n-\t * When this flag is set, the callback type must be used for parsing.\n-\t */\n-\tRTE_ARGPARSE_ARG_SUPPORT_MULTI = RTE_BIT64(10),\n-\n-\t/**\n-\t * Bits 48-63: reserved for this library implementation usage.\n-\t */\n-\tRTE_ARGPARSE_ARG_RESERVED_FIELD = RTE_GENMASK64(63, 48),\n-};\n+#define RTE_ARGPARSE_ARG_SUPPORT_MULTI  RTE_BIT64(10)\n+/** Reserved for this library implementation usage. */\n+#define RTE_ARGPARSE_ARG_RESERVED_FIELD RTE_GENMASK64(63, 48)\n+/**@}*/\n \n /**\n  * A structure used to hold argument's configuration.\n@@ -126,7 +114,7 @@ struct rte_argparse_arg {\n \t */\n \tvoid *val_set;\n \n-\t/** @see rte_argparse_flag */\n+\t/** Flag definition (RTE_ARGPARSE_ARG_*) for the argument. */\n \tuint64_t flags;\n };\n \n",
    "prefixes": [
        "v4",
        "3/6"
    ]
}