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 6CF70F610 for ; Wed, 18 Jan 2017 10:07:59 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 18 Jan 2017 01:07:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,248,1477983600"; d="scan'208";a="810267988" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 18 Jan 2017 01:07:58 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Jan 2017 01:07:58 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 18 Jan 2017 01:07:57 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Wed, 18 Jan 2017 17:07:55 +0800 From: "Tan, Jianfeng" To: "De Lara Guarch, Pablo" , "dev@dpdk.org" CC: "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: refine xstats show Thread-Index: AQHSW2nowFH9/9VMJU63AWb7IR0N66E8ecQAgAF6ZJD//6I2AIAAh1kA Date: Wed, 18 Jan 2017 09:07:55 +0000 Message-ID: References: <1482311376-38091-1-git-send-email-jianfeng.tan@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: refine xstats show 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: Wed, 18 Jan 2017 09:08:00 -0000 > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, January 18, 2017 5:03 PM > To: Tan, Jianfeng; dev@dpdk.org > Cc: Wu, Jingjing > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: refine xstats show >=20 > Hi Jianfeng, >=20 > > -----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 outpu= t > > > > 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 va= lue > > > > of zero. > > > > > > > > Signed-off-by: Jianfeng Tan > > > > --- > > > > 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 =3D 0; idx_xstat < cnt_xstats; idx_xstat++) > > > > + for (idx_xstat =3D 0; idx_xstat < cnt_xstats; idx_xstat++) { > > > > + if ((xstats[idx_xstat].value) =3D=3D 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-zer= os, > > > maybe? > > > > How about "nz" for non-zero? >=20 > 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). Make sense. Will send out patch soon. Thanks, Jianfeng >=20 > Thanks, > Pablo >=20 >=20 > > > > Thanks, > > Jianfeng > > > > > > > > Thanks, > > > Pablo