From: Jianfeng Tan <jianfeng.tan@intel.com>
To: dev@dpdk.org
Cc: jingjing.wu@intel.com, Jianfeng Tan <jianfeng.tan@intel.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: refine xstats show
Date: Wed, 21 Dec 2016 09:09:36 +0000 [thread overview]
Message-ID: <1482311376-38091-1-git-send-email-jianfeng.tan@intel.com> (raw)
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
next reply other threads:[~2016-12-21 9:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 9:09 Jianfeng Tan [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482311376-38091-1-git-send-email-jianfeng.tan@intel.com \
--to=jianfeng.tan@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).