From patchwork Tue Oct 23 13:57:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47244 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5FB7E1B4F6; Tue, 23 Oct 2018 16:01:45 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0D2381B4F5 for ; Tue, 23 Oct 2018 16:01:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934524" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:31 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:43 +0530 Message-Id: <20181023135751.21536-1-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1 1/9] app/procinfo: add usage for new debug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update the file with MACRO for stats border, usage text information and string comparision. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index c20effa4f..92854f5ba 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -36,6 +36,10 @@ #define MAX_STRING_LEN 256 +#define STATS_BDR_FMT "========================================" +#define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \ + STATS_BDR_FMT, s, w, STATS_BDR_FMT) + /**< mask of enabled ports */ static uint32_t enabled_port_mask; /**< Enable stats. */ @@ -83,7 +87,12 @@ proc_info_usage(const char *prgname) " --stats-reset: to reset port statistics\n" " --xstats-reset: to reset port extended statistics\n" " --collectd-format: to print statistics to STDOUT in expected by collectd format\n" - " --host-id STRING: host id used to identify the system process is running on\n", + " --host-id STRING: host id used to identify the system process is running on\n" + " --dbg-port to display information for all available ports\n" + " --dbg-tm to display information for traffic manager\n" + " --dbg-crypto to display information for crypto\n" + " --dbg-ring[=name] to display information for ring\n" + " --dbg-mempool[=name] to display information for mempool\n", prgname); } @@ -190,6 +199,11 @@ proc_info_parse_args(int argc, char **argv) {"collectd-format", 0, NULL, 0}, {"xstats-ids", 1, NULL, 1}, {"host-id", 0, NULL, 0}, + {"dbg-port", 0, NULL, 0}, + {"dbg-tm", 0, NULL, 0}, + {"dbg-crypto", 0, NULL, 0}, + {"dbg-ring", optional_argument, NULL, 0}, + {"dbg-mempool", optional_argument, NULL, 0}, {NULL, 0, 0, 0} }; From patchwork Tue Oct 23 13:57:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47245 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 91F861B50A; Tue, 23 Oct 2018 16:01:47 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A25C71B4F5 for ; Tue, 23 Oct 2018 16:01:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934555" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:34 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:44 +0530 Message-Id: <20181023135751.21536-2-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 2/9] app/procinfo: add compare for new options X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add code for new debug options to compare usage strings and set enable flag. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 92854f5ba..5505d3fe3 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -63,6 +63,18 @@ static uint32_t mem_info; /**< Enable displaying xstat name. */ static uint32_t enable_xstats_name; static char *xstats_name; +/**< Enable port debug. */ +static uint32_t enable_dbg_port; +/**< Enable tm debug. */ +static uint32_t enable_dbg_tm; +/**< Enable crypto debug. */ +static uint32_t enable_dbg_crypto; +/**< Enable ring debug. */ +static uint32_t enable_dbg_ring; +static char *ring_name; +/**< Enable mempool debug. */ +static uint32_t enable_dbg_mempool; +static char *mempool_name; /**< Enable xstats by ids. */ #define MAX_NB_XSTATS_IDS 1024 @@ -247,6 +259,24 @@ proc_info_parse_args(int argc, char **argv) else if (!strncmp(long_option[option_index].name, "xstats-reset", MAX_LONG_OPT_SZ)) reset_xstats = 1; + else if (!strncmp(long_option[option_index].name, + "dbg-port", MAX_LONG_OPT_SZ)) + enable_dbg_port = 1; + else if (!strncmp(long_option[option_index].name, + "dbg-tm", MAX_LONG_OPT_SZ)) + enable_dbg_tm = 1; + else if (!strncmp(long_option[option_index].name, + "dbg-crypto", MAX_LONG_OPT_SZ)) + enable_dbg_crypto = 1; + else if (!strncmp(long_option[option_index].name, + "dbg-ring", MAX_LONG_OPT_SZ)) { + enable_dbg_ring = 1; + ring_name = optarg; + } else if (!strncmp(long_option[option_index].name, + "dbg-mempool", MAX_LONG_OPT_SZ)) { + enable_dbg_mempool = 1; + mempool_name = optarg; + } break; case 1: /* Print xstat single value given by name*/ From patchwork Tue Oct 23 13:57:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47246 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 294161B511; Tue, 23 Oct 2018 16:01:50 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C10FC1B4F6 for ; Tue, 23 Oct 2018 16:01:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934600" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:38 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:45 +0530 Message-Id: <20181023135751.21536-3-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 3/9] app/procinfo: add prototype for debug instances X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add prototype and function calls for the debug functions. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 5505d3fe3..5511fcb71 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -628,6 +628,36 @@ metrics_display(int port_id) rte_free(names); } +static void +debug_port(void) +{ + printf(" port"); +} + +static void +debug_tm(void) +{ + printf(" tm"); +} + +static void +debug_crypto(void) +{ + printf(" crypto"); +} + +static void +debug_ring(char *name) +{ + printf(" rings Name (%s)", name); +} + +static void +debug_mempool(char *name) +{ + printf(" mempools Name (%s)", name); +} + int main(int argc, char **argv) { @@ -707,6 +737,17 @@ main(int argc, char **argv) /* print port independent stats */ if (enable_metrics) metrics_display(RTE_METRICS_GLOBAL); + /* print debug information for PMD */ + if (enable_dbg_port) + debug_port(); + if (enable_dbg_tm) + debug_tm(); + if (enable_dbg_crypto) + debug_crypto(); + if (enable_dbg_ring) + debug_ring(ring_name); + if (enable_dbg_mempool) + debug_mempool(mempool_name); ret = rte_eal_cleanup(); if (ret) From patchwork Tue Oct 23 13:57:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47247 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9EDF91B517; Tue, 23 Oct 2018 16:01:51 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 580241B4F5 for ; Tue, 23 Oct 2018 16:01:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934618" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:41 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:46 +0530 Message-Id: <20181023135751.21536-4-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 4/9] app/procinfo: add code for debug port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Function debug_port is used for displaying the port PMD under the primary process. This covers basic and per queue configuration. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 113 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 5511fcb71..668f7febf 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -29,6 +29,9 @@ #include #include #include +#include +#include +#include /* Maximum long option length for option parsing. */ #define MAX_LONG_OPT_SZ 64 @@ -40,6 +43,8 @@ #define STATS_BDR_STR(w, s) printf("%.*s%s%.*s\n", w, \ STATS_BDR_FMT, s, w, STATS_BDR_FMT) +char bdr_str[100]; + /**< mask of enabled ports */ static uint32_t enabled_port_mask; /**< Enable stats. */ @@ -631,7 +636,113 @@ metrics_display(int port_id) static void debug_port(void) { - printf(" port"); + uint16_t i = 0; + int ret = 0, j, k; + + snprintf(bdr_str, 100, " debug - Port PMD %"PRIu64, rte_get_tsc_hz()); + STATS_BDR_STR(10, bdr_str); + + RTE_ETH_FOREACH_DEV(i) { + uint16_t mtu = 0; + struct rte_eth_link link = {0}; + struct rte_eth_dev_info dev_info = {0}; + struct rte_eth_rxq_info qinfo = {0}; + struct rte_eth_stats stats = {0}; + struct rte_eth_rss_conf rss_conf = {0}; + + snprintf(bdr_str, 100, " Port (%u)", i); + STATS_BDR_STR(5, bdr_str); + printf(" - generic config\n"); + + printf("\t -- Socket %d\n", rte_eth_dev_socket_id(i)); + rte_eth_link_get(i, &link); + printf("\t -- link speed %d duplex %d," + " auto neg %d status %d\n", + link.link_speed, + link.link_duplex, + link.link_autoneg, + link.link_status); + printf("\t -- promiscuous (%d)\n", + rte_eth_promiscuous_get(i)); + ret = rte_eth_dev_get_mtu(i, &mtu); + if (ret == 0) + printf("\t -- mtu (%d)\n", mtu); + + printf(" - queue\n"); + + rte_eth_dev_info_get(i, &dev_info); + + for (j = 0; j < dev_info.nb_rx_queues; j++) { + ret = rte_eth_rx_queue_info_get(i, j, &qinfo); + if (ret == 0) { + printf("\t -- queue %d rx scatter %d" + " descriptors %d offloads 0x%"PRIx64 + " mempool socket %d\n", + j, + qinfo.scattered_rx, + qinfo.nb_desc, + qinfo.conf.offloads, + qinfo.mp->socket_id); + + ret = rte_eth_stats_get(i, &stats); + if (ret == 0) { + printf("\t -- packet input %"PRIu64 + " output %"PRIu64"" + " error %"PRIu64"\n", + stats.q_ipackets[j], + stats.q_opackets[j], + stats.q_errors[j]); + } + } + + ret = rte_eth_dev_rss_hash_conf_get(i, &rss_conf); + if ((ret) || (rss_conf.rss_key == NULL)) + continue; + + printf("\t -- RSS len %u key (hex):", + rss_conf.rss_key_len); + for (k = 0; k < rss_conf.rss_key_len; k++) + printf(" %x", rss_conf.rss_key[k]); + printf("\t -- hf 0x%"PRIx64"\n", + rss_conf.rss_hf); + } + + printf(" - drop packet information\n"); + ret = rte_eth_stats_get(i, &stats); + if (ret == 0) { + printf("\t -- input %"PRIu64 + " output %"PRIu64"\n", + stats.ipackets, + stats.opackets); + printf("\t -- error input %"PRIu64 + " output %"PRIu64"\n", + stats.ierrors, + stats.oerrors); + printf("\t -- RX no mbuf %"PRIu64"\n", + stats.rx_nombuf); + } + + printf(" - cyrpto context\n"); + void *ptr_ctx = rte_eth_dev_get_sec_ctx(i); + printf("\t -- security context - %p\n", ptr_ctx); + + if (ptr_ctx) { + printf("\t -- size %u\n", + rte_security_session_get_size(ptr_ctx)); + const struct rte_security_capability *ptr_sec_cap = + rte_security_capabilities_get(ptr_ctx); + if (ptr_sec_cap) { + printf("\t -- action (0x%x), protocol (0x%x)," + " offload flags (0x%x)\n", + ptr_sec_cap->action, + ptr_sec_cap->protocol, + ptr_sec_cap->ol_flags); + printf("\t -- capabilities - oper type %x\n", + ptr_sec_cap->crypto_capabilities->op); + } + } + } + STATS_BDR_STR(50, ""); } static void From patchwork Tue Oct 23 13:57:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47248 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8D8D31B520; Tue, 23 Oct 2018 16:01:53 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7F6EA1B504 for ; Tue, 23 Oct 2018 16:01:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934644" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:44 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:47 +0530 Message-Id: <20181023135751.21536-5-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 5/9] app/procinfo: add code for debug tm X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Function debug_tm is used for displaying the tm PMD under the primary process. This covers basic and per node|level details. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 247 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 246 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 668f7febf..4766a5ea3 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -32,6 +32,7 @@ #include #include #include +#include /* Maximum long option length for option parsing. */ #define MAX_LONG_OPT_SZ 64 @@ -748,7 +749,251 @@ debug_port(void) static void debug_tm(void) { - printf(" tm"); + int ret = 0, is_leaf = 0; + unsigned int j, k; + uint16_t i = 0; + + snprintf(bdr_str, 100, "debug - TM PMD %"PRIu64, rte_get_tsc_hz()); + STATS_BDR_STR(10, bdr_str); + + RTE_ETH_FOREACH_DEV(i) { + struct rte_eth_dev_info dev_info = {0}; + struct rte_tm_capabilities cap = {0}; + struct rte_tm_error error = {0}; + struct rte_tm_node_capabilities capnode = {0}; + struct rte_tm_level_capabilities caplevel = {0}; + uint32_t n_leaf_nodes = 0; + + snprintf(bdr_str, 100, " TM for port (%u) ", i); + STATS_BDR_STR(5, bdr_str); + + rte_eth_dev_info_get(i, &dev_info); + printf(" - Generic\n" + "\t -- driver name %s\n" + "\t -- max vf (%u)\n" + "\t -- max tx queues (%u)\n" + "\t -- number of tx queues (%u)\n", + dev_info.driver_name, + dev_info.max_vfs, + dev_info.max_tx_queues, + dev_info.nb_tx_queues); + + ret = rte_tm_get_number_of_leaf_nodes(i, &n_leaf_nodes, &error); + if (ret == 0) + printf(" - leaf nodes (%u)\n", n_leaf_nodes); + + ret = rte_tm_capabilities_get(i, &cap, &error); + if (ret) + continue; + + printf(" - MAX:" + " nodes (%u)" + " levels (%u)" + " children (%u)\n", + cap.n_nodes_max, + cap.n_levels_max, + cap.sched_n_children_max); + + printf(" - identical nodes:" + " non leaf (%d) leaf (%d)\n", + cap.non_leaf_nodes_identical, + cap.leaf_nodes_identical); + + printf(" - Shaper MAX:\n" + "\t -- total (%u)\n" + "\t -- private (%u) private dual (%d)\n" + "\t -- shared (%u) shared dual (%u)\n", + cap.shaper_n_max, + cap.shaper_private_n_max, + cap.shaper_private_dual_rate_n_max, + cap.shaper_shared_n_max, + cap.shaper_shared_dual_rate_n_max); + + printf(" - mark support:\n"); + printf("\t -- vlan dei: GREEN (%d) YELLOW (%d) RED (%d)\n", + cap.mark_vlan_dei_supported[RTE_TM_GREEN], + cap.mark_vlan_dei_supported[RTE_TM_YELLOW], + cap.mark_vlan_dei_supported[RTE_TM_RED]); + printf("\t -- ip ecn tcp: GREEN (%d) YELLOW (%d) RED (%d)\n", + cap.mark_ip_ecn_tcp_supported[RTE_TM_GREEN], + cap.mark_ip_ecn_tcp_supported[RTE_TM_YELLOW], + cap.mark_ip_ecn_tcp_supported[RTE_TM_RED]); + printf("\t -- ip ecn sctp: GREEN (%d) YELLOW (%d) RED (%d)\n", + cap.mark_ip_ecn_sctp_supported[RTE_TM_GREEN], + cap.mark_ip_ecn_sctp_supported[RTE_TM_YELLOW], + cap.mark_ip_ecn_sctp_supported[RTE_TM_RED]); + printf("\t -- ip dscp: GREEN (%d) YELLOW (%d) RED (%d)\n", + cap.mark_ip_dscp_supported[RTE_TM_GREEN], + cap.mark_ip_dscp_supported[RTE_TM_YELLOW], + cap.mark_ip_dscp_supported[RTE_TM_RED]); + + printf(" - mask stats (0x%"PRIx64")" + " dynamic update (0x%"PRIx64")\n", + cap.stats_mask, + cap.dynamic_update_mask); + + printf(" - sched MAX:\n" + "\t -- total (%u)\n" + "\t -- sp levels (%u)\n" + "\t -- wfq children per group (%u)\n" + "\t -- wfq groups (%u)\n" + "\t -- wfq weight (%u)\n", + cap.sched_sp_n_priorities_max, + cap.sched_sp_n_priorities_max, + cap.sched_wfq_n_children_per_group_max, + cap.sched_wfq_n_groups_max, + cap.sched_wfq_weight_max); + + printf(" - CMAN support:\n" + "\t -- WRED mode: pkt (%d) byte (%d)\n" + "\t -- head drop (%d)\n", + cap.cman_wred_packet_mode_supported, + cap.cman_wred_byte_mode_supported, + cap.cman_head_drop_supported); + printf("\t -- MAX WRED CONTEXT:" + " total (%u) private (%u) shared (%u)\n", + cap.cman_wred_context_n_max, + cap.cman_wred_context_private_n_max, + cap.cman_wred_context_shared_n_max); + + for (j = 0; j < cap.n_nodes_max; j++) { + ret = rte_tm_node_capabilities_get(i, j, + &capnode, &error); + if (ret) + continue; + + printf(" NODE %u\n", j); + printf("\t - shaper private: (%d) dual rate (%d)\n", + capnode.shaper_private_supported, + capnode.shaper_private_dual_rate_supported); + printf("\t - shaper shared max: (%u)\n", + capnode.shaper_shared_n_max); + printf("\t - stats mask %"PRIx64"\n", + capnode.stats_mask); + + ret = rte_tm_node_type_get(i, j, &is_leaf, &error); + if (ret) + continue; + + if (!is_leaf) { +#define DSP_CAP_NODE_NON_LEAF(x) printf("\t -- nonleaf sched max:" \ +" children (%u) sp priorities (%u) " \ +" wfq children per group (%u) wfq groups (%u) wfq weight (%u)\n", \ +x.sched_n_children_max, x.sched_sp_n_priorities_max, \ +x.sched_wfq_n_children_per_group_max, x.sched_wfq_n_groups_max, \ +x.sched_wfq_weight_max) + DSP_CAP_NODE_NON_LEAF(capnode.nonleaf); + } else { +#define DSP_CAP_NODE_LEAF(x) printf("\t -- leaf cman support:" \ +" wred pkt mode (%d) wred byte mode (%d) head drop (%d)" \ +" wred context private (%d) wred context shared (%u)\n", \ +x.cman_wred_packet_mode_supported, x.cman_wred_byte_mode_supported, \ +x.cman_head_drop_supported, x.cman_wred_context_private_supported, \ +x.cman_wred_context_shared_n_max) + DSP_CAP_NODE_LEAF(capnode.leaf); + } + } + + for (j = 0; j < cap.n_levels_max; j++) { + ret = rte_tm_level_capabilities_get(i, j, + &caplevel, &error); + if (ret) + continue; + + printf(" - Level %u\n", j); + printf("\t -- node MAX: %u" + " non leaf %u" + " leaf %u\n", + caplevel.n_nodes_max, + caplevel.n_nodes_nonleaf_max, + caplevel.n_nodes_leaf_max); + printf("\t -- indetical:" + " non leaf %u" + " leaf %u\n", + caplevel.non_leaf_nodes_identical, + caplevel.leaf_nodes_identical); + + for (k = 0; k < caplevel.n_nodes_max; k++) { + ret = rte_tm_node_type_get(i, k, + &is_leaf, &error); + if (ret) + continue; + + if (!is_leaf) { +#define DSP_CAP_LVL_NON_LEAF(x) do { \ +printf("\t - shaper private:" \ +" (%d) dual rate (%d)\n", x.shaper_private_supported, \ +x.shaper_private_dual_rate_supported); \ +printf("\t - shaper share: (%u)\n", \ +x.shaper_shared_n_max); \ +printf("\t - non leaf sched MAX:" \ +" children (%u) sp (%u)" \ +" wfq children per group (%u)" \ +" wfq groups (%u) wfq weight (%u)\n", \ +x.sched_n_children_max, x.sched_sp_n_priorities_max, \ +x.sched_wfq_n_children_per_group_max, \ +x.sched_wfq_n_groups_max, x.sched_wfq_weight_max); \ +} while (0) + DSP_CAP_LVL_NON_LEAF(caplevel.nonleaf); + } else { +#define DSP_CAP_LVL_LEAF(x) do { \ +printf("\t - shaper private: (%d) dual rate (%d)\n", \ +x.shaper_private_supported, x.shaper_private_dual_rate_supported); \ +printf("\t - shaper share: (%u)\n", x.shaper_shared_n_max); \ +printf(" -- leaf cman support: wred pkt mode (%d)" \ +" wred byte mode (%d) head drop (%d)" \ +" wred context private (%d) wred context shared (%u)\n", \ +x.cman_wred_packet_mode_supported, x.cman_wred_byte_mode_supported, \ +x.cman_head_drop_supported, x.cman_wred_context_private_supported, \ +x.cman_wred_context_shared_n_max); \ +} while (0) + + DSP_CAP_LVL_LEAF(caplevel.leaf); + } + } + } + + for (unsigned int j = 0; j < n_leaf_nodes; j++) { + struct rte_tm_node_stats stats = {0}; + + ret = rte_tm_node_stats_read(i, j, + &stats, &cap.stats_mask, 0, &error); + if (ret) + continue; + + printf(" - STATS for node (%u)\n", j); + printf(" -- pkts (%"PRIu64") bytes (%"PRIu64")\n", + stats.n_pkts, stats.n_bytes); + + ret = rte_tm_node_type_get(i, j, &is_leaf, &error); + if ((ret) | (!is_leaf)) + continue; + + printf(" -- leaf queued:" + " pkts (%"PRIu64")" + " bytes (%"PRIu64")\n", + stats.leaf.n_pkts_queued, + stats.leaf.n_bytes_queued); + printf(" - dropped:\n" + "\t -- GREEN:" + " pkts (%"PRIu64")" + " bytes (%"PRIu64")\n" + "\t -- YELLOW:" + " pkts (%"PRIu64")" + " bytes (%"PRIu64")\n" + "\t -- RED:" + " pkts (%"PRIu64")" + " bytes (%"PRIu64")\n", + stats.leaf.n_pkts_dropped[RTE_TM_GREEN], + stats.leaf.n_bytes_dropped[RTE_TM_GREEN], + stats.leaf.n_pkts_dropped[RTE_TM_YELLOW], + stats.leaf.n_bytes_dropped[RTE_TM_YELLOW], + stats.leaf.n_pkts_dropped[RTE_TM_RED], + stats.leaf.n_bytes_dropped[RTE_TM_RED]); + } + } + + STATS_BDR_STR(50, ""); } static void From patchwork Tue Oct 23 13:57:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47249 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A09051B526; Tue, 23 Oct 2018 16:01:55 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EC9A41B50E for ; Tue, 23 Oct 2018 16:01:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934667" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:47 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:48 +0530 Message-Id: <20181023135751.21536-6-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 6/9] app/procinfo: add code for debug crypto X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Function debug_crypto is used for displaying the crypto PMD under the primary process. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 70 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 4766a5ea3..0f2045858 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -999,7 +999,75 @@ x.cman_wred_context_shared_n_max); \ static void debug_crypto(void) { - printf(" crypto"); + uint8_t crypto_dev_count = rte_cryptodev_count(), i; + + snprintf(bdr_str, 100, "debug - CRYPTO PMD %"PRIu64, rte_get_tsc_hz()); + STATS_BDR_STR(10, bdr_str); + + for (i = 0; i < crypto_dev_count; i++) { + struct rte_cryptodev_info dev_info = {0}; + struct rte_cryptodev_stats stats = {0}; + + rte_cryptodev_info_get(i, &dev_info); + + printf(" - device (%u)\n", i); + printf("\t -- name (%s) driver (%s)\n" + "\t -- id (%u) flags (0x%"PRIx64") socket (%d)\n" + "\t -- queue pairs (%d)\n", + rte_cryptodev_name_get(i), + dev_info.driver_name, dev_info.driver_id, + dev_info.feature_flags, dev_info.device->numa_node, + rte_cryptodev_queue_pair_count(i)); + +#define DSP_CRYPTO_FLAG(x) do { \ +printf(" - feature flags\n"); \ +printf("\t -- symmetric (%c) asymmetric (%c)" \ +" symmetric operation chaining (%c)\n", \ +(x & RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING)?'y':'n'); \ +printf("\t -- CPU SSE (%c) AVX (%c) AVX2 (%c) AVX512 (%c)\n", \ +(x & RTE_CRYPTODEV_FF_CPU_SSE)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_CPU_AVX)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_CPU_AVX2)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_CPU_AVX512)?'y':'n'); \ +printf("\t -- Acclerate CPU AESNI (%c) HW (%c)\n", \ +(x & RTE_CRYPTODEV_FF_CPU_AESNI)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_HW_ACCELERATED)?'y':'n'); \ +printf("\t -- INLINE (%c)\n", \ +(x & RTE_CRYPTODEV_FF_SECURITY)?'y':'n'); \ +printf("\t -- ARM NEON (%c) CE (%c)\n", \ +(x & RTE_CRYPTODEV_FF_CPU_NEON)?'y':'n', \ +(x & RTE_CRYPTODEV_FF_CPU_ARM_CE)?'y':'n'); \ +printf(" - buffer offload\n"); \ +printf("\t -- IN_PLACE_SGL (%c)\n", \ +(x & RTE_CRYPTODEV_FF_IN_PLACE_SGL)?'y':'n'); \ +printf("\t -- OOP_SGL_IN_SGL_OUT (%c)\n", \ +(x & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)?'y':'n'); \ +printf("\t -- OOP_SGL_IN_LB_OUT (%c)\n", \ +(x & RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT)?'y':'n'); \ +printf("\t -- OOP_LB_IN_SGL_OUT (%c)\n", \ +(x & RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT)?'y':'n'); \ +printf("\t -- OOP_LB_IN_LB_OUT (%c)\n", \ +(x & RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT)?'y':'n'); \ +} while (0) + + DSP_CRYPTO_FLAG(dev_info.feature_flags); + + printf(" - stats\n"); + if (rte_cryptodev_stats_get(i, &stats) == 0) { + printf("\t -- enqueue count (%"PRIu64")" + " error (%"PRIu64")\n", + stats.enqueued_count, + stats.enqueue_err_count); + printf("\t -- dequeue count (%"PRIu64")" + " error (%"PRIu64")\n", + stats.dequeued_count, + stats.dequeue_err_count); + } + } + + STATS_BDR_STR(50, ""); } static void From patchwork Tue Oct 23 13:57:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47250 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B18201B53C; Tue, 23 Oct 2018 16:01:57 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D78AA1B51D for ; Tue, 23 Oct 2018 16:01:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934691" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:50 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:49 +0530 Message-Id: <20181023135751.21536-7-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 7/9] app/procinfo: add code for debug ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Function debug_ring is used for displaying the RING of the primary process. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 0f2045858..f8b28d47f 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1073,7 +1073,34 @@ printf("\t -- OOP_LB_IN_LB_OUT (%c)\n", \ static void debug_ring(char *name) { - printf(" rings Name (%s)", name); + snprintf(bdr_str, 100, "debug - RING %"PRIu64, rte_get_tsc_hz()); + STATS_BDR_STR(10, bdr_str); + + if (name != NULL) { + struct rte_ring *ptr = rte_ring_lookup(name); + if (ptr != NULL) { + printf(" - Name (%s) Socket (%d) flags (0x%x)\n", + ptr->name, + ptr->memzone->socket_id, + ptr->flags); + printf(" - size (%u) mask (0x%x) capacity (%u)\n", + ptr->size, + ptr->mask, + ptr->capacity); + printf(" - count (%u) free count (%u)\n", + rte_ring_count(ptr), + rte_ring_free_count(ptr)); + printf(" - full (%d) empty (%d)\n", + rte_ring_full(ptr), + rte_ring_empty(ptr)); + + STATS_BDR_STR(50, ""); + return; + } + } + + rte_ring_list_dump(stdout); + STATS_BDR_STR(50, ""); } static void From patchwork Tue Oct 23 13:57:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47251 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 60DEB1B546; Tue, 23 Oct 2018 16:01:59 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2CF4D1B532 for ; Tue, 23 Oct 2018 16:01:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934722" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:53 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:50 +0530 Message-Id: <20181023135751.21536-8-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 8/9] app/procinfo: add code for debug mempool X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Function debug_mempool is used for displaying the MEMPOOL of the primary process. For valid mempool name elements are iterated for max of 256 bytes. Signed-off-by: Vipin Varghese --- app/proc-info/main.c | 47 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index f8b28d47f..764ef5731 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -33,6 +33,7 @@ #include #include #include +#include /* Maximum long option length for option parsing. */ #define MAX_LONG_OPT_SZ 64 @@ -1103,10 +1104,54 @@ debug_ring(char *name) STATS_BDR_STR(50, ""); } +static void +mempool_itr_obj(struct rte_mempool *mp, + void *opaque, void *obj, + unsigned int obj_idx) +{ + printf(" - name %s, obj_idx %u opaque %p obj %p\n", + mp->name, obj_idx, opaque, obj); + + if (obj) + rte_hexdump(stdout, " Mempool Obj Content", + obj, (mp->elt_size > 256)?256:mp->elt_size); +} + static void debug_mempool(char *name) { - printf(" mempools Name (%s)", name); + snprintf(bdr_str, 100, "debug - MEMPOOL %"PRIu64, rte_get_tsc_hz()); + STATS_BDR_STR(10, bdr_str); + + if (name != NULL) { + struct rte_mempool *ptr = rte_mempool_lookup(name); + if (ptr != NULL) { + printf(" - Name: %s on socket %d flags %u\n", + ptr->name, ptr->socket_id, ptr->flags); + printf(" - Size %u Cache %u element %u" + " header %u trailer %u " + " private data size %u\n", + ptr->size, + ptr->cache_size, + ptr->elt_size, + ptr->header_size, + ptr->trailer_size, + ptr->private_data_size); + printf(" - memezone - socket %d\n", + ptr->mz->socket_id); + + /* iterate each object */ + int ret = rte_mempool_obj_iter(ptr, + mempool_itr_obj, NULL); + printf(" - iterated %u objects\n", ret); + + STATS_BDR_STR(50, ""); + return; + } + } + + rte_mempool_list_dump(stdout); + STATS_BDR_STR(50, ""); } int From patchwork Tue Oct 23 13:57:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 47252 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 67B181B54D; Tue, 23 Oct 2018 16:02:02 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BA5341B54A for ; Tue, 23 Oct 2018 16:01:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 07:01:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,416,1534834800"; d="scan'208";a="80934754" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga008.fm.intel.com with ESMTP; 23 Oct 2018 07:01:57 -0700 From: Vipin Varghese To: dev@dpdk.org, maryam.tahhan@intel.com, reshma.pattan@intel.com Cc: amol.patel@intel.com, sivaprasad.tummala@intel.com, stephen1.byrne@intel.com, michael.j.glynn@intel.com, Vipin Varghese Date: Tue, 23 Oct 2018 19:27:51 +0530 Message-Id: <20181023135751.21536-9-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023135751.21536-1-vipin.varghese@intel.com> References: <20181023135751.21536-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v1 9/9] doc/proc_info: add information for debug options X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Document update for debug options and inforamtion for PMD instances port, traffic manager, crypto, mempool and ring isntances. Signed-off-by: Vipin Varghese --- doc/guides/tools/proc_info.rst | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/doc/guides/tools/proc_info.rst b/doc/guides/tools/proc_info.rst index d5b5ed6a6..2b06e2f86 100644 --- a/doc/guides/tools/proc_info.rst +++ b/doc/guides/tools/proc_info.rst @@ -6,9 +6,9 @@ dpdk-procinfo Application The dpdk-procinfo application is a Data Plane Development Kit (DPDK) application that runs as a DPDK secondary process and is capable of retrieving port -statistics, resetting port statistics and printing DPDK memory information. -This application extends the original functionality that was supported by -dump_cfg. +statistics, resetting port statistics, printing DPDK memory information and +debug information for port|tm|crypto|ring|mempool. This application extends the +original functionality that was supported by dump_cfg. Running the Application ----------------------- @@ -17,7 +17,8 @@ The application has a number of command line options: .. code-block:: console ./$(RTE_TARGET)/app/dpdk-procinfo -- -m | [-p PORTMASK] [--stats | --xstats | - --stats-reset | --xstats-reset] + --stats-reset | --xstats-reset --dbg-port | --dbg-tm | --dbg-crypto | + --dbg-mempool[=name] | --dbg-ring[=name]] Parameters ~~~~~~~~~~ @@ -41,6 +42,28 @@ If no port mask is specified xstats are reset for all DPDK ports. **-m**: Print DPDK memory information. +**--dbg-port** +The dbg-port parameter displays port level various configuration and +mbuf pool information associated to RX queues. + +**--dbg-tm** +The dbg-tm parameter displays per port traffic manager settings and +current configuration. It also display statistics too. + +**--dbg-crypto** +The dbg-crypto parameter displays available cryptodev configurations, +settings and stats per node. + +**--dbg-mempool[=name]** +The dbg-mempool parameter display current allocation of all mempool +with debug information. Specifying the name allows display details for +specific mempool. For invalid|no mempool name, whole list is dump. + +**--dbg-ring[=name]** +The dbg-ring pararmeter display current allocation of all ring with +debug information. Specifying the name allows to display details for specific +ring. For invalid|no ring name, whole list is dump. + Limitations -----------