summaryrefslogtreecommitdiffstats
path: root/src/vnet/dev/format.c
diff options
context:
space:
mode:
authorMonendra Singh Kushwaha <kmonendra@marvell.com>2024-02-06 14:02:43 +0530
committerDamjan Marion <dmarion@0xa5.net>2024-02-27 15:37:20 +0000
commit4af3fdfdd0a0c2993c80eda6faef6a782111277c (patch)
tree7d19c7694465da3000efa86f95352fedd1658975 /src/vnet/dev/format.c
parent4e32bc6b6d4dcbaaca67f4e90d9e0cdfea73e344 (diff)
dev: add per-port vnet flow
Type: feature Change-Id: If63f39211288ab2eba8bc1ab50a2a4c7755abc66 Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
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;
+}