qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/2] virtio-net: Fix TX data discard on backend


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH 0/2] virtio-net: Fix TX data discard on backend disconnection
Date: Fri, 17 Nov 2017 12:01:01 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0



On 2017年11月17日 02:48, Maxime Coquelin wrote:
This series fixes TX data discard when backend disconnects.

On backend disconnection, QEMU cannot retrieve its internal
avail index, which makes the virtio queue internal state
inconsistent (last_avail_idx will always be 0, whereas used_idx
is correct).

It results in discarding TX data to corrupt the vring state, by
completing descriptors already completed by the backend.

This series fixes this by restoring last_avail_idx to the vring
used idx, as some backends used to do on reconnection.

Maxime Coquelin (2):
   virtio: Add queue interface to restore avail index from vring used
     index
   vhost: restore avail index from vring used index on disconnection

  hw/virtio/vhost.c          |  4 ++++
  hw/virtio/virtio.c         | 10 ++++++++++
  include/hw/virtio/virtio.h |  1 +
  3 files changed, 15 insertions(+)


Reviewed-by: Jason Wang <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]