From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] Re: [PATCH][RESEND] char: Flush read buffer in mux_chr_can_read
Date: Wed, 17 Nov 2010 11:18:47 +0100 [thread overview]
Message-ID: <4CE3AC07.2050400@siemens.com> (raw)
In-Reply-To: <4CBDB361.1060606@siemens.com>
Am 19.10.2010 17:04, Jan Kiszka wrote:
> Move the buffer flush from mux_chr_read to mux_chr_can_read. While the
> latter is called periodically, the former will only be invoked when new
> characters arrive at the back-end. This caused problems to front-end
> drivers whenever they were unable to read data immediately, e.g.
> virtio-console attached to stdio.
>
Ping.
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> qemu-char.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qemu-char.c b/qemu-char.c
> index 6d2dce7..f4c3876 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -398,6 +398,8 @@ static int mux_chr_can_read(void *opaque)
> MuxDriver *d = chr->opaque;
> int m = d->focus;
>
> + mux_chr_accept_input(opaque);
> +
> if ((d->prod[m] - d->cons[m]) < MUX_BUFFER_SIZE)
> return 1;
> if (d->chr_can_read[m])
> @@ -412,8 +414,6 @@ static void mux_chr_read(void *opaque, const uint8_t *buf, int size)
> int m = d->focus;
> int i;
>
> - mux_chr_accept_input (opaque);
> -
> for(i = 0; i < size; i++)
> if (mux_proc_byte(chr, d, buf[i])) {
> if (d->prod[m] == d->cons[m] &&
next prev parent reply other threads:[~2010-11-17 10:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 15:04 [Qemu-devel] [PATCH][RESEND] char: Flush read buffer in mux_chr_can_read Jan Kiszka
2010-10-19 15:22 ` [Qemu-devel] " Alexander Graf
2010-10-19 15:26 ` Jan Kiszka
2010-11-17 10:18 ` Jan Kiszka [this message]
2010-11-17 11:55 ` Alexander Graf
2010-11-17 11:58 ` Jan Kiszka
2010-11-17 12:00 ` Alexander Graf
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=4CE3AC07.2050400@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--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 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.