[dpdk-dev] [RFC PATCH v2 2/3] lib: add bitrate statistics library

2016-11-01 Thread Remy Horton
On 28/10/2016 15:39, Morten Br?rup wrote: > Comments below. [..] > When working with statistical calculations using integer arithmetic, > you should round off the integer result by adding 0.5 to the result, > which you do by adding half of the divisor to the dividend, like > this: > > delta = (del

[dpdk-dev] [RFC PATCH v2 2/3] lib: add bitrate statistics library

2016-10-28 Thread Remy Horton
On 28/10/2016 09:12, Stephen Hemminger wrote: > On Fri, 28 Oct 2016 09:04:30 +0800 > Remy Horton wrote: > >> + >> +struct rte_stats_bitrate_s { >> +uint64_t last_ibytes; >> +uint64_t last_obytes; >> +uint64_t peak_ibits; >> +uint64_t peak_obits; >> +uint64_t ewma_ibits; >> +

[dpdk-dev] [RFC PATCH v2 2/3] lib: add bitrate statistics library

2016-10-28 Thread Morten Brørup
Comments below. > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Remy Horton > Sent: Friday, October 28, 2016 3:05 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [RFC PATCH v2 2/3] lib: add bitrate statistics > library > > This p

[dpdk-dev] [RFC PATCH v2 2/3] lib: add bitrate statistics library

2016-10-28 Thread Remy Horton
This patch adds a library that calculates peak and average data-rate statistics. For ethernet devices. These statistics are reported using the metrics library. Signed-off-by: Remy Horton --- config/common_base | 5 + doc/api/doxy-api-index.md

[dpdk-dev] [RFC PATCH v2 2/3] lib: add bitrate statistics library

2016-10-27 Thread Stephen Hemminger
On Fri, 28 Oct 2016 09:04:30 +0800 Remy Horton wrote: > + > +struct rte_stats_bitrate_s { > + uint64_t last_ibytes; > + uint64_t last_obytes; > + uint64_t peak_ibits; > + uint64_t peak_obits; > + uint64_t ewma_ibits; > + uint64_t ewma_obits; > +}; > + Reader/write access