From: Amit Shah <amit.shah@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu list <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Char flow control patches
Date: Fri, 1 Feb 2013 13:45:02 +0530 [thread overview]
Message-ID: <20130201081502.GD5504@amit.redhat.com> (raw)
In-Reply-To: <87pq0m68hx.fsf@codemonkey.ws>
On (Wed) 30 Jan 2013 [08:38:50], Anthony Liguori wrote:
> Amit Shah <amit.shah@redhat.com> writes:
>
> > Hi Anthony,
> >
> > I did some basic testing of the char flow control patches from your
> > char-flow.2 branch. With the following patch applied, things seem to
> > be working fine. I tested the isa-serial and virtio-serial devices.
> >
> > I haven't yet tested with virtio-serial flow control, but at least no
> > regressions as of now.
>
> Awesome!
>
> It's obviously too late for 1.4 but I'd like to submit a proper series
> during the hard freeze so we can take it early in 1.5.
Agreed, late for 1.4.
> Can you add a Signed-off-by and I'll include it in my queue.
Sure, but it's a small thing, and I'd prefer if you folded it in the
patch that introduces that hunk.
BTW I'm only sure of the first diff here, do the rest look OK? I'm
not too familiar with the gio interface...
> > diff --git a/qemu-char.c b/qemu-char.c
> > index 2b714cf..5731d02 100644
> > --- a/qemu-char.c
> > +++ b/qemu-char.c
> > @@ -569,7 +569,7 @@ static gboolean io_watch_poll_prepare(GSource *source, gint *timeout_)
> >
> > iwp->max_size = iwp->fd_can_read(iwp->opaque);
> > if (iwp->max_size == 0) {
> > - return TRUE;
> > + return FALSE;
> > }
> >
> > return g_io_watch_funcs.prepare(source, timeout_);
> >
> >
> > In addition to this, we should also have the following, but the above
> > masks these:
> >
> > @@ -1067,7 +1067,7 @@ static gboolean pty_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
> > if (len > s->read_bytes)
> > len = s->read_bytes;
> > if (len == 0)
> > - return TRUE;
> > + return FALSE;
> > status = g_io_channel_read_chars(s->fd, (gchar *)buf, len, &size, NULL);
> > if (status != G_IO_STATUS_NORMAL) {
> > pty_chr_state(chr, 0);
> > @@ -2237,7 +2237,7 @@ static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
> > GIOStatus status;
> >
> > if (s->max_size == 0)
> > - return TRUE;
> > + return FALSE;
> > status = g_io_channel_read_chars(s->chan, (gchar *)s->buf, sizeof(s->buf),
> > &bytes_read, NULL);
> > s->bufcnt = bytes_read;
> > @@ -2492,7 +2492,7 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
> > int len, size;
> >
> > if (!s->connected || s->max_size <= 0) {
> > - return TRUE;
> > + return FALSE;
> > }
> > len = sizeof(buf);
> > if (len > s->max_size)
Amit
parent reply other threads:[~2013-02-01 8:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <87pq0m68hx.fsf@codemonkey.ws>]
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=20130201081502.GD5504@amit.redhat.com \
--to=amit.shah@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).