43 #include <sys/eventfd.h>
53 #include <linux/vhost.h>
54 #include <linux/virtio_ring.h>
56 #define RTE_VHOST_USER_CLIENT (1ULL << 0)
57 #define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
58 #define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
65 uint64_t guest_phys_addr;
66 uint64_t guest_user_addr;
67 uint64_t host_user_addr;
82 struct rte_vhost_vring {
83 struct vring_desc *desc;
84 struct vring_avail *avail;
85 struct vring_used *used;
86 uint64_t log_guest_addr;
123 static inline uint64_t __attribute__((always_inline))
129 for (i = 0; i < mem->nregions; i++) {
130 reg = &mem->regions[i];
131 if (gpa >= reg->guest_phys_addr &&
132 gpa < reg->guest_phys_addr + reg->size) {
133 return gpa - reg->guest_phys_addr +
141 #define RTE_VHOST_NEED_LOG(features) ((features) & (1ULL << VHOST_F_LOG_ALL))
182 uint64_t offset, uint64_t len);
184 int rte_vhost_enable_guest_notification(
int vid, uint16_t queue_id,
int enable);
193 int rte_vhost_driver_unregister(
const char *path);
263 int rte_vhost_driver_callback_register(
const char *path,
382 struct rte_mbuf **pkts, uint16_t count);
433 struct rte_vhost_vring *vring);