From: Alexey Kardashevskiy Date: Fri, 14 Feb 2014 01:27:04 +0000 (+1100) Subject: spapr-vlan: flush queue whenever can_receive can go from false to true X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~386^2~42^2~123^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a61f3b4782d4dd431c8d6cca6d7fd48d68e1b59;p=sdk%2Femulator%2Fqemu.git spapr-vlan: flush queue whenever can_receive can go from false to true When the guests adds buffers to receive queue, the network device should flush its queue of pending packets. This is done with qemu_flush_queued_packets. This adds a call to qemu_flush_queued_packets() which wakes up the main loop and let QEMU update the network device status which now is "can receive". The patch basically does the same thing as e8b4c68 does. Suggested-by: Max Filippov Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alexander Graf --- diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index 1bd6f50aaa..f6fbcb56bf 100644 --- a/hw/net/spapr_llan.c +++ b/hw/net/spapr_llan.c @@ -405,6 +405,8 @@ static target_ulong h_add_logical_lan_buffer(PowerPCCPU *cpu, dev->rx_bufs++; + qemu_flush_queued_packets(qemu_get_queue(dev->nic)); + DPRINTF("h_add_logical_lan_buffer(): Added buf ptr=%d rx_bufs=%d" " bd=0x%016llx\n", dev->add_buf_ptr, dev->rx_bufs, (unsigned long long)buf);