mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-10 14:24:15 +00:00
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>
This commit is contained in:
parent
452e475196
commit
a61d1f6701
@ -305,6 +305,10 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
|
|||||||
VirtIONet *n = to_virtio_net(vdev);
|
VirtIONet *n = to_virtio_net(vdev);
|
||||||
|
|
||||||
qemu_flush_queued_packets(n->vc);
|
qemu_flush_queued_packets(n->vc);
|
||||||
|
|
||||||
|
/* We now have RX buffers, signal to the IO thread to break out of the
|
||||||
|
* select to re-poll the tap file descriptor */
|
||||||
|
qemu_notify_event();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
|
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user