qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/13] Add generic packet buffering API


From: Mark McLoughlin
Subject: [Qemu-devel] [PATCH 0/13] Add generic packet buffering API
Date: Tue, 19 May 2009 10:55:22 +0100

Hi,
        This patch series works towards two[1] goals:

  1) Merging the code in qemu-kvm which drains the tap file descriptor
     when it is readable and buffers a packet if it fails to add it to
     the NIC receive queue

  2) Using the new TAP_SETSNDBUF ioctl() to put a limit on the number
     of in-flight packets allowed on a tap device; in this case, if a
     NIC pops a packet from its transmit queue, we need to be able to
     buffer said packet if the tap queue is full

        Rather than having each host backend and each NIC implement
packet buffering itself, the idea is to add extend the VLAN send queue
to do buffering.

        The API is fairly simple:

   - A qemu_send_packet() variant which takes a completion callback is
     added; if this returns zero, the sender should stop it's send
     queue until the completion callback is invoked

   - The VLANClientState receive() handler can now return zero,
     indicating that no space is available to receive the packet; when
     space becomes available later, the receiver must call
     qemu_flush_queued_packets() to re-queue any buffered packets
     which, in turn, will also cause the sender to re-start

        Note, these patches depend on two patches sent to the list by
Jan Kiszka:

  [PATCH 01/11] net: Don't deliver to disabled interfaces in qemu_sendv_packet
  [PATCH 02/11] net: Fix and improved ordered packet delivery

Cheers,
Mark.

[1] - Eagle-eyed readers will notice that I've neglected to actually
meet goal (2) with the patch set. Patience, patience :-)





reply via email to

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