[Top][All Lists]
[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 :-)
- [Qemu-devel] [PATCH 0/13] Add generic packet buffering API,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 01/13] net: factor tap_read_packet() out of tap_send(), Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 02/13] net: move the tap buffer into TAPState, Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 03/13] net: vlan clients with no fd_can_read() can always receive, Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 04/13] net: only read from tapfd when we can send, Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 05/13] net: add fd_readv() handler to qemu_new_vlan_client() args, Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 06/13] net: re-name vc->fd_read() to vc->receive(), Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 07/13] net: pass VLANClientState* as first arg to receive handlers, Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 08/13] net: add return value to packet receive handler, Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 09/13] net: return status from qemu_deliver_packet(), Mark McLoughlin, 2009/05/19
- [Qemu-devel] [PATCH 10/13] net: split out packet queueing and flushing into separate functions, Mark McLoughlin, 2009/05/22