aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices')
-rw-r--r--src/vnet/devices/virtio/virtio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c
index e84490ba575..2e49c798c7c 100644
--- a/src/vnet/devices/virtio/virtio.c
+++ b/src/vnet/devices/virtio/virtio.c
@@ -109,10 +109,13 @@ virtio_vring_init (vlib_main_t * vm, virtio_if_t * vif, u16 idx, u16 sz)
if (idx & 1)
{
clib_memset_u32 (vring->buffers, ~0, sz);
+ // tx path: suppress the interrupts from kernel
+ vring->call_fd = -1;
}
+ else
+ vring->call_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
vring->size = sz;
- vring->call_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
vring->kick_fd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
virtio_log_debug (vif, "vring %u size %u call_fd %d kick_fd %d", idx,
vring->size, vring->call_fd, vring->kick_fd);
@@ -163,9 +166,7 @@ virtio_vring_free_tx (vlib_main_t * vm, virtio_if_t * vif, u32 idx)
virtio_vring_t *vring =
vec_elt_at_index (vif->txq_vrings, TX_QUEUE_ACCESS (idx));
- clib_file_del_by_index (&file_main, vring->call_file_index);
close (vring->kick_fd);
- close (vring->call_fd);
if (vring->used)
{
virtio_free_buffers (vm, vring);