DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: refine xstats show
@ 2016-12-21  9:09 Jianfeng Tan
  2017-01-17 16:04 ` De Lara Guarch, Pablo
  2017-10-20 17:09 ` Elza Mathew
  0 siblings, 2 replies; 10+ messages in thread
From: Jianfeng Tan @ 2016-12-21  9:09 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, Jianfeng Tan

When using "show port xstats all" command to show xstats, the output
is usually too long to obtain what you really want, expecially when
multi-queue is enabled.

This patch refines this situation by skipping showing those with value
of zero.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 app/test-pmd/config.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 36c47ab..1adef29 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -304,10 +304,13 @@ nic_xstats_display(portid_t port_id)
 	}
 
 	/* Display xstats */
-	for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++)
+	for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++) {
+		if ((xstats[idx_xstat].value) == 0)
+			continue;
 		printf("%s: %"PRIu64"\n",
 			xstats_names[idx_xstat].name,
 			xstats[idx_xstat].value);
+	}
 	free(xstats_names);
 	free(xstats);
 }
-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-10-24 21:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21  9:09 [dpdk-dev] [PATCH] app/testpmd: refine xstats show Jianfeng Tan
2017-01-17 16:04 ` De Lara Guarch, Pablo
2017-01-18  6:46   ` Tan, Jianfeng
2017-01-18  9:02     ` De Lara Guarch, Pablo
2017-01-18  9:07       ` Tan, Jianfeng
2017-02-08 16:30         ` Thomas Monjalon
2017-04-30 16:00           ` Thomas Monjalon
2017-10-20 17:09 ` Elza Mathew
2017-10-23 23:47   ` Ferruh Yigit
2017-10-24 21:46     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).