numam-dpdk/lib/librte_vhost
Yuanhan Liu 0823c1cb0a vhost: workaround stale vring base
When DPDK app crashes (or quits, or gets killed), a restart of DPDK
app would get stale vring base from QEMU. That would break the kernel
virtio net completely, making it non-work any more, unless a driver
reset is done.

So, instead of getting the stale vring base from QEMU, Huawei suggested
we could get a much saner (and may not the most accurate) vring base
from used->idx. That would work because:

- there is a memory barrier between updating used ring entries and
  used->idx. So, even though we crashed at updating the used ring
  entries, it will not cause any issue, as the guest driver will not
  process those stale used entries, for used-idx is not updated yet.

- DPDK process vring in order, that means a crash may just lead some
  packet retransmission for Tx and drop for Rx.

Suggested-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
2016-06-22 09:47:12 +02:00
..
eventfd_link vhost: fix kernel module insertion 2015-11-24 21:34:11 +01:00
libvirt vhost: fix qemu shutdown 2015-09-24 14:57:36 +02:00
vhost_cuse vhost: add vhost-user client mode 2016-06-22 09:47:07 +02:00
vhost_user vhost: add reconnect ability 2016-06-22 09:47:12 +02:00
Makefile vhost: export device id as the interface to applications 2016-06-22 09:42:57 +02:00
rte_vhost_version.map vhost: export queue free entries 2016-06-22 09:02:58 +02:00
rte_virtio_net.h vhost: add reconnect ability 2016-06-22 09:47:12 +02:00
vhost_rxtx.c vhost: make buffer vector for scatter Rx local 2016-06-22 09:44:21 +02:00
vhost-net.h vhost: make buffer vector for scatter Rx local 2016-06-22 09:44:21 +02:00
virtio-net.c vhost: workaround stale vring base 2016-06-22 09:47:12 +02:00