#include <net/if.h>
#include <linux/if_tun.h>
#include <sys/ioctl.h>
-#include <linux/virtio_net.h>
-#include <linux/vhost.h>
#include <sys/eventfd.h>
#include <vlib/vlib.h>
typedef enum
{
-#define _(f,s) TAP_INPUT_ERROR_##f,
+#define _(f,s) VIRTIO_INPUT_ERROR_##f,
foreach_virtio_input_error
#undef _
- TAP_INPUT_N_ERROR,
+ VIRTIO_INPUT_N_ERROR,
} virtio_input_error_t;
static char *virtio_input_error_strings[] = {
next = vring->desc_next;
avail = vring->avail->idx;
- n_slots = vlib_buffer_alloc_to_ring (vm, vring->buffers, next, vring->size,
- n_slots);
+ n_slots =
+ vlib_buffer_alloc_to_ring_from_pool (vm, vring->buffers, next,
+ vring->size, n_slots,
+ vring->buffer_pool_index);
if (n_slots == 0)
return;
.format_trace = format_virtio_input_trace,
.type = VLIB_NODE_TYPE_INPUT,
.state = VLIB_NODE_STATE_INTERRUPT,
- .n_errors = TAP_INPUT_N_ERROR,
+ .n_errors = VIRTIO_INPUT_N_ERROR,
.error_strings = virtio_input_error_strings,
};