From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3UK4-0006m2-81 for qemu-devel@nongnu.org; Mon, 20 Aug 2012 11:55:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3UJw-0007xp-CQ for qemu-devel@nongnu.org; Mon, 20 Aug 2012 11:55:24 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:46324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3UJw-0007xd-45 for qemu-devel@nongnu.org; Mon, 20 Aug 2012 11:55:16 -0400 Received: by bkcji1 with SMTP id ji1so1828223bkc.4 for ; Mon, 20 Aug 2012 08:55:14 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50325DE0.3070607@redhat.com> Date: Mon, 20 Aug 2012 17:55:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1345469221-15992-1-git-send-email-stefanha@linux.vnet.ibm.com> <1345469221-15992-4-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Hajnoczi , qemu-devel@nongnu.org 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 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