From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHLJ2-0006WD-Io for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHLIx-0006Ox-Ca for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:43 -0400 Received: from [199.232.76.173] (port=43809 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHLIw-0006OX-Sj for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:38 -0400 Received: from mail17.svc.cra.dublin.eircom.net ([159.134.118.216]:47659) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MHLIw-0008Si-9G for qemu-devel@nongnu.org; Thu, 18 Jun 2009 13:21:38 -0400 From: Mark McLoughlin Date: Thu, 18 Jun 2009 18:21:35 +0100 Message-Id: <1245345696-20915-8-git-send-email-markmc@redhat.com> In-Reply-To: <1245345696-20915-7-git-send-email-markmc@redhat.com> References: <1245345696-20915-1-git-send-email-markmc@redhat.com> <1245345696-20915-2-git-send-email-markmc@redhat.com> <1245345696-20915-3-git-send-email-markmc@redhat.com> <1245345696-20915-4-git-send-email-markmc@redhat.com> <1245345696-20915-5-git-send-email-markmc@redhat.com> <1245345696-20915-6-git-send-email-markmc@redhat.com> <1245345696-20915-7-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 7/8] net: add packet length to NetPacketSent callback List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin virtio-net needs this - for the same purpose that it currently uses the return value from qemu_sendv_packet(). Signed-off-by: Mark McLoughlin --- net.c | 4 ++-- net.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net.c b/net.c index 1bf7c6b..1f816ca 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 ef85087..567f39c 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; -- 1.6.0.6