Add interface rx mode commands, unify rx mode and placement CLI
Change-Id: Ib506c3e9d66170f29e3266ad6dc4d32b829befba
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/interface_format.c b/src/vnet/interface_format.c
index b961c77..03caf5c 100644
--- a/src/vnet/interface_format.c
+++ b/src/vnet/interface_format.c
@@ -59,6 +59,23 @@
}
u8 *
+format_vnet_hw_interface_rx_mode (u8 * s, va_list * args)
+{
+ vnet_hw_interface_rx_mode mode = va_arg (*args, vnet_hw_interface_rx_mode);
+
+ if (mode == VNET_HW_INTERFACE_RX_MODE_POLLING)
+ return format (s, "polling");
+
+ if (mode == VNET_HW_INTERFACE_RX_MODE_INTERRUPT)
+ return format (s, "interrupt");
+
+ if (mode == VNET_HW_INTERFACE_RX_MODE_ADAPTIVE)
+ return format (s, "adaptive");
+
+ return format (s, "unknown");
+}
+
+u8 *
format_vnet_hw_interface (u8 * s, va_list * args)
{
vnet_main_t *vnm = va_arg (*args, vnet_main_t *);