From bf5049a3b21ea0f40b9efa428df4d0098d39a963 Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Thu, 20 Jun 2019 23:53:43 +0000 Subject: avf: fix clear hw stats AVF plugin is missing a handler for clearing stats. This patch will implement it. Ticket: VPP-1701 Type: fix Change-Id: If4b4354da442065896bb001deda23f64ddc18fb4 Signed-off-by: Filip Tehlar --- src/plugins/avf/format.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/avf/format.c') diff --git a/src/plugins/avf/format.c b/src/plugins/avf/format.c index 4c391a80760..4def8b5ea32 100644 --- a/src/plugins/avf/format.c +++ b/src/plugins/avf/format.c @@ -107,9 +107,10 @@ format_avf_device (u8 * s, va_list * args) s = format (s, "\n%Uerror %U", format_white_space, indent, format_clib_error, ad->error); -#define _(c) if (ad->eth_stats.c) \ +#define _(c) if (ad->eth_stats.c - ad->last_cleared_eth_stats.c) \ a = format (a, "\n%U%-20U %u", format_white_space, indent + 2, \ - format_c_identifier, #c, ad->eth_stats.c); + format_c_identifier, #c, \ + ad->eth_stats.c - ad->last_cleared_eth_stats.c); foreach_virtchnl_eth_stats; #undef _ if (a) -- cgit 1.2.3-korg