Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/87930/?format=api
http://patches.dpdk.org/api/patches/87930/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210216105625.59844-1-kevin.laatz@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": "<20210216105625.59844-1-kevin.laatz@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210216105625.59844-1-kevin.laatz@intel.com", "date": "2021-02-16T10:56:25", "name": "[v2] usertools/dpdk-telemetry: add file-prefix cmdline argument", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "11912cbc1968821d2cb8c64028bfc7c2a9cf9b86", "submitter": { "id": 921, "url": "http://patches.dpdk.org/api/people/921/?format=api", "name": "Kevin Laatz", "email": "kevin.laatz@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/20210216105625.59844-1-kevin.laatz@intel.com/mbox/", "series": [ { "id": 15267, "url": "http://patches.dpdk.org/api/series/15267/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15267", "date": "2021-02-16T10:56:25", "name": "[v2] usertools/dpdk-telemetry: add file-prefix cmdline argument", "version": 2, "mbox": "http://patches.dpdk.org/series/15267/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/87930/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/87930/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 68241A0558;\n\tTue, 16 Feb 2021 12:11:44 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1AB28160721;\n\tTue, 16 Feb 2021 12:11:44 +0100 (CET)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id C8BC740690\n for <dev@dpdk.org>; Tue, 16 Feb 2021 12:11:42 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2021 03:11:41 -0800", "from silpixa00399838.ir.intel.com ([10.237.213.35])\n by orsmga001.jf.intel.com with ESMTP; 16 Feb 2021 03:11:40 -0800" ], "IronPort-SDR": [ "\n jCe6C/IMMELRHMhgD8NiChy1vvQOSb2V9CDaN1dioWR/CVVLGhHXT7QbbSD2CNSMPewTmpx0En\n YYDb1Oes4cgg==", "\n OTvdXKY33Ash/G9RqbDyBHQhZG6oSudE321zbr28a6kZVpD2q7WqA8et1sw+XOixcdpWHpUnzL\n 7VR5+STPH0kA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9896\"; a=\"182993087\"", "E=Sophos;i=\"5.81,183,1610438400\"; d=\"scan'208\";a=\"182993087\"", "E=Sophos;i=\"5.81,183,1610438400\"; d=\"scan'208\";a=\"438881574\"" ], "X-ExtLoop1": "1", "From": "Kevin Laatz <kevin.laatz@intel.com>", "To": "dev@dpdk.org", "Cc": "bruce.richardson@intel.com,\n\tKevin Laatz <kevin.laatz@intel.com>", "Date": "Tue, 16 Feb 2021 10:56:25 +0000", "Message-Id": "<20210216105625.59844-1-kevin.laatz@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210215155051.8659-1-kevin.laatz@intel.com>", "References": "<20210215155051.8659-1-kevin.laatz@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2] usertools/dpdk-telemetry: add file-prefix\n cmdline argument", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Currently the dpdk-telemetry.py script connects to all running DPDK apps\nconsecutively. With the addition of this file-prefix argument, we can limit\nthe amount of information returned providing improved consumability and\nprecision to the user.\n\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nReviewed-by: Bruce Richardson <bruce.richardson@intel.com>\nTested-by: Bruce Richardson <bruce.richardson@intel.com>\n\n---\nv2: Minor changes to comments and argument naming\n---\n usertools/dpdk-telemetry.py | 22 +++++++++++++++-------\n 1 file changed, 15 insertions(+), 7 deletions(-)", "diff": "diff --git a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py\nindex 181859658f..2bdee65694 100755\n--- a/usertools/dpdk-telemetry.py\n+++ b/usertools/dpdk-telemetry.py\n@@ -12,6 +12,7 @@\n import glob\n import json\n import readline\n+import argparse\n \n # global vars\n TELEMETRY_VERSION = \"v2\"\n@@ -70,14 +71,21 @@ def readline_complete(text, state):\n return matches[state]\n \n \n+def get_dpdk_runtime_dir(fp):\n+ \"\"\" Using the same logic as in DPDK's EAL, get the DPDK runtime directory\n+ based on the file-prefix and user \"\"\"\n+ if (os.getuid() == 0):\n+ return \"/var/run/dpdk/{}\".format(fp)\n+ return \"{}/dpdk/{}\".format(os.environ.get('XDG_RUNTIME_DIR', '/tmp'), fp)\n+\n+\n readline.parse_and_bind('tab: complete')\n readline.set_completer(readline_complete)\n readline.set_completer_delims(readline.get_completer_delims().replace('/', ''))\n \n-# Path to sockets for processes run as a root user\n-for f in glob.glob('/var/run/dpdk/*/dpdk_telemetry.%s' % TELEMETRY_VERSION):\n- handle_socket(f)\n-# Path to sockets for processes run as a regular user\n-for f in glob.glob('%s/dpdk/*/dpdk_telemetry.%s' %\n- (os.environ.get('XDG_RUNTIME_DIR', '/tmp'), TELEMETRY_VERSION)):\n- handle_socket(f)\n+parser = argparse.ArgumentParser()\n+parser.add_argument(\"-f\", \"--file-prefix\", \\\n+ help=\"Provide file-prefix for DPDK runtime directory\", default=\"rte\")\n+args = parser.parse_args()\n+rdir = get_dpdk_runtime_dir(args.file_prefix)\n+handle_socket(\"{}/dpdk_telemetry.{}\".format(rdir, TELEMETRY_VERSION))\n", "prefixes": [ "v2" ] }{ "id": 87930, "url": "