[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes we
From: |
Amit Shah |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes |
Date: |
Tue, 6 Apr 2010 08:54:29 +0530 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On (Mon) Apr 05 2010 [17:33:38], Paul Brook wrote:
> > There might be cases where a few bytes would have been sent out to char
> > devices and some not. Currently the return values from qemu_chr_write()
> > to char devs are only -1, indicating an error, or the complete length
> > of the string passed.
> >
> > Make 'len' a pointer instead, and indicate how much of the string was
> > written. The return value will either be the same as 'len' or a negative
> > number indicating an error condition.
>
> This seems wrong. We should not be getting recoverable errors.
I was thinking of adding a bool to CharDriverState to indicate if EAGAIN
should be reported to the writer. This can be conveyed at the time of
doing qemu_chr_add_handlers().
It would certainly be beneficial for consumers of virtio-serial to be
notified of -EAGAIN so that the guest can be throttled till the chardev
catches up with the data being sent.
Amit
Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Paul Brook, 2010/04/05
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes,
Amit Shah <=
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Paul Brook, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Amit Shah, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
- Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Jamie Lokier, 2010/04/06
[Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes, Gerd Hoffmann, 2010/04/06
[Qemu-devel] Re: [PATCH 0/5] chardev, virtio-console: flow control, error handling, Gerd Hoffmann, 2010/04/06