Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49613/?format=api
http://patchwork.dpdk.org/api/patches/49613/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190110213645.29901-2-vipin.varghese@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": "<20190110213645.29901-2-vipin.varghese@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190110213645.29901-2-vipin.varghese@intel.com", "date": "2019-01-10T21:36:40", "name": "[v9,1/6] app/procinfo: add support for show port", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "52d6cea750081aeb4b4636f7e7729ff33fc52afe", "submitter": { "id": 882, "url": "http://patchwork.dpdk.org/api/people/882/?format=api", "name": "Varghese, Vipin", "email": "vipin.varghese@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190110213645.29901-2-vipin.varghese@intel.com/mbox/", "series": [ { "id": 3099, "url": "http://patchwork.dpdk.org/api/series/3099/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=3099", "date": "2019-01-10T21:36:39", "name": "app/proc-info: enhance debug of proc-info tool", "version": 9, "mbox": "http://patchwork.dpdk.org/series/3099/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/49613/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/49613/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 4AFFB1B908;\n\tThu, 10 Jan 2019 16:40:01 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 071A41B8F7\n\tfor <dev@dpdk.org>; Thu, 10 Jan 2019 16:39:59 +0100 (CET)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t10 Jan 2019 07:39:59 -0800", "from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203])\n\tby fmsmga006.fm.intel.com with ESMTP; 10 Jan 2019 07:39:56 -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,461,1539673200\"; d=\"scan'208\";a=\"309300666\"", "From": "Vipin Varghese <vipin.varghese@intel.com>", "To": "dev@dpdk.org,\n\tthomas@monjalon.net,\n\tjohn.mcnamara@intel.com", "Cc": "konstantin.ananyev@intel.com, stephen@networkplumber.org,\n\treshma.pattan@intel.com, jasvinder.singh@intel.com,\n\tstephen1.byrne@intel.com, amol.patel@intel.com,\n\tVipin Varghese <vipin.varghese@intel.com>", "Date": "Fri, 11 Jan 2019 03:06:40 +0530", "Message-Id": "<20190110213645.29901-2-vipin.varghese@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190110213645.29901-1-vipin.varghese@intel.com>", "References": "<20190107153829.34047-2-vipin.varghese@intel.com>\n\t<20190110213645.29901-1-vipin.varghese@intel.com>", "Subject": "[dpdk-dev] [PATCH v9 1/6] app/procinfo: add support for show port", "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_port is used for displaying the port PMD information under\nprimary process. The information shows basic, per queue and security.\nAlso helper MACRO 'MAX_STRING_LEN, STATS_BDR_FMT and STATS_BDR_STR' and\nmeson build file is updated for new functionality.\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 | 119 ++++++++++++++++++++++++++++++++-\n app/proc-info/meson.build | 2 +-\n doc/guides/tools/proc_info.rst | 9 ++-\n 3 files changed, 126 insertions(+), 4 deletions(-)", "diff": "diff --git a/app/proc-info/main.c b/app/proc-info/main.c\nindex c20effa4f..2108c24b0 100644\n--- a/app/proc-info/main.c\n+++ b/app/proc-info/main.c\n@@ -29,6 +29,9 @@\n #include <rte_branch_prediction.h>\n #include <rte_string_fns.h>\n #include <rte_metrics.h>\n+#include <rte_cycles.h>\n+#include <rte_security.h>\n+#include <rte_cryptodev.h>\n \n /* Maximum long option length for option parsing. */\n #define MAX_LONG_OPT_SZ 64\n@@ -36,6 +39,10 @@\n \n #define MAX_STRING_LEN 256\n \n+#define STATS_BDR_FMT \"========================================\"\n+#define STATS_BDR_STR(w, s) printf(\"%.*s%s%.*s\\n\", w, \\\n+\tSTATS_BDR_FMT, s, w, STATS_BDR_FMT)\n+\n /**< mask of enabled ports */\n static uint32_t enabled_port_mask;\n /**< Enable stats. */\n@@ -65,6 +72,12 @@ static char *xstats_name;\n static uint32_t nb_xstats_ids;\n static uint64_t xstats_ids[MAX_NB_XSTATS_IDS];\n \n+/* show border */\n+static char bdr_str[MAX_STRING_LEN];\n+\n+/**< Enable show port. */\n+static uint32_t enable_shw_port;\n+\n /**< display usage */\n static void\n proc_info_usage(const char *prgname)\n@@ -83,7 +96,8 @@ proc_info_usage(const char *prgname)\n \t\t\" --stats-reset: to reset port statistics\\n\"\n \t\t\" --xstats-reset: to reset port extended statistics\\n\"\n \t\t\" --collectd-format: to print statistics to STDOUT in expected by collectd format\\n\"\n-\t\t\" --host-id STRING: host id used to identify the system process is running on\\n\",\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\tprgname);\n }\n \n@@ -190,6 +204,7 @@ proc_info_parse_args(int argc, char **argv)\n \t\t{\"collectd-format\", 0, NULL, 0},\n \t\t{\"xstats-ids\", 1, NULL, 1},\n \t\t{\"host-id\", 0, NULL, 0},\n+\t\t{\"show-port\", 0, NULL, 0},\n \t\t{NULL, 0, 0, 0}\n \t};\n \n@@ -233,6 +248,9 @@ proc_info_parse_args(int argc, char **argv)\n \t\t\telse if (!strncmp(long_option[option_index].name, \"xstats-reset\",\n \t\t\t\t\tMAX_LONG_OPT_SZ))\n \t\t\t\treset_xstats = 1;\n+\t\t\telse if (!strncmp(long_option[option_index].name,\n+\t\t\t\t\t\"show-port\", MAX_LONG_OPT_SZ))\n+\t\t\t\tenable_shw_port = 1;\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\t/* Print xstat single value given by name*/\n@@ -584,6 +602,98 @@ metrics_display(int port_id)\n \trte_free(names);\n }\n \n+static void\n+show_port(void)\n+{\n+\tuint16_t i = 0;\n+\tint ret = 0, j, k;\n+\n+\tsnprintf(bdr_str, MAX_STRING_LEN, \" show - Port PMD %\"PRIu64,\n+\t\t\trte_get_tsc_hz());\n+\tSTATS_BDR_STR(10, bdr_str);\n+\n+\tRTE_ETH_FOREACH_DEV(i) {\n+\t\tuint16_t mtu = 0;\n+\t\tstruct rte_eth_link link;\n+\t\tstruct rte_eth_dev_info dev_info;\n+\t\tstruct rte_eth_rxq_info queue_info;\n+\t\tstruct rte_eth_rss_conf rss_conf;\n+\n+\t\tmemset(&rss_conf, 0, sizeof(rss_conf));\n+\n+\t\tsnprintf(bdr_str, MAX_STRING_LEN, \" Port (%u)\", i);\n+\t\tSTATS_BDR_STR(5, bdr_str);\n+\t\tprintf(\" - generic config\\n\");\n+\n+\t\tprintf(\"\\t -- Socket %d\\n\", rte_eth_dev_socket_id(i));\n+\t\trte_eth_link_get(i, &link);\n+\t\tprintf(\"\\t -- link speed %d duplex %d,\"\n+\t\t\t\t\" auto neg %d status %d\\n\",\n+\t\t\t\tlink.link_speed,\n+\t\t\t\tlink.link_duplex,\n+\t\t\t\tlink.link_autoneg,\n+\t\t\t\tlink.link_status);\n+\t\tprintf(\"\\t -- promiscuous (%d)\\n\",\n+\t\t\t\trte_eth_promiscuous_get(i));\n+\t\tret = rte_eth_dev_get_mtu(i, &mtu);\n+\t\tif (ret == 0)\n+\t\t\tprintf(\"\\t -- mtu (%d)\\n\", mtu);\n+\n+\t\trte_eth_dev_info_get(i, &dev_info);\n+\n+\t\tprintf(\" - queue\\n\");\n+\t\tfor (j = 0; j < dev_info.nb_rx_queues; j++) {\n+\t\t\tret = rte_eth_rx_queue_info_get(i, j, &queue_info);\n+\t\t\tif (ret == 0) {\n+\t\t\t\tprintf(\"\\t -- queue %d rx scatter %d\"\n+\t\t\t\t\t\t\" descriptors %d\"\n+\t\t\t\t\t\t\" offloads 0x%\"PRIx64\n+\t\t\t\t\t\t\" mempool socket %d\\n\",\n+\t\t\t\t\t\tj,\n+\t\t\t\t\t\tqueue_info.scattered_rx,\n+\t\t\t\t\t\tqueue_info.nb_desc,\n+\t\t\t\t\t\tqueue_info.conf.offloads,\n+\t\t\t\t\t\tqueue_info.mp->socket_id);\n+\t\t\t}\n+\t\t}\n+\n+\t\tret = rte_eth_dev_rss_hash_conf_get(i, &rss_conf);\n+\t\tif (ret == 0) {\n+\t\t\tif (rss_conf.rss_key) {\n+\t\t\t\tprintf(\" - RSS\\n\");\n+\t\t\t\tprintf(\"\\t -- RSS len %u key (hex):\",\n+\t\t\t\t\t\trss_conf.rss_key_len);\n+\t\t\t\tfor (k = 0; k < rss_conf.rss_key_len; k++)\n+\t\t\t\t\tprintf(\" %x\", rss_conf.rss_key[k]);\n+\t\t\t\tprintf(\"\\t -- hf 0x%\"PRIx64\"\\n\",\n+\t\t\t\t\t\trss_conf.rss_hf);\n+\t\t\t}\n+\t\t}\n+\n+\t\tprintf(\" - cyrpto context\\n\");\n+\t\tvoid *p_ctx = rte_eth_dev_get_sec_ctx(i);\n+\t\tprintf(\"\\t -- security context - %p\\n\", p_ctx);\n+\n+\t\tif (p_ctx) {\n+\t\t\tprintf(\"\\t -- size %u\\n\",\n+\t\t\t\t\trte_security_session_get_size(p_ctx));\n+\t\t\tconst struct rte_security_capability *s_cap =\n+\t\t\t\trte_security_capabilities_get(p_ctx);\n+\t\t\tif (s_cap) {\n+\t\t\t\tprintf(\"\\t -- action (0x%x), protocol (0x%x),\"\n+\t\t\t\t\t\t\" offload flags (0x%x)\\n\",\n+\t\t\t\t\t\ts_cap->action,\n+\t\t\t\t\t\ts_cap->protocol,\n+\t\t\t\t\t\ts_cap->ol_flags);\n+\t\t\t\tprintf(\"\\t -- capabilities - oper type %x\\n\",\n+\t\t\t\t\t\ts_cap->crypto_capabilities->op);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tSTATS_BDR_STR(50, \"\");\n+}\n+\n int\n main(int argc, char **argv)\n {\n@@ -664,9 +774,16 @@ main(int argc, char **argv)\n \tif (enable_metrics)\n \t\tmetrics_display(RTE_METRICS_GLOBAL);\n \n+\t/* show information for PMD */\n+\tif (enable_shw_port)\n+\t\tshow_port();\n+\n \tret = rte_eal_cleanup();\n \tif (ret)\n \t\tprintf(\"Error from rte_eal_cleanup(), %d\\n\", ret);\n \n+\tsnprintf(bdr_str, MAX_STRING_LEN, \" \");\n+\tSTATS_BDR_STR(50, bdr_str);\n+\n \treturn 0;\n }\ndiff --git a/app/proc-info/meson.build b/app/proc-info/meson.build\nindex a52b2ee4a..866b390d6 100644\n--- a/app/proc-info/meson.build\n+++ b/app/proc-info/meson.build\n@@ -3,4 +3,4 @@\n \n sources = files('main.c')\n allow_experimental_apis = true\n-deps += ['ethdev', 'metrics']\n+deps += ['ethdev', 'metrics', 'security']\ndiff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst\nindex d5b5ed6a6..6baa1db9a 100644\n--- a/doc/guides/tools/proc_info.rst\n+++ b/doc/guides/tools/proc_info.rst\n@@ -6,7 +6,8 @@ dpdk-procinfo Application\n \n The dpdk-procinfo application is a Data Plane Development Kit (DPDK) application\n that runs as a DPDK secondary process and is capable of retrieving port\n-statistics, resetting port statistics and printing DPDK memory information.\n+statistics, resetting port statistics, printing DPDK memory information and\n+displaying debug information for port.\n This application extends the original functionality that was supported by\n dump_cfg.\n \n@@ -17,7 +18,7 @@ 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]\n+ --stats-reset | --xstats-reset] [ --show-port ]\n \n Parameters\n ~~~~~~~~~~\n@@ -41,6 +42,10 @@ If no port mask is specified xstats are reset for all DPDK ports.\n \n **-m**: Print DPDK memory information.\n \n+**--show-port**\n+The show-port parameter displays port level various configuration informationi\n+associated to RX port queue pair.\n+\n Limitations\n -----------\n \n", "prefixes": [ "v9", "1/6" ] }{ "id": 49613, "url": "