]> git.proxmox.com Git - qemu.git/commit - hw/virtio-serial-bus.c
virtio-serial: Implement flow control for individual ports
authorAmit Shah <amit.shah@redhat.com>
Tue, 27 Apr 2010 12:34:11 +0000 (18:04 +0530)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 28 Apr 2010 13:58:22 +0000 (08:58 -0500)
commit9ed7b059ef776a3921cfd085e891f45076922542
tree422546b0e15528f3ee5f937c73c3b1818611c9d9
parenta69c76008597ccdffae7a933686ab856ca85e87c
virtio-serial: Implement flow control for individual ports

Individual ports can now signal to the virtio-serial core to stop
sending data if the ports cannot immediately handle new data.  When a
port later unthrottles, any data queued up in the virtqueue are sent to
the port.

Disable throttling once a port is closed (and we discard all the
unconsumed buffers in the vq).

The guest kernel can reclaim the buffers when it receives the port close
event or when a port is being removed. Ensure we free up the buffers
before we send out any events to the guest.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-serial-bus.c
hw/virtio-serial.h