#include <stdint.h>
#include <linux/vhost.h>
#include <linux/virtio_ring.h>
-#include <linux/virtio_net.h>
#include <sys/eventfd.h>
-#include <sys/socket.h>
-#include <linux/if.h>
#include <rte_memory.h>
#include <rte_mempool.h>
-#include <rte_ether.h>
#define RTE_VHOST_USER_CLIENT (1ULL << 0)
#define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
#define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
-/* Enum for virtqueue management. */
-enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
-
/**
* Information relating to memory regions including offsets to
* addresses in QEMUs memory file.
/**
* Device and vring operations.
*/
-struct virtio_net_device_ops {
+struct vhost_device_ops {
int (*new_device)(int vid); /**< Add device. */
void (*destroy_device)(int vid); /**< Remove device. */
/* Register callbacks. */
int rte_vhost_driver_callback_register(const char *path,
- struct virtio_net_device_ops const * const ops);
+ struct vhost_device_ops const * const ops);
/* Start vhost driver session blocking loop. */
int rte_vhost_driver_session_start(void);