qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Q: frame reordering in qemu_net_queue_send() ?


From: Luigi Rizzo
Subject: [Qemu-devel] Q: frame reordering in qemu_net_queue_send() ?
Date: Wed, 30 May 2012 10:30:19 +0200

Hi,
while investigating rx performance for emulated network devices
(i am looking at the userspace version, relying on net=tap
or similar approaches) i noticed the code
in net/queue.c :: qemu_net_queue_send()
which look strange to me (same goes for the iov version).

The whole function is below, just for reference.
My impression is that the call to qemu_net_queue_flush()
is misplaced, and it should be before qemu_net_queue_deliver()
otherwise the current packet is pushed out before anything
was already in the queue.

Does it make sense ?

cheers
luigi

   ssize_t qemu_net_queue_send(NetQueue *queue,
                               VLANClientState *sender,
                               unsigned flags,
                               const uint8_t *data,
                               size_t size,
                               NetPacketSent *sent_cb)
   {
       ssize_t ret;

       if (queue->delivering) {
           return qemu_net_queue_append(queue, sender, flags, data, size, NULL);
       }

       ret = qemu_net_queue_deliver(queue, sender, flags, data, size);
       if (ret == 0) {
           qemu_net_queue_append(queue, sender, flags, data, size, sent_cb);
           return 0;
       }

       qemu_net_queue_flush(queue);

       return ret;
   }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]