summaryrefslogtreecommitdiffstats
path: root/net.c
diff options
context:
space:
mode:
authorMark McLoughlin2009-06-18 19:21:35 +0200
committerAnthony Liguori2009-06-22 17:15:30 +0200
commit783527a9ef5429837685744b3661318588f07890 (patch)
tree1951a10fb77c86d56f65a57ea35386af767d2e56 /net.c
parentnet: add '-net tap,sndbuf=nbytes' (diff)
downloadqemu-783527a9ef5429837685744b3661318588f07890.tar.gz
qemu-783527a9ef5429837685744b3661318588f07890.tar.xz
qemu-783527a9ef5429837685744b3661318588f07890.zip
net: add packet length to NetPacketSent callback
virtio-net needs this - for the same purpose that it currently uses the return value from qemu_sendv_packet(). Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.c')
-rw-r--r--net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net.c b/net.c
index 1586c68139..55f70f261f 100644
--- a/net.c
+++ b/net.c
@@ -472,7 +472,7 @@ void qemu_flush_queued_packets(VLANClientState *vc)
}
if (packet->sent_cb)
- packet->sent_cb(packet->sender);
+ packet->sent_cb(packet->sender, ret);
qemu_free(packet);
}
@@ -1138,7 +1138,7 @@ static ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen)
}
#endif
-static void tap_send_completed(VLANClientState *vc)
+static void tap_send_completed(VLANClientState *vc, ssize_t len)
{
TAPState *s = vc->opaque;
tap_read_poll(s, 1);