]> git.ipfire.org Git - thirdparty/qemu.git/commit
net: add receive_disabled logic to iov delivery path
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 17 Aug 2012 20:16:42 +0000 (21:16 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:18 +0000 (21:44 -0500)
commit0d91cd5aa7ddc678f80f47041aa2ed5277172d9c
treea31e1a5b3765ba2ed4bad8b56ed5b1c6b2ce1fd8
parentbfa23099aa1897f3a8dec7228e8ab23947d504ee
net: add receive_disabled logic to iov delivery path

This patch adds the missing NetClient->receive_disabled logic in the
sendv delivery code path.  It seems that commit
893379efd0e1b84ceb0c42a713293f3dbd27b1bd ("net: disable receiving if
client returns zero") only added the logic to qemu_deliver_packet() and
not qemu_deliver_packet_iov().

The receive_disabled flag should be automatically set when .receive(),
.receive_raw(), or .receive_iov() return 0.  No further packets will be
delivered to the NetClient until the receive_disabled flag is cleared
again by calling qemu_flush_queued_packets().

Typically the NetClient will wait until its file descriptor becomes
writable and then invoke qemu_flush_queued_packets() to resume
transmission.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
(cherry picked from commit c67f5dc10573687497f0f5c3aec19b15c35c63d7)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
net.c