From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 108271C0B for ; Thu, 6 Jul 2017 12:00:10 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2017 03:00:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,316,1496127600"; d="scan'208";a="123057709" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga005.fm.intel.com with ESMTP; 06 Jul 2017 03:00:09 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.133]) by IRSMSX102.ger.corp.intel.com ([169.254.2.211]) with mapi id 14.03.0319.002; Thu, 6 Jul 2017 10:56:54 +0100 From: "De Lara Guarch, Pablo" To: Thomas Monjalon CC: "dev@dpdk.org" , "Wu, Jingjing" Thread-Topic: [dpdk-dev] [PATCH v3] app/testpmd: print statistics periodically Thread-Index: AQHS5byCuL4GxorJnUmshKidCG0A5KIsp/cAgADMV4CAGILAAIAAucgg Date: Thu, 6 Jul 2017 09:56:53 +0000 Message-ID: References: <20170609014656.27396-1-pablo.de.lara.guarch@intel.com> <9249424.xGZGaBmtM9@xps> <2035419.FSHShSjrGD@xps> In-Reply-To: <2035419.FSHShSjrGD@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action 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 v3] app/testpmd: print statistics periodically 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: Thu, 06 Jul 2017 10:00:11 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Thursday, July 6, 2017 12:52 AM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org; Wu, Jingjing > Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: print statistics > periodically >=20 > 20/06/2017 10:34, De Lara Guarch, Pablo: > > > > + if (stats_period !=3D 0) { > > > > + uint64_t prev_tsc =3D 0, cur_tsc, timer_tsc =3D 0; > > > > + uint64_t timer_period; > > > > + > > > > + /* Convert to number of cycles */ > > > > + timer_period =3D stats_period * rte_get_timer_hz(); > > > > + > > > > + while (1) { > > > > + cur_tsc =3D rte_rdtsc(); > > > > + timer_tsc +=3D cur_tsc - prev_tsc; > > > > > > Please forget (Intel) TSC wording and prefer the more generic > > > rte_get_timer_cycles() function. > > > > Good point, will fix in the v4. >=20 > Waiting for v4. Just sent it, sorry for the delay. Pablo