cloud-hypervisor/vm-virtio
Rob Bradford f4d41d600b virtio: net: Remove TAP fd from epoll when no available descriptors
When there are no available descriptors in the queue (observed when the
network interface hasn't been brought up by the kernel) stop waiting for
notifications that the TAP fd should be read from.

This avoids a situation where the TAP device has data avaiable and wakes
up the virtio-net thread only for the virtio-net thread not read that
data as it has nowhere to put it.

When there are descriptors available in the queue then we resume waiting
for the epoll event on the TAP fd.

This bug demonstrated itself as 100% CPU usage for cloud-hypervisor
binary prior to the guest network interface being brought up. The
solution was inspired by the Firecracker virtio-net code.

Fixes: #208

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-08-21 08:41:28 -07:00
..
src virtio: net: Remove TAP fd from epoll when no available descriptors 2019-08-21 08:41:28 -07:00
Cargo.toml build: Bulk update dependencies 2019-08-02 15:22:37 +02:00