> -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Remy Horton > Sent: Monday, March 27, 2017 9:22 PM > To: dev@dpdk.org > Cc: Thomas Monjalon <thomas.monja...@6wind.com> > Subject: [dpdk-dev] [PATCH v12 4/6] app/test-pmd: add bitrate statistics > calculation > > --- > app/test-pmd/testpmd.c | 41 > ++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 40 insertions(+), 1 deletion(-) > > 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 > The above lines and below lines can be combined in one ifdef, endif
> +#ifdef RTE_LIBRTE_BITRATE > + cnt_ports = rte_eth_dev_count(); > + tics_datum = rte_rdtsc(); > + tics_per_1sec = rte_get_timer_hz(); > +#endif