diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2016-09-19 14:28:05 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2016-10-10 01:16:58 +0300 |
| commit | d4c19cdeeb2f1e474bc426a6da261f1d7346eb5b (patch) | |
| tree | ca6257b6196dbfa2857984b4c87646ece6553f2f /hw/net/virtio-net.c | |
| parent | 97b93c8ad2242c5a5f89ac50f9e696289c5b4947 (diff) | |
| download | focaccia-qemu-d4c19cdeeb2f1e474bc426a6da261f1d7346eb5b.tar.gz focaccia-qemu-d4c19cdeeb2f1e474bc426a6da261f1d7346eb5b.zip | |
virtio-serial: add missing virtio_detach_element() call
Ports enter a "throttled" state when writing to the chardev would block. The current output VirtQueueElement is kept around until the chardev becomes writable again. There are several places in the virtio-serial lifecycle where the VirtQueueElement should be thrown away. For example, if the virtio device is reset then virtqueue elements are no longer valid. This patch adds the discard_throttle_data() function to unmap the scatter-gather list and decrement vq->inuse. This ensures that the VirtQueueElement is freed properly. Cc: amit.shah@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions