Re: [Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP

2012-08-20 Thread Paolo Bonzini
Il 20/08/2012 16:57, Peter Maydell ha scritto: > On 20 August 2012 14:27, Stefan Hajnoczi wrote: >> > Replace spinning send_all() with a proper non-blocking send. When the >> > socket write buffer limit is reached, we should stop trying to send and >> > wait for the socket to become writable agai

Re: [Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP

2012-08-20 Thread Peter Maydell
On 20 August 2012 14:27, Stefan Hajnoczi wrote: > Replace spinning send_all() with a proper non-blocking send. When the > socket write buffer limit is reached, we should stop trying to send and > wait for the socket to become writable again. > > + > +do { > +ret = writev(s->fd, iov, i

[Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP

2012-08-20 Thread Stefan Hajnoczi
Replace spinning send_all() with a proper non-blocking send. When the socket write buffer limit is reached, we should stop trying to send and wait for the socket to become writable again. Non-blocking TCP sockets can return in two different ways when the write buffer limit is reached: 1. ret = -