aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/virtio/virtio.h')
-rw-r--r--src/vnet/devices/virtio/virtio.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h
index b57c6ebd77d..e1ba71dae2e 100644
--- a/src/vnet/devices/virtio/virtio.h
+++ b/src/vnet/devices/virtio/virtio.h
@@ -70,9 +70,6 @@ typedef enum
#undef _
} virtio_if_flag_t;
-#define VIRTIO_NUM_RX_DESC 256
-#define VIRTIO_NUM_TX_DESC 256
-
#define VIRTIO_FEATURE(X) (1ULL << X)
#define TX_QUEUE(X) ((X*2) + 1)
@@ -80,6 +77,9 @@ typedef enum
#define TX_QUEUE_ACCESS(X) (X/2)
#define RX_QUEUE_ACCESS(X) (X/2)
+#define VIRTIO_NUM_RX_DESC 256
+#define VIRTIO_NUM_TX_DESC 256
+
#define foreach_virtio_if_types \
_ (TAP, 0) \
_ (TUN, 1) \
@@ -93,15 +93,6 @@ typedef enum
VIRTIO_IF_N_TYPES = (1 << 3),
} virtio_if_type_t;
-
-typedef struct
-{
- u8 mac[6];
- u16 status;
- u16 max_virtqueue_pairs;
- u16 mtu;
-} virtio_net_config_t;
-
#define VIRTIO_RING_FLAG_MASK_INT 1
typedef struct
@@ -139,6 +130,8 @@ typedef union
u32 as_u32;
} pci_addr_t;
+typedef struct _virtio_pci_func virtio_pci_func_t;
+
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -197,6 +190,7 @@ typedef struct
u32 tap_flags;
int ifindex;
virtio_vring_t *cxq_vring;
+ const virtio_pci_func_t *virtio_pci_func;
} virtio_if_t;
typedef struct
@@ -245,7 +239,6 @@ virtio_kick (vlib_main_t * vm, virtio_vring_t * vring, virtio_if_t * vif)
}
}
-
#define virtio_log_debug(vif, f, ...) \
{ \
vlib_log(VLIB_LOG_LEVEL_DEBUG, virtio_main.log_default, \