]> git.proxmox.com Git - mirror_qemu.git/commit
slirp: Fix queue walking in if_start
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 5 Mar 2012 23:00:07 +0000 (00:00 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Tue, 13 Mar 2012 13:05:48 +0000 (14:05 +0100)
commite3078bf40a33b59fa11d077b1d0bb8796470982e
treefd4c5a6b793aed333d05cc859ca9f19acaf9d1a2
parent953e7f54e679cd40fff28e29189ed9e24bfb0758
slirp: Fix queue walking in if_start

Another attempt to get this right: We need to carefully walk both the
fastq and the batchq in if_start while trying to send packets to
possibly not yet resolved hosts on the virtual network.

So far we just requeued a delayed packet where it was and then started
walking the queues from the top again - that couldn't work. Now we pre-
calculate the next packet in the queue so that the current one can
safely be removed if it was sent successfully. We also need to take into
account that the next packet can be from the same session if the current
one was sent and there are no other sessions.

CC: Fabien Chouteau <chouteau@adacore.com>
CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
CC: Stefan Weil <sw@weilnetz.de>
Tested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
slirp/if.c