get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 132749,
    "url": "http://patches.dpdk.org/api/patches/132749/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231017121318.146007-9-bruce.richardson@intel.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": "<20231017121318.146007-9-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231017121318.146007-9-bruce.richardson@intel.com",
    "date": "2023-10-17T12:13:17",
    "name": "[v5,8/9] buildtools/dpdk-cmdline-gen: support option strings",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4144e975432a2c424319bf388bfaf896d9de69dc",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.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/20231017121318.146007-9-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 29878,
            "url": "http://patches.dpdk.org/api/series/29878/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29878",
            "date": "2023-10-17T12:13:09",
            "name": "document and simplify use of cmdline",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/29878/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/132749/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/132749/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 AA0534318A;\n\tTue, 17 Oct 2023 14:14:24 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4B86742DD5;\n\tTue, 17 Oct 2023 14:13:43 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 3D3E142DD1\n for <dev@dpdk.org>; Tue, 17 Oct 2023 14:13:41 +0200 (CEST)",
            "from fmviesa001.fm.intel.com ([10.60.135.141])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Oct 2023 05:13:40 -0700",
            "from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.41])\n by fmviesa001.fm.intel.com with ESMTP; 17 Oct 2023 05:13:45 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1697544821; x=1729080821;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Nrh2QEcPYXHy5z6ZMIMwAZa6NQVMVm+y1GmBaMLNH8w=;\n b=QN1vDoRjhdQwAGBagYL4IIFopFSyunEfZA2asEVRm3t8LXFX0DG/hNKz\n DOUXkAJNemiLZbNLsX4CJs1ax2UE32KfQQTQ0gcllr7k6brUxAIHk9zDW\n zosVPNk4s8XM5ruTngyJ7zv9SnI9/j7+egjOQ4pPowojVcMmIuK3X7s9g\n qFGBrZRMsrQVP4r32rucO/mr+aAXPAlXAzKVLmzymVhm8LaSMY5GWKqtB\n QDYFwZi/paMdD8v35bsAVJo2fwBa3oCexty59rncA877YGyUt+uMPQipG\n yE6rKXk9bZaVgT1F+wsrUvVuysmkocQd1bfXX8yu7F9pj5nASwHf0xF8D A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10865\"; a=\"449984835\"",
            "E=Sophos;i=\"6.03,232,1694761200\"; d=\"scan'208\";a=\"449984835\"",
            "E=Sophos;i=\"6.03,232,1694761200\";\n   d=\"scan'208\";a=\"4068982\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, rjarry@redhat.com,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH v5 8/9] buildtools/dpdk-cmdline-gen: support option strings",
        "Date": "Tue, 17 Oct 2023 13:13:17 +0100",
        "Message-Id": "<20231017121318.146007-9-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20231017121318.146007-1-bruce.richardson@intel.com>",
        "References": "<20230802170052.955323-1-bruce.richardson@intel.com>\n <20231017121318.146007-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Add support to the commandline generator for option strings, where there\nare only a limited number of acceptable values to be passed as a\nparameter.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n buildtools/dpdk-cmdline-gen.py    | 7 +++++++\n doc/guides/prog_guide/cmdline.rst | 6 +++++-\n 2 files changed, 12 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py\nindex 6cb7610de4..fe74194121 100755\n--- a/buildtools/dpdk-cmdline-gen.py\n+++ b/buildtools/dpdk-cmdline-gen.py\n@@ -73,6 +73,13 @@ def process_command(lineno, tokens, comment):\n                 f\"cmdline_parse_token_ipaddr_t cmd_{name}_{t_name}_tok =\\n\"\n                 + f\"\\tTOKEN_IPV4_INITIALIZER(struct cmd_{name}_result, {t_name});\"\n             )\n+        elif t_type.startswith(\"|\") and t_type.endswith(\"|\"):\n+            result_struct.append(f\"\\tcmdline_fixed_string_t {t_name};\")\n+            t_val = f'\"{t_type[1:-1].replace(\"|\",\"#\")}\"'\n+            initializers.append(\n+                f\"static cmdline_parse_token_string_t cmd_{name}_{t_name}_tok =\\n\"\n+                + f\"\\tTOKEN_STRING_INITIALIZER(struct cmd_{name}_result, {t_name}, {t_val});\"\n+            )\n         else:\n             raise TypeError(f\"Error line {lineno + 1}: unknown token type '{t_type}'\")\n         token_list.append(f\"cmd_{name}_{t_name}_tok\")\ndiff --git a/doc/guides/prog_guide/cmdline.rst b/doc/guides/prog_guide/cmdline.rst\nindex 0b96b770e2..1268eca911 100644\n--- a/doc/guides/prog_guide/cmdline.rst\n+++ b/doc/guides/prog_guide/cmdline.rst\n@@ -62,7 +62,8 @@ The format of the list file must be:\n \n * One command per line\n \n-* Variable fields are prefixed by the type-name in angle-brackets, for example:\n+* Variable fields are prefixed by the type-name, or \"|\"-delimited option-list, in angle-brackets.\n+  For example:\n \n   * ``<STRING>message``\n \n@@ -70,6 +71,8 @@ The format of the list file must be:\n \n   * ``<IP>src_ip``\n \n+  * ``<|rx|tx|rxtx|>mode``\n+\n * The help text for a command is given in the form of a comment on the same line as the command\n \n An example list file, with a variety of (unrelated) commands, is shown below::\n@@ -79,6 +82,7 @@ An example list file, with a variety of (unrelated) commands, is shown below::\n    add <UINT16>x <UINT16>y  # add x and y\n    echo <STRING>message     # print message to screen\n    add socket <STRING>path  # add unix socket with the given path\n+   set mode <|rx|tx|>rxtx   # set Rx-only or Tx-only mode\n    quit                     # close the application\n \n Running the Generator Script\n",
    "prefixes": [
        "v5",
        "8/9"
    ]
}