qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP
Date: Mon, 20 Aug 2012 17:55:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

Il 20/08/2012 16:57, Peter Maydell ha scritto:
> On 20 August 2012 14:27, Stefan Hajnoczi <address@hidden> 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, iovcnt);
>> > +    } while (ret == -1 && ret == EINTR);
> Quick sanity check -- does Windows have readv()/writev()? I notice
> that our slirp/slirp_config.h doesn't define HAVE_READV...

No, but we have

#define iov_recv(sockfd, iov, iov_cnt, offset, bytes) \
  iov_send_recv(sockfd, iov, iov_cnt, offset, bytes, false)
#define iov_send(sockfd, iov, iov_cnt, offset, bytes) \
  iov_send_recv(sockfd, iov, iov_cnt, offset, bytes, true)

that we can use instead.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]