From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pattan, Reshma" Subject: Re: [PATCH v12 4/6] app/test-pmd: add bitrate statistics calculation Date: Tue, 28 Mar 2017 15:49:41 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F0112E818@irsmsx110.ger.corp.intel.com> References: <1490646097-27803-1-git-send-email-remy.horton@intel.com> <1490646097-27803-5-git-send-email-remy.horton@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon To: "Horton, Remy" , "dev@dpdk.org" Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A1AB828F3 for ; Tue, 28 Mar 2017 17:49:46 +0200 (CEST) In-Reply-To: <1490646097-27803-5-git-send-email-remy.horton@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Remy Horton > Sent: Monday, March 27, 2017 9:22 PM > To: dev@dpdk.org > Cc: Thomas Monjalon > Subject: [dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate statistics > calculation >=20 > --- > app/test-pmd/testpmd.c | 41 > ++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 40 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > e04e215..72a7181 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1,7 +1,7 @@ > +#ifdef RTE_LIBRTE_BITRATE > + uint64_t tics_per_1sec; > + uint64_t tics_datum; > + uint64_t tics_current; > + uint8_t idx_port, cnt_ports; > +#endif >=20 The above lines and below lines can be combined in one ifdef, endif > +#ifdef RTE_LIBRTE_BITRATE > + cnt_ports =3D rte_eth_dev_count(); > + tics_datum =3D rte_rdtsc(); > + tics_per_1sec =3D rte_get_timer_hz(); > +#endif