+struct vhost_queue {
+ struct rte_vhost_vring vr;
+ uint16_t last_avail_idx;
+ uint16_t last_used_idx;
+};
+
+struct vhost_dev {
+ /**< Number of memory regions for gpa to hpa translation. */
+ uint32_t nregions_hpa;
+ /**< Device MAC address (Obtained on first TX packet). */
+ struct ether_addr mac_address;
+ /**< RX VMDQ queue number. */
+ uint16_t vmdq_rx_q;
+ /**< Vlan tag assigned to the pool */
+ uint32_t vlan_tag;
+ /**< Data core that the device is added to. */
+ uint16_t coreid;
+ /**< A device is set as ready if the MAC address has been set. */
+ volatile uint8_t ready;
+ /**< Device is marked for removal from the data core. */
+ volatile uint8_t remove;
+
+ int vid;
+ uint64_t features;
+ size_t hdr_len;
+ uint16_t nr_vrings;
+ struct rte_vhost_memory *mem;
+ struct device_statistics stats;
+ TAILQ_ENTRY(vhost_dev) global_vdev_entry;
+ TAILQ_ENTRY(vhost_dev) lcore_vdev_entry;
+
+#define MAX_QUEUE_PAIRS 4
+ struct vhost_queue queues[MAX_QUEUE_PAIRS * 2];
+} __rte_cache_aligned;
+
+TAILQ_HEAD(vhost_dev_tailq_list, vhost_dev);
+
+
+#define REQUEST_DEV_REMOVAL 1
+#define ACK_DEV_REMOVAL 0
+