From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 452641B431 for ; Mon, 3 Dec 2018 06:53:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Dec 2018 21:53:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,309,1539673200"; d="scan'208";a="280400271" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by orsmga005.jf.intel.com with ESMTP; 02 Dec 2018 21:53:34 -0800 From: Vipin Varghese To: konstantin.ananyev@intel.com, stephen@networkplumber.org, reshma.pattan@intel.com, dev@dpdk.org, john.mcnamara@intel.com Cc: thomas@monjalon.net, stephen1.byrne@intel.com, amol.patel@intel.com, Vipin Varghese Date: Mon, 3 Dec 2018 11:19:53 +0530 Message-Id: <20181203055000.39012-3-vipin.varghese@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181203055000.39012-1-vipin.varghese@intel.com> References: <20181122141543.37067-1-vipin.varghese@intel.com> <20181203055000.39012-1-vipin.varghese@intel.com> Subject: [dpdk-dev] [PATCH v6 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: Mon, 03 Dec 2018 05:53:37 -0000 Add code for new debug options to compare usage strings and set enable flag. Signed-off-by: Vipin Varghese --- V6: - check for iter mempool - Vipin Varghese V3: - variables from debug to show - Vipin Varghese V2: - compare string from dbg to show - Stephen Hemminger --- app/proc-info/main.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index c034aad97..bda7e9af8 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -63,6 +63,21 @@ static uint32_t mem_info; /**< Enable displaying xstat name. */ static uint32_t enable_xstats_name; static char *xstats_name; +/**< Enable show port. */ +static uint32_t enable_shw_port; +/**< Enable show tm. */ +static uint32_t enable_shw_tm; +/**< Enable show crypto. */ +static uint32_t enable_shw_crypto; +/**< Enable show ring. */ +static uint32_t enable_shw_ring; +static char *ring_name; +/**< Enable show mempool. */ +static uint32_t enable_shw_mempool; +static char *mempool_name; +/**< Enable iter mempool. */ +static uint32_t enable_iter_mempool; +static char *mempool_iter_name; /**< Enable xstats by ids. */ #define MAX_NB_XSTATS_IDS 1024 @@ -249,6 +264,29 @@ 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_shw_port = 1; + else if (!strncmp(long_option[option_index].name, + "show-tm", MAX_LONG_OPT_SZ)) + enable_shw_tm = 1; + else if (!strncmp(long_option[option_index].name, + "show-crypto", MAX_LONG_OPT_SZ)) + enable_shw_crypto = 1; + else if (!strncmp(long_option[option_index].name, + "show-ring", MAX_LONG_OPT_SZ)) { + enable_shw_ring = 1; + ring_name = optarg; + } else if (!strncmp(long_option[option_index].name, + "show-mempool", MAX_LONG_OPT_SZ)) { + enable_shw_mempool = 1; + mempool_name = optarg; + } else if (!strncmp(long_option[option_index].name, + "iter-mempool", MAX_LONG_OPT_SZ)) { + enable_iter_mempool = 1; + mempool_iter_name = optarg; + } + break; case 1: /* Print xstat single value given by name*/ -- 2.17.1