diff options
Diffstat (limited to 'src/plugins/dpdk/device/format.c')
-rw-r--r-- | src/plugins/dpdk/device/format.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index 3b75563d0b5..0b67eae3c45 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -377,6 +377,20 @@ format_dpdk_tx_offload_caps (u8 * s, va_list * args) #undef _ u8 * +format_dpdk_device_errors (u8 * s, va_list * args) +{ + dpdk_device_t *xd = va_arg (*args, dpdk_device_t *); + clib_error_t *e; + uword indent = format_get_indent (s); + + vec_foreach (e, xd->errors) + { + s = format (s, "%U%v\n", format_white_space, indent, e->what); + } + return s; +} + +u8 * format_dpdk_device (u8 * s, va_list * args) { u32 dev_instance = va_arg (*args, u32); @@ -511,6 +525,12 @@ format_dpdk_device (u8 * s, va_list * args) vec_free (xs); } + if (vec_len (xd->errors)) + { + s = format (s, "%UErrors:\n %U", format_white_space, indent, + format_dpdk_device_errors, xd); + } + return s; } |