virtio/ringtest: fix up need_event math
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 26 Oct 2017 01:48:01 +0000 (04:48 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 30 Jan 2018 23:47:35 +0000 (01:47 +0200)
commitf229a55c31a7e12a15c7b4dcf9a97a9bf7a72ce8
treed1a66cb14384c15dceaf6c291a34e6e4d288086d
parent31919140ff8c88c236f697baa28a6305df45e4ea
virtio/ringtest: 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.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
tools/virtio/ringtest/ring.c