summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/virtio/pci.h')
-rw-r--r--src/vnet/devices/virtio/pci.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/pci.h b/src/vnet/devices/virtio/pci.h
index 7552dd89ac2..b08e40e7e61 100644
--- a/src/vnet/devices/virtio/pci.h
+++ b/src/vnet/devices/virtio/pci.h
@@ -120,6 +120,27 @@ typedef enum
#define VIRTIO_PCI_VRING_ALIGN 4096
+#define virtio_log_debug(vim, vif, f, ...) \
+{ \
+ vlib_log(VLIB_LOG_LEVEL_DEBUG, vim->log_default, "%U: " f, \
+ format_vlib_pci_addr, &vif->pci_addr, \
+ ##__VA_ARGS__); \
+};
+
+#define virtio_log_warning(vim, vif, f, ...) \
+{ \
+ vlib_log(VLIB_LOG_LEVEL_WARNING, vim->log_default, "%U: " f, \
+ format_vlib_pci_addr, &vif->pci_addr, \
+ ##__VA_ARGS__); \
+};
+
+#define virtio_log_error(vim, vif, f, ...) \
+{ \
+ vlib_log(VLIB_LOG_LEVEL_ERR, vim->log_default, "%U: " f, \
+ format_vlib_pci_addr, &vif->pci_addr, \
+ ##__VA_ARGS__); \
+};
+
typedef enum
{
VIRTIO_MSIX_NONE = 0,