X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdevices%2Fvirtio%2Fvirtio.h;h=3e8f94164831da003d0570fdca875cd0f3b1de95;hb=206acf84d6a04590e385f427edba1094c3bdf195;hp=2cf1653d1c2f746399ca2e7acfcbc3f5d54f31d4;hpb=f41244f423a44c6d295895b011eec4bbeef08a8d;p=vpp.git diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h index 2cf1653d1c2..3e8f9416483 100644 --- a/src/vnet/devices/virtio/virtio.h +++ b/src/vnet/devices/virtio/virtio.h @@ -80,11 +80,17 @@ typedef enum #define TX_QUEUE_ACCESS(X) (X/2) #define RX_QUEUE_ACCESS(X) (X/2) +#define foreach_virtio_if_types \ + _ (TAP, 1) \ + _ (TUN, 2) \ + _ (PCI, 3) + typedef enum { - VIRTIO_IF_TYPE_TAP = 1, - VIRTIO_IF_TYPE_PCI, - VIRTIO_IF_N_TYPES, +#define _(a, b) VIRTIO_IF_TYPE_##a = (1 << b), + foreach_virtio_if_types +#undef _ + VIRTIO_IF_N_TYPES = (1 << 4), } virtio_if_type_t; @@ -112,6 +118,7 @@ typedef struct u8 buffer_pool_index; u16 size; u16 queue_id; +#define VRING_TX_OUT_OF_ORDER 1 u16 flags; u32 call_file_index; u32 *buffers; @@ -148,16 +155,10 @@ typedef struct pci_addr_t pci_addr; }; u32 per_interface_next_index; - union - { - int fd; - u32 msix_enabled; - }; - union - { - int tap_fd; - u32 pci_dev_handle; - }; + int *vhost_fds; + int tap_fd; + u32 msix_enabled; + u32 pci_dev_handle; virtio_vring_t *rxq_vrings; virtio_vring_t *txq_vrings; u64 features, remote_features; @@ -180,6 +181,7 @@ typedef struct u8 host_ip6_prefix_len; u32 host_mtu_size; int gso_enabled; + int csum_offload_enabled; int ifindex; virtio_vring_t *cxq_vring; } virtio_if_t;