aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/avf/format.c')
-rw-r--r--src/plugins/avf/format.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/avf/format.c b/src/plugins/avf/format.c
index 26157804c77..0a153a093d9 100644
--- a/src/plugins/avf/format.c
+++ b/src/plugins/avf/format.c
@@ -239,3 +239,22 @@ format_avf_vlan_caps (u8 *s, va_list *args)
vc->offloads.ethertype_match);
return s;
}
+
+u8 *
+format_avf_eth_stats (u8 *s, va_list *args)
+{
+ virtchnl_eth_stats_t *es = va_arg (*args, virtchnl_eth_stats_t *);
+ u32 indent = format_get_indent (s);
+ u8 *v = 0;
+
+#define _(st) \
+ if (v) \
+ v = format (v, "\n%U", format_white_space, indent); \
+ v = format (v, "%-20s = %lu", #st, es->st);
+ foreach_virtchnl_eth_stats
+#undef _
+
+ s = format (s, "%v", v);
+ vec_free (v);
+ return s;
+}