Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49469/?format=api
http://patches.dpdk.org/api/patches/49469/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190107153829.34047-6-vipin.varghese@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": "<20190107153829.34047-6-vipin.varghese@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190107153829.34047-6-vipin.varghese@intel.com", "date": "2019-01-07T15:38:27", "name": "[v8,5/7] app/procinfo: add support for debug ring", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "cf2bef203fe25c23a97a764d8ca0855977fe3145", "submitter": { "id": 882, "url": "http://patches.dpdk.org/api/people/882/?format=api", "name": "Varghese, Vipin", "email": "vipin.varghese@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/20190107153829.34047-6-vipin.varghese@intel.com/mbox/", "series": [ { "id": 3028, "url": "http://patches.dpdk.org/api/series/3028/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3028", "date": "2019-01-07T15:38:22", "name": "app/proc-info: enhance debug of proc-info tool", "version": 8, "mbox": "http://patches.dpdk.org/series/3028/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/49469/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/49469/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id ADF931B517;\n\tMon, 7 Jan 2019 10:42:04 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 2DF811B1F2\n\tfor <dev@dpdk.org>; Mon, 7 Jan 2019 10:42:02 +0100 (CET)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jan 2019 01:42:01 -0800", "from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203])\n\tby orsmga005.jf.intel.com with ESMTP; 07 Jan 2019 01:41:57 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,450,1539673200\"; d=\"scan'208\";a=\"289445017\"", "From": "Vipin Varghese <vipin.varghese@intel.com>", "To": "dev@dpdk.org,\n\tthomas@monjalon.net", "Cc": "reshma.pattan@intel.com, john.mcnamara@intel.com, amol.patel@intel.com, \n\tstephen@networkplumber.org, konstantin.ananyev@intel.com,\n\tjasvinder.singh@intel.com, Vipin Varghese <vipin.varghese@intel.com>", "Date": "Mon, 7 Jan 2019 21:08:27 +0530", "Message-Id": "<20190107153829.34047-6-vipin.varghese@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190107153829.34047-1-vipin.varghese@intel.com>", "References": "<20181213050842.64587-1-vipin.varghese@intel.com>\n\t<20190107153829.34047-1-vipin.varghese@intel.com>", "Subject": "[dpdk-dev] [PATCH v8 5/7] app/procinfo: add support for debug ring", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Function show_ring is used for displaying information of RING instance\nof the primary process.\n\nSigned-off-by: Vipin Varghese <vipin.varghese@intel.com>\nAcked-by: Reshma Pattan <reshma.pattan@intel.com>\nAcked-by: John McNamara <john.mcnamara@intel.com>\n---\n app/proc-info/main.c | 52 +++++++++++++++++++++++++++++++++-\n doc/guides/tools/proc_info.rst | 8 +++++-\n 2 files changed, 58 insertions(+), 2 deletions(-)", "diff": "diff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex 4f625a371..ed136d828 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -82,6 +82,9 @@ static uint32_t enable_shw_port;\n static uint32_t enable_shw_tm;\n /**< Enable show crypto. */\n static uint32_t enable_shw_crypto;\n+/**< Enable show ring. */\n+static uint32_t enable_shw_ring;\n+static char *ring_name;\n \n /**< display usage */\n static void\n@@ -104,7 +107,8 @@ proc_info_usage(const char *prgname)\n \t\t\" --host-id STRING: host id used to identify the system process is running on\\n\"\n \t\t\" --show-port: to display ports information\\n\"\n \t\t\" --show-tm: to display traffic manager information for ports\\n\"\n-\t\t\" --show-crypto: to display crypto information\\n\",\n+\t\t\" --show-crypto: to display crypto information\\n\"\n+\t\t\" --show-ring[=name]: to display ring information\\n\",\n \t\tprgname);\n }\n \n@@ -214,6 +218,7 @@ proc_info_parse_args(int argc, char **argv)\n \t\t{\"show-port\", 0, NULL, 0},\n \t\t{\"show-tm\", 0, NULL, 0},\n \t\t{\"show-crypto\", 0, NULL, 0},\n+\t\t{\"show-ring\", optional_argument, NULL, 0},\n \t\t{NULL, 0, 0, 0}\n \t};\n \n@@ -266,6 +271,11 @@ proc_info_parse_args(int argc, char **argv)\n \t\t\telse if (!strncmp(long_option[option_index].name,\n \t\t\t\t\t\"show-crypto\", MAX_LONG_OPT_SZ))\n \t\t\t\tenable_shw_crypto = 1;\n+\t\t\telse if (!strncmp(long_option[option_index].name,\n+\t\t\t\t\t\"show-ring\", MAX_LONG_OPT_SZ)) {\n+\t\t\t\tenable_shw_ring = 1;\n+\t\t\t\tring_name = optarg;\n+\t\t\t}\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\t/* Print xstat single value given by name*/\n@@ -1070,6 +1080,44 @@ show_crypto(void)\n \tSTATS_BDR_STR(50, \"\");\n }\n \n+static void\n+show_ring(char *name)\n+{\n+\tsnprintf(bdr_str, MAX_STRING_LEN, \" show - RING %\"PRIu64,\n+\t\t\trte_get_tsc_hz());\n+\tSTATS_BDR_STR(10, bdr_str);\n+\n+\tif (name != NULL) {\n+\t\tstruct rte_ring *ptr = rte_ring_lookup(name);\n+\t\tif (ptr != NULL) {\n+\t\t\tprintf(\" - Name (%s) on socket (%d)\\n\"\n+\t\t\t\t\" - flags:\\n\"\n+\t\t\t\t\"\\t -- Single Producer Enqueue (%u)\\n\"\n+\t\t\t\t\"\\t -- Single Consmer Dequeue (%u)\\n\",\n+\t\t\t\tptr->name,\n+\t\t\t\tptr->memzone->socket_id,\n+\t\t\t\tptr->flags & RING_F_SP_ENQ,\n+\t\t\t\tptr->flags & RING_F_SC_DEQ);\n+\t\t\tprintf(\" - size (%u) mask (0x%x) capacity (%u)\\n\",\n+\t\t\t\tptr->size,\n+\t\t\t\tptr->mask,\n+\t\t\t\tptr->capacity);\n+\t\t\tprintf(\" - count (%u) free count (%u)\\n\",\n+\t\t\t\trte_ring_count(ptr),\n+\t\t\t\trte_ring_free_count(ptr));\n+\t\t\tprintf(\" - full (%d) empty (%d)\\n\",\n+\t\t\t\trte_ring_full(ptr),\n+\t\t\t\trte_ring_empty(ptr));\n+\n+\t\t\tSTATS_BDR_STR(50, \"\");\n+\t\t\treturn;\n+\t\t}\n+\t}\n+\n+\trte_ring_list_dump(stdout);\n+\tSTATS_BDR_STR(50, \"\");\n+}\n+\n int\n main(int argc, char **argv)\n {\n@@ -1157,6 +1205,8 @@ main(int argc, char **argv)\n \t\tshow_tm();\n \tif (enable_shw_crypto)\n \t\tshow_crypto();\n+\tif (enable_shw_ring)\n+\t\tshow_ring(ring_name);\n \n \tret = rte_eal_cleanup();\n \tif (ret)\ndiff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst\nindex 883864d18..ba5c3dbd1 100644\n--- a/doc/guides/tools/proc_info.rst\n+++ b/doc/guides/tools/proc_info.rst\n@@ -18,7 +18,8 @@ The application has a number of command line options:\n .. code-block:: console\n \n ./$(RTE_TARGET)/app/dpdk-procinfo -- -m | [-p PORTMASK] [--stats | --xstats |\n- --stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto ]\n+ --stats-reset | --xstats-reset] [ --show-port | --show-tm | --show-crypto |\n+ --show-ring[=name] ]\n \n Parameters\n ~~~~~~~~~~\n@@ -54,6 +55,11 @@ configurations and statistics.\n The show-crypto parameter displays available cryptodev configurations,\n settings and stats per node.\n \n+**--show-ring[=name]**\n+The show-ring pararmeter display current allocation of all ring with\n+debug information. Specifying the name allows to display details for specific\n+ring. For invalid or no ring name, whole list is dump.\n+\n Limitations\n -----------\n \n", "prefixes": [ "v8", "5/7" ] }{ "id": 49469, "url": "