Commit a61d1f6701a4a25428b2d4211c0740cfb7c54e8d

Authored by Glauber Costa
Committed by Anthony Liguori
1 parent 452e4751

notify io_thread at the end of rx handling

This is a backport from qemu-kvm. Just instead of using kvm's specific
notification mechanism, we use qemu_notify_event()

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 4 additions and 0 deletions
hw/virtio-net.c
... ... @@ -305,6 +305,10 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
305 305 VirtIONet *n = to_virtio_net(vdev);
306 306  
307 307 qemu_flush_queued_packets(n->vc);
  308 +
  309 + /* We now have RX buffers, signal to the IO thread to break out of the
  310 + * select to re-poll the tap file descriptor */
  311 + qemu_notify_event();
308 312 }
309 313  
310 314 static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
... ...