aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/virtio/format.c')
-rw-r--r--src/vnet/devices/virtio/format.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/format.c b/src/vnet/devices/virtio/format.c
index 729635de35b..fe46d92cba9 100644
--- a/src/vnet/devices/virtio/format.c
+++ b/src/vnet/devices/virtio/format.c
@@ -36,6 +36,8 @@ format_virtio_device_name (u8 * s, va_list * args)
s = format (s, "virtio-%x/%x/%x/%x", vif->pci_addr.domain,
vif->pci_addr.bus, vif->pci_addr.slot,
vif->pci_addr.function);
+ else if (vif->type == VIRTIO_IF_TYPE_TUN)
+ s = format (s, "tun%u", vif->id);
else
s = format (s, "virtio-%lu", vif->dev_instance);
@@ -49,6 +51,8 @@ format_virtio_log_name (u8 * s, va_list * args)
if (vif->type == VIRTIO_IF_TYPE_TAP)
s = format (s, "tap%u", vif->id);
+ else if (vif->type == VIRTIO_IF_TYPE_TUN)
+ s = format (s, "tun%u", vif->id);
else if (vif->type == VIRTIO_IF_TYPE_PCI)
s = format (s, "%U", format_vlib_pci_addr, &vif->pci_addr);
else