notify io_thread at the end of rx handling
PATCH 1/1 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 <[email protected]>
--- hw/virtio-net.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
hw/virtio-net.c +4 -0
@@ -305,6 +305,10 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)VirtIONet *n =to_virtio_net (vdev);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)
Signature · 1 line
1.6.2.2
Quoted 13 lines · Glauber Costa
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 <[email protected]>--- hw/virtio-net.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)hw/virtio-net.c +0
-0
hw/virtio-net.c static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq) · line 312
Quoted 8 lines
hw/virtio-net.c +4
-0@@ -305,6 +305,10 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)VirtIONet *n =to_virtio_net (vdev);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 (); }
Looks good to me
Acked-by Mark McLoughlin <[email protected]>
Cheers,
Mark.