[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling w
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data |
Date: |
Wed, 1 Dec 2010 11:30:58 +0000 |
User-agent: |
KMail/1.13.5 (Linux/2.6.36-trunk-amd64; KDE/4.4.5; x86_64; ; ) |
> /* Callback function that's called when the guest sends us data */
> static void flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t
> len) {
> VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
> + int ret;
>
> - qemu_chr_write(vcon->chr, buf, len);
> + ret = qemu_chr_write(vcon->chr, buf, len);
> + if (ret == -EAGAIN) {
> + virtio_serial_throttle_port(port, true);
> + }
> }
This looks wrong. It will loose data in the case of a partial write
(i.e. ret < len)
Paul
- [Qemu-devel] [PATCH v8 0/7] char: non-blocking writes, virtio-console flow control, Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 1/7] virtio-console: Factor out common init between console and generic ports, Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 2/7] char: Add a QemuChrHandlers struct to initialise chardev handlers, Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 3/7] char: Introduce char_set/remove_fd_handlers(), Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 4/7] char: Add framework for a 'write unblocked' callback, Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 5/7] char: Update send_all() to handle nonblocking chardev write requests, Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 6/7] char: Equip the unix/tcp backend to handle nonblocking writes, Amit Shah, 2010/12/01
- [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Amit Shah, 2010/12/01
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data,
Paul Brook <=
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Amit Shah, 2010/12/01
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Paul Brook, 2010/12/01
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Amit Shah, 2010/12/01
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Paul Brook, 2010/12/01
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Amit Shah, 2010/12/02
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Paul Brook, 2010/12/02
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Amit Shah, 2010/12/06
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Paul Brook, 2010/12/06
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Amit Shah, 2010/12/06
- Re: [Qemu-devel] [PATCH v8 7/7] virtio-console: Enable port throttling when chardev is slow to consume data, Paul Brook, 2010/12/06