[dpdk-dev] [PATCH v3] app/testpmd: print statistics periodically
De Lara Guarch, Pablo
pablo.de.lara.guarch at intel.com
Thu Jul 6 11:56:53 CEST 2017
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Thursday, July 6, 2017 12:52 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Cc: dev at dpdk.org; Wu, Jingjing <jingjing.wu at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3] app/testpmd: print statistics
> periodically
>
> 20/06/2017 10:34, De Lara Guarch, Pablo:
> > > > + if (stats_period != 0) {
> > > > + uint64_t prev_tsc = 0, cur_tsc, timer_tsc = 0;
> > > > + uint64_t timer_period;
> > > > +
> > > > + /* Convert to number of cycles */
> > > > + timer_period = stats_period * rte_get_timer_hz();
> > > > +
> > > > + while (1) {
> > > > + cur_tsc = rte_rdtsc();
> > > > + timer_tsc += 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.
>
> Waiting for v4.
Just sent it, sorry for the delay.
Pablo
More information about the dev
mailing list