virtio: add the display information in virtio cli
Type: fix
1. Add option '[gso-enabled]' in cli 'create interface virtio'
2. Add gso information in virtio_show()
Change-Id: I4eb58f4421325ef54a6a68c8341b3a6d3d68136a
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
diff --git a/src/vnet/devices/virtio/cli.c b/src/vnet/devices/virtio/cli.c
index 86639e4..dbc2ad2 100644
--- a/src/vnet/devices/virtio/cli.c
+++ b/src/vnet/devices/virtio/cli.c
@@ -59,7 +59,7 @@
VLIB_CLI_COMMAND (virtio_pci_create_command, static) = {
.path = "create interface virtio",
.short_help = "create interface virtio <pci-address> "
- "[feature-mask <hex-mask>]",
+ "[feature-mask <hex-mask>] [gso-enabled]",
.function = virtio_pci_create_command_fn,
};
/* *INDENT-ON* */
diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c
index 9e2067b..90adf97 100644
--- a/src/vnet/devices/virtio/virtio.c
+++ b/src/vnet/devices/virtio/virtio.c
@@ -322,8 +322,8 @@
vif->host_mtu_size);
vlib_cli_output (vm, " fd %d", vif->fd);
vlib_cli_output (vm, " tap-fd %d", vif->tap_fd);
- vlib_cli_output (vm, " gso-enabled %d", vif->gso_enabled);
}
+ vlib_cli_output (vm, " gso-enabled %d", vif->gso_enabled);
vlib_cli_output (vm, " Mac Address: %U", format_ethernet_address,
vif->mac_addr);
vlib_cli_output (vm, " Device instance: %u", vif->dev_instance);