* [PATCH] kvm: qemu: net: unbreak tap networking
@ 2009-04-28 8:48 Mark McLoughlin
2009-04-28 8:58 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Mark McLoughlin @ 2009-04-28 8:48 UTC (permalink / raw)
To: avi; +Cc: kvm, Mark McLoughlin
A recent merge broke tap networking because qemu_send_packet()
now always returns -EAGAIN causing tap to try and resend the
same packet forever.
Fix by having qemu_send_packet() return the status from the
qemu_deliver_packet() of the packet in question, rather than
any packets which happened to have been queued up during the
delivery of the original packet.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
net.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net.c b/net.c
index 16f6e48..b5ebcea 100644
--- a/net.c
+++ b/net.c
@@ -445,9 +445,9 @@ int qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size)
vlan->send_queue = packet;
} else {
vlan->delivering = 1;
- qemu_deliver_packet(vc, buf, size);
+ ret = qemu_deliver_packet(vc, buf, size);
while ((packet = vlan->send_queue) != NULL) {
- ret = qemu_deliver_packet(packet->sender, packet->data, packet->size);
+ qemu_deliver_packet(packet->sender, packet->data, packet->size);
vlan->send_queue = packet->next;
qemu_free(packet);
}
--
1.6.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm: qemu: net: unbreak tap networking
2009-04-28 8:48 [PATCH] kvm: qemu: net: unbreak tap networking Mark McLoughlin
@ 2009-04-28 8:58 ` Avi Kivity
2009-04-28 10:10 ` Mark McLoughlin
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2009-04-28 8:58 UTC (permalink / raw)
To: Mark McLoughlin; +Cc: kvm
Mark McLoughlin wrote:
> A recent merge broke tap networking because qemu_send_packet()
> now always returns -EAGAIN causing tap to try and resend the
> same packet forever.
>
> Fix by having qemu_send_packet() return the status from the
> qemu_deliver_packet() of the packet in question, rather than
> any packets which happened to have been queued up during the
> delivery of the original packet.
>
Applied, thanks.
What's the outlook on converging with upstream here? Otherwise I'll
keep breaking net on every merge.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kvm: qemu: net: unbreak tap networking
2009-04-28 8:58 ` Avi Kivity
@ 2009-04-28 10:10 ` Mark McLoughlin
0 siblings, 0 replies; 3+ messages in thread
From: Mark McLoughlin @ 2009-04-28 10:10 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Tue, 2009-04-28 at 11:58 +0300, Avi Kivity wrote:
> Mark McLoughlin wrote:
> > A recent merge broke tap networking because qemu_send_packet()
> > now always returns -EAGAIN causing tap to try and resend the
> > same packet forever.
> >
> > Fix by having qemu_send_packet() return the status from the
> > qemu_deliver_packet() of the packet in question, rather than
> > any packets which happened to have been queued up during the
> > delivery of the original packet.
> >
>
> Applied, thanks.
>
> What's the outlook on converging with upstream here? Otherwise I'll
> keep breaking net on every merge.
Yeah, I was getting close to something sane and then got distracted by
other things. Soon, hopefully.
Cheers,
Mark.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-28 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 8:48 [PATCH] kvm: qemu: net: unbreak tap networking Mark McLoughlin
2009-04-28 8:58 ` Avi Kivity
2009-04-28 10:10 ` Mark McLoughlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox