virtio/ringtest: virtio_ring: fix up need_event math
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 27 Oct 2017 13:11:13 +0000 (16:11 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 30 Jan 2018 23:47:36 +0000 (01:47 +0200)
commita311650ae6ad0c169ade2583f78aa519878ea13f
tree53c54f8ff46aad3afab5de6672178f5271b08b32
parentf229a55c31a7e12a15c7b4dcf9a97a9bf7a72ce8
virtio/ringtest: virtio_ring: fix up need_event math

last kicked event index must be updated unconditionally:
even if we don't need to kick, we do not want to re-check
the same entry for events.

Reported-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
tools/virtio/ringtest/virtio_ring_0_9.c