[dpdk-dev] [PATCH v2 2/9] app/procinfo: add compare for new options

Vipin Varghese vipin.varghese at intel.com
Wed Oct 24 08:47:58 CEST 2018


Add code for new debug options to compare usage strings and set
enable flag.

Signed-off-by: Vipin Varghese <vipin.varghese at intel.com>
---
 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 b62b314b2..0da148c8c 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,
+					"show-port", MAX_LONG_OPT_SZ))
+				enable_dbg_port = 1;
+			else if (!strncmp(long_option[option_index].name,
+					"show-tm", MAX_LONG_OPT_SZ))
+				enable_dbg_tm = 1;
+			else if (!strncmp(long_option[option_index].name,
+					"show-crypto", MAX_LONG_OPT_SZ))
+				enable_dbg_crypto = 1;
+			else if (!strncmp(long_option[option_index].name,
+					"show-ring", MAX_LONG_OPT_SZ)) {
+				enable_dbg_ring = 1;
+				ring_name = optarg;
+			} else if (!strncmp(long_option[option_index].name,
+					"show-mempool", MAX_LONG_OPT_SZ)) {
+				enable_dbg_mempool = 1;
+				mempool_name = optarg;
+			}
 			break;
 		case 1:
 			/* Print xstat single value given by name*/
-- 
2.17.1



More information about the dev mailing list