From: Prasad J Pandit <p...@fedoraproject.org>

Call qemu_flush_queued_packets to flush queued packets once they
are read in tulip_receive().

Suggested-by: Jason Wang <jasow...@redhat.com>
Signed-off-by: Prasad J Pandit <p...@fedoraproject.org>
---
 hw/net/tulip.c | 2 ++
 1 file changed, 2 insertions(+)

Update v4: call qemu_flush_queued_packets()
  -> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg05868.html

diff --git a/hw/net/tulip.c b/hw/net/tulip.c
index 757f12c710..8d8c9519e7 100644
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -287,6 +287,8 @@ static ssize_t tulip_receive(TULIPState *s, const uint8_t 
*buf, size_t size)
         tulip_desc_write(s, s->current_rx_desc, &desc);
         tulip_next_rx_descriptor(s, &desc);
     } while (s->rx_frame_len);
+
+    qemu_flush_queued_packets(qemu_get_queue(s->nic));
     return size;
 }
 
-- 
2.25.1


Reply via email to