34 #ifndef _VIRTIO_NET_H_
35 #define _VIRTIO_NET_H_
43 #include <linux/vhost.h>
44 #include <linux/virtio_ring.h>
45 #include <linux/virtio_net.h>
46 #include <sys/eventfd.h>
47 #include <sys/socket.h>
54 #define RTE_VHOST_USER_CLIENT (1ULL << 0)
55 #define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
56 #define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
59 enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
84 uint64_t rte_vhost_feature_get(
void);
86 int rte_vhost_enable_guest_notification(
int vid, uint16_t queue_id,
int enable);
95 int rte_vhost_driver_unregister(
const char *path);
100 int rte_vhost_driver_session_start(
void);
171 struct rte_mbuf **pkts, uint16_t count);
void(* destroy_device)(int vid)
uint16_t rte_vhost_enqueue_burst(int vid, uint16_t queue_id, struct rte_mbuf **pkts, uint16_t count)
int(* vring_state_changed)(int vid, uint16_t queue_id, int enable)
int(* new_device)(int vid)
uint16_t rte_vhost_avail_entries(int vid, uint16_t queue_id)
int rte_vhost_get_ifname(int vid, char *buf, size_t len)
int rte_vhost_feature_disable(uint64_t feature_mask)
uint16_t rte_vhost_dequeue_burst(int vid, uint16_t queue_id, struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count)
uint32_t rte_vhost_get_queue_num(int vid)
int rte_vhost_feature_enable(uint64_t feature_mask)
int rte_vhost_driver_register(const char *path, uint64_t flags)
int rte_vhost_get_numa_node(int vid)