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