Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/116140/?format=api
http://patches.dpdk.org/api/patches/116140/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220909093523.471727-14-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-14-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220909093523.471727-14-bruce.richardson@intel.com", "date": "2022-09-09T09:35:23", "name": "[v3,13/13] telemetry: make help command more helpful", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9ef821e70ce2aace2a0ee8b06838ab493690bddb", "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-14-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/116140/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/116140/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 8449BA0540;\n\tFri, 9 Sep 2022 11:37:02 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6C1FE42BA3;\n\tFri, 9 Sep 2022 11:35:59 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id F165D42B91\n for <dev@dpdk.org>; Fri, 9 Sep 2022 11:35:55 +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:55 -0700", "from silpixa00401385.ir.intel.com ([10.237.214.161])\n by orsmga004.jf.intel.com with ESMTP; 09 Sep 2022 02:35:54 -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=1662716156; x=1694252156;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=ttJeebfNbU0R3tb1VJ8XmZ4ZDVQe9iMX6HX8upVLNJ0=;\n b=K6qOSR+dWVSObkdnkdXthFW9+S4eeFlOEHDgDKIIC2zSQt6sD7sIw3Jp\n MmgiwKjfvRAhoYx5wA1IgM9TcJI3QXwB+NR/4gXP9TcNX1+naHdLpuHCP\n 8IbQHtZif2mQNR54JZ7NK7JUpIZE3MVWapXvpNxxG+hHvXias6lVE5n/a\n t2ynppJaqDuRGK8gbxIQA3eR5+6vcq3x3sRWhKv2e1BnsRg2FX4NSvQiw\n A1Jen7njawlXfT6S/WSEcx/G7yfCCDeH+Mebe6Kn6UK1yNxuQ0x8zWDcA\n qmIb+VbzUFzPffoOeVJlLI7h8WQSAbH21SOIdAY34ZFBYnMmA7bXwRzdy A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10464\"; a=\"297437157\"", "E=Sophos;i=\"5.93,302,1654585200\"; d=\"scan'208\";a=\"297437157\"", "E=Sophos;i=\"5.93,302,1654585200\"; d=\"scan'208\";a=\"740996457\"" ], "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 13/13] telemetry: make help command more helpful", "Date": "Fri, 9 Sep 2022 10:35:23 +0100", "Message-Id": "<20220909093523.471727-14-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": "The /help telemetry command prints out the help text for the given\ncommand passed in as parameter. However, entering /help without any\nparameters does not give any useful information as to the fact that you\nneed to pass in a command to get help on. Update the command so it\nprints its own help text when called without any parameters.\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 lib/telemetry/telemetry.c | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c\nindex cf60d27bd4..09febff0ae 100644\n--- a/lib/telemetry/telemetry.c\n+++ b/lib/telemetry/telemetry.c\n@@ -139,15 +139,17 @@ command_help(const char *cmd __rte_unused, const char *params,\n \t\tstruct rte_tel_data *d)\n {\n \tint i;\n+\t/* if no parameters return our own help text */\n+\tconst char *to_lookup = (params == NULL ? cmd : params);\n \n-\tif (!params)\n-\t\treturn -1;\n \trte_tel_data_start_dict(d);\n \trte_spinlock_lock(&callback_sl);\n \tfor (i = 0; i < num_callbacks; i++)\n-\t\tif (strcmp(params, callbacks[i].cmd) == 0) {\n-\t\t\trte_tel_data_add_dict_string(d, params,\n-\t\t\t\t\tcallbacks[i].help);\n+\t\tif (strcmp(to_lookup, callbacks[i].cmd) == 0) {\n+\t\t\tif (params == NULL)\n+\t\t\t\trte_tel_data_string(d, callbacks[i].help);\n+\t\t\telse\n+\t\t\t\trte_tel_data_add_dict_string(d, params,\tcallbacks[i].help);\n \t\t\tbreak;\n \t\t}\n \trte_spinlock_unlock(&callback_sl);\n", "prefixes": [ "v3", "13/13" ] }{ "id": 116140, "url": "