[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 783527a] net: add packet length to NetPacketSent
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 783527a] net: add packet length to NetPacketSent callback |
Date: |
Mon, 22 Jun 2009 15:51:15 -0000 |
From: Mark McLoughlin <address@hidden>
virtio-net needs this - for the same purpose that it currently uses the
return value from qemu_sendv_packet().
Signed-off-by: Mark McLoughlin <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/net.c b/net.c
index 1586c68..55f70f2 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);
diff --git a/net.h b/net.h
index 484b000..a1c4d2c 100644
--- a/net.h
+++ b/net.h
@@ -32,7 +32,7 @@ struct VLANClientState {
typedef struct VLANPacket VLANPacket;
-typedef void (NetPacketSent) (VLANClientState *);
+typedef void (NetPacketSent) (VLANClientState *, ssize_t);
struct VLANPacket {
struct VLANPacket *next;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 783527a] net: add packet length to NetPacketSent callback,
Anthony Liguori <=