spapr-vlan: flush queue whenever can_receive can go from false to true
PATCH 1/1 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.
--- hw/net/spapr_llan.c | 2 ++ 1 file changed, 2 insertions(+)
hw/net/spapr_llan.c +2 -0
@@ -408,6 +408,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);
Signature · 1 line
1.8.4.rc4
Quoted 7 lines · Alexey Kardashevskiy
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.
Ping, anyone?
Quoted 20 lines
Suggested-by Max Filippov <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>--- hw/net/spapr_llan.c | 2 ++ 1 file changed, 2 insertions(+)hw/net/spapr_llan.c +2
-0@@ -408,6 +408,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);
Signature · 1 line
Alexey
Alexander Graf
AppliedQuoted 11 lines · Alexey Kardashevskiy
Quoted 7 lines · Alexey Kardashevskiy
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.Ping, anyone?
Thanks, applied to ppc-next.
Alex