aboutsummaryrefslogtreecommitdiff
path: root/net/queue.c
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-07-24 16:35:17 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-08-01 13:32:11 +0100
commit86a77c3858610a36f1409c657b1768727693d25b (patch)
treee2efb48dff91569fad46bd24ccb19da7082d4fff /net/queue.c
parent1a8595931ac6ffb76c2e10675ba3a39e807f02fd (diff)
net: cleanup deliver/deliver_iov func pointers
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'net/queue.c')
-rw-r--r--net/queue.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/net/queue.c b/net/queue.c
index 35c3463f53..0afd7830a4 100644
--- a/net/queue.c
+++ b/net/queue.c
@@ -23,6 +23,7 @@
#include "net/queue.h"
#include "qemu-queue.h"
+#include "net.h"
/* The delivery handler may only return zero if it will call
* qemu_net_queue_flush() when it determines that it is once again able
@@ -48,8 +49,6 @@ struct NetPacket {
};
struct NetQueue {
- NetPacketDeliver *deliver;
- NetPacketDeliverIOV *deliver_iov;
void *opaque;
QTAILQ_HEAD(packets, NetPacket) packets;
@@ -57,16 +56,12 @@ struct NetQueue {
unsigned delivering : 1;
};
-NetQueue *qemu_new_net_queue(NetPacketDeliver *deliver,
- NetPacketDeliverIOV *deliver_iov,
- void *opaque)
+NetQueue *qemu_new_net_queue(void *opaque)
{
NetQueue *queue;
queue = g_malloc0(sizeof(NetQueue));
- queue->deliver = deliver;
- queue->deliver_iov = deliver_iov;
queue->opaque = opaque;
QTAILQ_INIT(&queue->packets);
@@ -151,7 +146,7 @@ static ssize_t qemu_net_queue_deliver(NetQueue *queue,
ssize_t ret = -1;
queue->delivering = 1;
- ret = queue->deliver(sender, flags, data, size, queue->opaque);
+ ret = qemu_deliver_packet(sender, flags, data, size, queue->opaque);
queue->delivering = 0;
return ret;
@@ -166,7 +161,7 @@ static ssize_t qemu_net_queue_deliver_iov(NetQueue *queue,
ssize_t ret = -1;
queue->delivering = 1;
- ret = queue->deliver_iov(sender, flags, iov, iovcnt, queue->opaque);
+ ret = qemu_deliver_packet_iov(sender, flags, iov, iovcnt, queue->opaque);
queue->delivering = 0;
return ret;