#define VIRTIO_DEV_BUILTIN_VIRTIO_NET 4
/* Used to indicate that the device has its own data path and configured */
#define VIRTIO_DEV_VDPA_CONFIGURED 8
+/* Used to indicate that the feature negotiation failed */
+#define VIRTIO_DEV_FEATURES_FAILED 16
/* Backend value set by guest. */
#define VIRTIO_DEV_STOPPED -1
#define MAX_PKT_BURST 32
+#define ASYNC_MAX_POLL_SEG 255
+
#define VHOST_MAX_ASYNC_IT (MAX_PKT_BURST * 2)
#define VHOST_MAX_ASYNC_VEC (BUF_VECTOR_MAX * 2)
uint64_t *async_pending_info;
uint16_t async_pkts_idx;
uint16_t async_pkts_inflight_n;
+ uint16_t async_last_seg_n;
/* vq async features */
bool async_inorder;
uint16_t async_threshold;
} __rte_cache_aligned;
+/* Virtio device status as per Virtio specification */
+#define VIRTIO_DEVICE_STATUS_ACK 0x01
+#define VIRTIO_DEVICE_STATUS_DRIVER 0x02
+#define VIRTIO_DEVICE_STATUS_DRIVER_OK 0x04
+#define VIRTIO_DEVICE_STATUS_FEATURES_OK 0x08
+#define VIRTIO_DEVICE_STATUS_DEV_NEED_RESET 0x40
+#define VIRTIO_DEVICE_STATUS_FAILED 0x80
+
#define VHOST_MAX_VRING 0x100
#define VHOST_MAX_QUEUE_PAIRS 0x80
uint64_t log_addr;
struct rte_ether_addr mac;
uint16_t mtu;
+ uint8_t status;
struct vhost_device_ops const *notify_ops;