DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Tan, Jianfeng" <jianfeng.tan@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: refine xstats show
Date: Wed, 18 Jan 2017 09:02:54 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D897476C9A20@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E3651117E14@SHSMSX103.ccr.corp.intel.com>

Hi Jianfeng,

> -----Original Message-----
> From: Tan, Jianfeng
> Sent: Wednesday, January 18, 2017 6:46 AM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Cc: Wu, Jingjing
> Subject: RE: [dpdk-dev] [PATCH] app/testpmd: refine xstats show
> 
> Hi Pablo,
> 
> > -----Original Message-----
> > From: De Lara Guarch, Pablo
> > Sent: Wednesday, January 18, 2017 12:04 AM
> > To: Tan, Jianfeng; dev@dpdk.org
> > Cc: Wu, Jingjing; Tan, Jianfeng
> > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: refine xstats show
> >
> > Hi Jianfeng,
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jianfeng Tan
> > > Sent: Wednesday, December 21, 2016 9:10 AM
> > > To: dev@dpdk.org
> > > Cc: Wu, Jingjing; Tan, Jianfeng
> > > Subject: [dpdk-dev] [PATCH] app/testpmd: refine xstats show
> > >
> > > 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
> >
> > I think this is a good idea, but I would give the user the option to do this,
> as
> > sometimes it is useful to actually show statistics with value 0.
> 
> Make sense.
> 
> > Could you extend the show port xstats command to accept a new
> parameter
> > instead?
> 
> OK.
> 
> > It would be nice to have something loke show port xstats all hide-zeros,
> > maybe?
> 
> How about "nz" for non-zero?

I would prefer the full name. If you want nonzero, that's ok for me, but there is
no need to make it shorter and not readable enough (I wouldn't know what nz is).

Thanks,
Pablo


> 
> Thanks,
> Jianfeng
> 
> >
> > Thanks,
> > Pablo

  reply	other threads:[~2017-01-18  9:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-21  9:09 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 [this message]
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=E115CCD9D858EF4F90C690B0DCB4D897476C9A20@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --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).