summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_format.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-04-28 12:29:15 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-05-02 16:34:32 +0000
commit4403690cda44134af3b9ea78d33a5cbf78a5acc9 (patch)
tree14d79f4342d1ec0ee993db2bacdd0eb9abcc2c63 /src/vnet/interface_format.c
parentc12311b86fb27114cdd3fa4ad9a5897a98448184 (diff)
Add interface rx mode commands, unify rx mode and placement CLI
Change-Id: Ib506c3e9d66170f29e3266ad6dc4d32b829befba Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface_format.c')
-rw-r--r--src/vnet/interface_format.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vnet/interface_format.c b/src/vnet/interface_format.c
index b961c778d2c..03caf5c6dd7 100644
--- a/src/vnet/interface_format.c
+++ b/src/vnet/interface_format.c
@@ -59,6 +59,23 @@ format_vnet_sw_interface_flags (u8 * s, va_list * args)
}
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 *);