On 29/08/2016 11:01, Pattan, Reshma wrote: [..] >> @@ -1506,6 +1508,19 @@ rte_eth_stats_reset(uint8_t port_id) [..] >> + /* Clear device running stat counts */ >> + dev_stats = &dev->data->stats; >> + memset(dev_stats->list_ibuckets, 0, >> + sizeof(uint64_t) * dev_stats->cnt_buckets); >> + memset(dev_stats->list_obuckets, 0, >> + sizeof(uint64_t) * dev_stats->cnt_buckets); >> + dev_stats->last_ibytes = 0; >> + dev_stats->last_obytes = 0; >> + dev_stats->peak_ibytes = 0; >> + dev_stats->peak_obytes = 0; >> + dev_stats->total_ibytes = 0; >> + dev_stats->total_obytes = 0;
> Should the resetting has to be done inside rte_eth_xstats_reset() instead of > rte_eth_stats_reset()? The bit-rate metrics are calculated from rte_eth_stats values rather than xstats values, which is why I put the reset here rather than in rte_eth_xstats_reset(). However this ought to be a moot point. I think it is a bug that rte_eth_xstats_reset() only calls rte_eth_stats_reset() if the driver doesn't implement xstats_reset, as the xstats output includes all the rte_eth_stats values unconditonally.