Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133500/?format=api
http://patchwork.dpdk.org/api/patches/133500/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231027110117.70995-9-bruce.richardson@intel.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": "<20231027110117.70995-9-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231027110117.70995-9-bruce.richardson@intel.com", "date": "2023-10-27T11:01:16", "name": "[v7,8/9] buildtools/dpdk-cmdline-gen: support option strings", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a56f73f2b9f5c2e78028c111e93cc7c4628eb468", "submitter": { "id": 20, "url": "http://patchwork.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.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/20231027110117.70995-9-bruce.richardson@intel.com/mbox/", "series": [ { "id": 30025, "url": "http://patchwork.dpdk.org/api/series/30025/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30025", "date": "2023-10-27T11:01:08", "name": "document and simplify use of cmdline", "version": 7, "mbox": "http://patchwork.dpdk.org/series/30025/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/133500/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/133500/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 F0A8743215;\n\tFri, 27 Oct 2023 13:02:40 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C0E2042E16;\n\tFri, 27 Oct 2023 13:01:45 +0200 (CEST)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.8])\n by mails.dpdk.org (Postfix) with ESMTP id B0FFC42DE4\n for <dev@dpdk.org>; Fri, 27 Oct 2023 13:01:42 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Oct 2023 04:01:42 -0700", "from silpixa00401385.ir.intel.com ([10.237.214.154])\n by orsmga004.jf.intel.com with ESMTP; 27 Oct 2023 04:01:41 -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=1698404503; x=1729940503;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=v7tOydz7c2Oi7K1r/7WRSvnD7983WFxKHsT4L58/8bk=;\n b=oERTwo6Ye4NyZsCmQJhH+8GWBv3Vd+Y8OhVgWfM0PWJRavF1ImEkPSIZ\n xZHlZdmHv4/Z1gVJYWTlfcnQgq1T1JsBj0hpxauHX3gagcxI622U9XBEh\n zgaeTslZow1ywotAaYTtfU/Fb5LSWSVytE0dDEJOI0p8XQoveDqJpFFoa\n JMOk3l67hAx2SEqO96lvMrXkcsdm4zTf+5GlraXX86T2QacgqkRqjY7Rx\n kXtZwDHm+3bLHu2Ho/+T52xO7UGN9l28yinC7QTKmfKqOq1aYQdPT/U+4\n ZKVMxXsi9pgVy2V1T5qnDhau75c0nDeL8Hy+QS+Nffj2G131ZrLb2Tybn Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10875\"; a=\"546715\"", "E=Sophos;i=\"6.03,256,1694761200\";\n d=\"scan'208\";a=\"546715\"", "E=McAfee;i=\"6600,9927,10875\"; a=\"883157876\"", "E=Sophos;i=\"6.03,256,1694761200\"; d=\"scan'208\";a=\"883157876\"" ], "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 v7 8/9] buildtools/dpdk-cmdline-gen: support option strings", "Date": "Fri, 27 Oct 2023 12:01:16 +0100", "Message-Id": "<20231027110117.70995-9-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20231027110117.70995-1-bruce.richardson@intel.com>", "References": "<20230802170052.955323-1-bruce.richardson@intel.com>\n <20231027110117.70995-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 | 7 +++++++\n 2 files changed, 14 insertions(+)", "diff": "diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py\nindex c208121363..8922bb5fc3 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..42e6a54bf4 100644\n--- a/doc/guides/prog_guide/cmdline.rst\n+++ b/doc/guides/prog_guide/cmdline.rst\n@@ -70,6 +70,12 @@ The format of the list file must be:\n \n * ``<IP>src_ip``\n \n+* Variable fields, which take their values from a list of options,\n+ have the comma-separated option list placed in braces, rather than a the type name.\n+ For example,\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 +85,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": [ "v7", "8/9" ] }{ "id": 133500, "url": "