Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/116136/?format=api
http://patches.dpdk.org/api/patches/116136/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220909093523.471727-10-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": "<20220909093523.471727-10-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220909093523.471727-10-bruce.richardson@intel.com", "date": "2022-09-09T09:35:19", "name": "[v3,09/13] telemetry: limit command characters", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0c6ff73c7d9b74d878b546aacafd87283cad24bd", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220909093523.471727-10-bruce.richardson@intel.com/mbox/", "series": [ { "id": 24617, "url": "http://patches.dpdk.org/api/series/24617/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24617", "date": "2022-09-09T09:35:13", "name": "telemetry JSON escaping and other enhancements", "version": 3, "mbox": "http://patches.dpdk.org/series/24617/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/116136/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/116136/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 CFB94A0540;\n\tFri, 9 Sep 2022 11:36:40 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E456442B8E;\n\tFri, 9 Sep 2022 11:35:55 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id B061242829\n for <dev@dpdk.org>; Fri, 9 Sep 2022 11:35:51 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Sep 2022 02:35:50 -0700", "from silpixa00401385.ir.intel.com ([10.237.214.161])\n by orsmga004.jf.intel.com with ESMTP; 09 Sep 2022 02:35:49 -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=1662716151; x=1694252151;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=GnQTKladdNCFmAE4dqRh46rqOJm9KH1WTCgMQJrDXLw=;\n b=fpIrL18ptIxfAzc1Ju80LLcAOT7HsuV9NyX/lce+OCTkvVzP8Xl+iUX2\n RfnatflTthHtMO6ehn39f2C1ptDfK583p58aH+fhnSgUzl+6zGANH33Fm\n +7v/vndnYTAyK69GYL2/5oiZehFPGa4Mutcqje5tyhp9lG+hfMq+ySa5A\n MVQy0pGPawmwdocntjDItUo87WAciPLepb4NbJL4e0Ve0/Bg5qXyolxFC\n kdNOQTXZvJ8K+1dKwaHmbh1bUMJKbcbf1+O10mx1pPv6RaZSSFmsomDI5\n vAOCBr2YxcbmHUe/yC2XMQWo7bRgcg93gtH1Wa3XuWDc7DLQhxi4dbZl5 w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10464\"; a=\"297437141\"", "E=Sophos;i=\"5.93,302,1654585200\"; d=\"scan'208\";a=\"297437141\"", "E=Sophos;i=\"5.93,302,1654585200\"; d=\"scan'208\";a=\"740996439\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n Ciara Power <ciara.power@intel.com>,\n =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>", "Subject": "[PATCH v3 09/13] telemetry: limit command characters", "Date": "Fri, 9 Sep 2022 10:35:19 +0100", "Message-Id": "<20220909093523.471727-10-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220909093523.471727-1-bruce.richardson@intel.com>", "References": "<20220623164245.561371-1-bruce.richardson@intel.com>\n <20220909093523.471727-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "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": "Limit the telemetry command characters to the minimum set needed for\ncurrent implementations. This prevents issues with invalid json\ncharacters needing to be escaped on replies.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Ciara Power <ciara.power@intel.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n---\n doc/guides/rel_notes/deprecation.rst | 8 --------\n lib/telemetry/telemetry.c | 7 +++++++\n 2 files changed, 7 insertions(+), 8 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex e7583cae4c..d1c93ca7e3 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -212,14 +212,6 @@ Deprecation Notices\n * metrics: The function ``rte_metrics_init`` will have a non-void return\n in order to notify errors instead of calling ``rte_exit``.\n \n-* telemetry: The allowed characters in names for dictionary values\n- will be limited to alphanumeric characters\n- and a small subset of additional printable characters.\n- This will ensure that all dictionary parameter names can be output\n- without escaping in JSON - or in any future output format used.\n- Names for the telemetry commands will be similarly limited.\n- The parameters for telemetry commands are unaffected by this change.\n-\n * net/octeontx_ep: The driver ``octeontx_ep`` was to support OCTEON TX\n line of products.\n It will be renamed to ``octeon_ep`` in DPDK 22.11 to apply for\ndiff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c\nindex 7188b1905c..03651e947d 100644\n--- a/lib/telemetry/telemetry.c\n+++ b/lib/telemetry/telemetry.c\n@@ -70,12 +70,19 @@ int\n rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help)\n {\n \tstruct cmd_callback *new_callbacks;\n+\tconst char *cmdp = cmd;\n \tint i = 0;\n \n \tif (strlen(cmd) >= MAX_CMD_LEN || fn == NULL || cmd[0] != '/'\n \t\t\t|| strlen(help) >= RTE_TEL_MAX_STRING_LEN)\n \t\treturn -EINVAL;\n \n+\twhile (*cmdp != '\\0') {\n+\t\tif (!isalnum(*cmdp) && *cmdp != '_' && *cmdp != '/')\n+\t\t\treturn -EINVAL;\n+\t\tcmdp++;\n+\t}\n+\n \trte_spinlock_lock(&callback_sl);\n \tnew_callbacks = realloc(callbacks, sizeof(callbacks[0]) * (num_callbacks + 1));\n \tif (new_callbacks == NULL) {\n", "prefixes": [ "v3", "09/13" ] }{ "id": 116136, "url": "