summaryrefslogtreecommitdiffstats
path: root/src/vnet/dev/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/dev/format.c')
-rw-r--r--src/vnet/dev/format.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnet/dev/format.c b/src/vnet/dev/format.c
index 848cd13a6c3..ed83a0eba95 100644
--- a/src/vnet/dev/format.c
+++ b/src/vnet/dev/format.c
@@ -490,3 +490,18 @@ format_vnet_dev_port_tx_offloads (u8 *s, va_list *args)
return s;
}
+
+u8 *
+format_vnet_dev_flow (u8 *s, va_list *args)
+{
+ u32 dev_instance = va_arg (*args, u32);
+ u32 flow_index = va_arg (*args, u32);
+ uword private_data = va_arg (*args, uword);
+ vnet_dev_port_t *port = vnet_dev_get_port_from_dev_instance (dev_instance);
+
+ if (port->port_ops.format_flow)
+ s = format (s, "%U", port->port_ops.format_flow, port, flow_index,
+ private_data);
+
+ return s;
+}