From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP
Date: Mon, 20 Aug 2012 17:55:12 +0200 [thread overview]
Message-ID: <50325DE0.3070607@redhat.com> (raw)
In-Reply-To: <CAFEAcA_DqvB=zrOdO1SUHw5VMMzmDNQJ4dTMjfJFdc_VpkKo8Q@mail.gmail.com>
Il 20/08/2012 16:57, Peter Maydell ha scritto:
> On 20 August 2012 14:27, Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> 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
prev parent reply other threads:[~2012-08-20 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 13:26 [Qemu-devel] [PATCH 0/3] net: asynchronous send/receive for net/socket.c Stefan Hajnoczi
2012-08-20 13:26 ` [Qemu-devel] [PATCH 1/3] net: asynchronous send/receive infrastructure " Stefan Hajnoczi
2012-08-20 13:27 ` [Qemu-devel] [PATCH 2/3] net: EAGAIN handling for net/socket.c UDP Stefan Hajnoczi
2012-08-20 13:27 ` [Qemu-devel] [PATCH 3/3] net: EAGAIN handling for net/socket.c TCP Stefan Hajnoczi
2012-08-20 14:57 ` Peter Maydell
2012-08-20 15:55 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50325DE0.3070607@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.