* [Qemu-devel] [PATCH] spapr_llan: fix device reenabling
@ 2013-05-03 6:22 Alexey Kardashevskiy
2013-05-06 15:16 ` Alexander Graf
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kardashevskiy @ 2013-05-03 6:22 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf, David Gibson
Normally, the "tap" device is polled by QEMU if a guest NIC can
receive packets. If a guest NIC is stopped during transfer (rmmod or
ifdown), it may still have packets in a queue which have to be send
to the guest before QEMU enables polling of a "tap" interface via
tap_update_fd_handler().
However the spapr_llan device was missing the qemu_flush_queued_packets()
call so the tap_send_completed() callback was never called and therefore
"tap" interface polling was not enabled ever.
The patch fixes this problem.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/net/spapr_llan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index cca3d1a..46f7d5f 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -336,6 +336,8 @@ static target_ulong h_register_logical_lan(PowerPCCPU *cpu,
spapr_vio_dma_set(sdev, VLAN_BD_ADDR(rec_queue), 0, VLAN_BD_LEN(rec_queue));
dev->isopen = 1;
+ qemu_flush_queued_packets(qemu_get_queue(dev->nic));
+
return H_SUCCESS;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr_llan: fix device reenabling
2013-05-03 6:22 [Qemu-devel] [PATCH] spapr_llan: fix device reenabling Alexey Kardashevskiy
@ 2013-05-06 15:16 ` Alexander Graf
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2013-05-06 15:16 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, David Gibson
On 05/03/2013 08:22 AM, Alexey Kardashevskiy wrote:
> Normally, the "tap" device is polled by QEMU if a guest NIC can
> receive packets. If a guest NIC is stopped during transfer (rmmod or
> ifdown), it may still have packets in a queue which have to be send
> to the guest before QEMU enables polling of a "tap" interface via
> tap_update_fd_handler().
>
> However the spapr_llan device was missing the qemu_flush_queued_packets()
> call so the tap_send_completed() callback was never called and therefore
> "tap" interface polling was not enabled ever.
>
> The patch fixes this problem.
>
> Signed-off-by: Alexey Kardashevskiy<aik@ozlabs.ru>
Thanks, applied to ppc-next.
Alex
> ---
> hw/net/spapr_llan.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
> index cca3d1a..46f7d5f 100644
> --- a/hw/net/spapr_llan.c
> +++ b/hw/net/spapr_llan.c
> @@ -336,6 +336,8 @@ static target_ulong h_register_logical_lan(PowerPCCPU *cpu,
> spapr_vio_dma_set(sdev, VLAN_BD_ADDR(rec_queue), 0, VLAN_BD_LEN(rec_queue));
>
> dev->isopen = 1;
> + qemu_flush_queued_packets(qemu_get_queue(dev->nic));
> +
> return H_SUCCESS;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-06 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-03 6:22 [Qemu-devel] [PATCH] spapr_llan: fix device reenabling Alexey Kardashevskiy
2013-05-06 15:16 ` Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).