From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EF19A58CD for ; Wed, 18 Jan 2017 10:02:56 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 18 Jan 2017 01:02:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,248,1477983600"; d="scan'208";a="214703045" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga004.fm.intel.com with ESMTP; 18 Jan 2017 01:02:55 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.173]) by IRSMSX107.ger.corp.intel.com ([169.254.10.3]) with mapi id 14.03.0248.002; Wed, 18 Jan 2017 09:02:54 +0000 From: "De Lara Guarch, Pablo" To: "Tan, Jianfeng" , "dev@dpdk.org" CC: "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: refine xstats show Thread-Index: AQHSW2n+LL/IqgCwCE6lxH11zvSrQ6E8+I+wgAD9r4CAACJSYA== Date: Wed, 18 Jan 2017 09:02:54 +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-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTVkZjBmZDktZTY2MS00YmRjLThiZWYtZTJjYTk4MmFiYmJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ijh4aWk0cTZ5dHIrUTZwXC8yT3dTeEI4NGhTZ09BTkcrWmZEVGNXZEhmS2RzPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] 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:02:57 -0000 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 >=20 > Hi Pablo, >=20 > > -----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 valu= e > > > 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. >=20 > Make sense. >=20 > > Could you extend the show port xstats command to accept a new > parameter > > instead? >=20 > OK. >=20 > > It would be nice to have something loke show port xstats all hide-zeros= , > > maybe? >=20 > How about "nz" for non-zero? I would prefer the full name. If you want nonzero, that's ok for me, but th= ere is no need to make it shorter and not readable enough (I wouldn't know what nz= is). Thanks, Pablo >=20 > Thanks, > Jianfeng >=20 > > > > Thanks, > > Pablo