From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: , X-List-Received-Date: Tue, 23 Oct 2018 14:01:44 -0000 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*/ -- 2.17.1