vhost: don't notify on last_used_idx overflow

This is required only for event index,
which we don't support for now. The whole
NOTIFY_ON_EMPTY feature is about to be removed
soon. See subsequent patches for details. If
necessary, this should be re-implemented in a
different way.

Change-Id: Idd0c1ab929eef46e692834ffdc62472fa0f6fb74
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/398324
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-02-04 12:28:45 +01:00 committed by Jim Harris
parent 19725e9764
commit d03cac1310

View File

@ -375,10 +375,8 @@ spdk_vhost_vq_used_ring_enqueue(struct spdk_vhost_dev *vdev, struct spdk_vhost_v
virtqueue->used_req_cnt++; virtqueue->used_req_cnt++;
/* We need to signal every last_used_idx overflow. */ if (spdk_vhost_dev_has_feature(vdev, VIRTIO_F_NOTIFY_ON_EMPTY) &&
if (vring->last_used_idx == 0 || spdk_unlikely(vring->avail->idx == vring->last_avail_idx)) {
(spdk_vhost_dev_has_feature(vdev, VIRTIO_F_NOTIFY_ON_EMPTY) &&
spdk_unlikely(vring->avail->idx == vring->last_avail_idx))) {
spdk_vhost_vq_used_signal(vdev, virtqueue); spdk_vhost_vq_used_signal(vdev, virtqueue);
} }
} }