From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 28 Mar 2017 08:49:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,237,1486454400"; d="scan'208";a="80236361" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga005.jf.intel.com with ESMTP; 28 Mar 2017 08:49:44 -0700 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.151]) by IRSMSX104.ger.corp.intel.com ([163.33.3.159]) with mapi id 14.03.0319.002; Tue, 28 Mar 2017 16:49:41 +0100 From: "Pattan, Reshma" To: "Horton, Remy" , "dev@dpdk.org" CC: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate statistics calculation Thread-Index: AQHSpzf7tb2jRwnFtU61ka0Ztu8wzqGqZOtg 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> In-Reply-To: <1490646097-27803-5-git-send-email-remy.horton@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGFlZGUzNDctYmFjYi00YjEwLWJiNzMtMjE4M2FkNjNkMDcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImUzUHhzU2RiSnJ6M3ZMSGk4Ykd4TWNWNWxxancrN29aSGV2ZktlUGg2RzA9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate statistics calculation 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: Tue, 28 Mar 2017 15:49:47 -0000 > -----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