On Mon, Sep 19, 2016 at 3:28 PM, Stefan Hajnoczi <stefa...@redhat.com> wrote: > 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.s...@redhat.com > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
I have tested this patch with a simple serial stress test to exercise the code paths. Tested-by: Ladi Prosek <lpro...@redhat.com> Reviewed-by: Ladi Prosek <lpro...@redhat.com>