summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/virtio.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-11-08 17:41:06 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-11-14 17:54:51 +0000
commitf41244f423a44c6d295895b011eec4bbeef08a8d (patch)
tree6e88a44f43d1970bc1f11b5c5cbbb9d8f6ece376 /src/vnet/devices/virtio/virtio.c
parentaa27dcb84cb312277370b77370a69b2a3596c4c5 (diff)
virtio: refactor virtio-pci logging
Type: refactor Change-Id: I34306c1206b2bf5f521be6c6b78074ccf9259a08 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio.c')
-rw-r--r--src/vnet/devices/virtio/virtio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c
index 90adf97dc3c..da4f755ec10 100644
--- a/src/vnet/devices/virtio/virtio.c
+++ b/src/vnet/devices/virtio/virtio.c
@@ -474,6 +474,20 @@ virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type)
}
+static clib_error_t *
+virtio_init (vlib_main_t * vm)
+{
+ virtio_main_t *vim = &virtio_main;
+ clib_error_t *error = 0;
+
+ vim->log_default = vlib_log_register_class ("virtio", 0);
+ vlib_log_debug (vim->log_default, "initialized");
+
+ return error;
+}
+
+VLIB_INIT_FUNCTION (virtio_init);
+
/*
* fd.io coding-style-patch-verification: ON
*