Checks
Commit Message
Reset the total RX/TX pkts/bytes statistics as well when
user issues a clear command.
Signed-off-by: Tran Bao Long <tranbaolong@niometrics.com>
---
app/pktgen-cmds.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -2432,6 +2432,8 @@ pktgen_clear_stats(port_info_t *info)
memset(&info->sizes, 0, sizeof(port_sizes_t));
memset(&info->prev_stats, 0, sizeof(eth_stats_t));
memset(&info->rate_stats, 0, sizeof(eth_stats_t));
+ memset(&info->curr_stats, 0, sizeof(eth_stats_t));
+ rte_eth_stats_reset(info->pid);
rte_eth_stats_get(info->pid, &info->prev_stats);
pktgen.max_total_ipackets = 0;