net: handle EAGAIN from tapfd write()
authorMark McLoughlin <markmc@redhat.com>
Thu, 18 Jun 2009 17:21:32 +0000 (18:21 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 22 Jun 2009 15:15:30 +0000 (10:15 -0500)
commite7c907d37f9445807228a7fac9e19fc3b66cfd1e
tree50f9190ebc04eba36802a8f56f321197a4f613cc
parenta7d613a7c27c5b8be4e89aa40a67b66d84682482
net: handle EAGAIN from tapfd write()

If a write() on tapfd returns EAGAIN, return zero so that the packet
gets queued (in the case of async send) and enable polling tapfd for
writing.

When tapfd becomes writable, disable write polling and flush any queued
packets.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net.c