summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2021-01-27 14:16:56 +0000
committerDamjan Marion <dmarion@me.com>2021-02-01 11:05:41 +0000
commit4b56340aacce8631ba0f1b52397ccd7fb9dfbb14 (patch)
tree69e5ab07eadce9f8bd7445d84b61892898335093 /src/vnet/devices
parent64177a3ed84125fac21758fc60e62548c5cbdfaa (diff)
tap: fix the interrupt handling
Type: fix Interrupt are suppressed from kernel on tx path. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I9f39f343b7e16bad09910766adf0b09654721f67
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);