vhost: don't use interrupt suppressing hints on avail ring
Randomly we loose some interrupts. This stop IO in guest till next request is issued which is abort Change-Id: I1a0b6391a324cabb0df17d2704126d161b1868f7 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/370248 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
bf24e1046d
commit
71904d7f4d
@ -83,17 +83,6 @@ spdk_vhost_vq_avail_ring_get(struct rte_vhost_vring *vq, uint16_t *reqs, uint16_
|
||||
return count;
|
||||
}
|
||||
|
||||
bool
|
||||
spdk_vhost_vq_should_notify(struct spdk_vhost_dev *vdev, struct rte_vhost_vring *vq)
|
||||
{
|
||||
if ((vdev->negotiated_features & (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY)) &&
|
||||
spdk_unlikely(vq->avail->idx == vq->last_avail_idx)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return !(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT);
|
||||
}
|
||||
|
||||
struct vring_desc *
|
||||
spdk_vhost_vq_get_desc(struct rte_vhost_vring *vq, uint16_t req_idx)
|
||||
{
|
||||
@ -125,9 +114,14 @@ spdk_vhost_vq_used_ring_enqueue(struct spdk_vhost_dev *vdev, struct rte_vhost_vr
|
||||
rte_compiler_barrier();
|
||||
|
||||
vq->used->idx = vq->last_used_idx;
|
||||
if (spdk_vhost_vq_should_notify(vdev, vq)) {
|
||||
eventfd_write(vq->callfd, (eventfd_t)1);
|
||||
}
|
||||
|
||||
/*
|
||||
* We should be able to used hints form guest but simply checking
|
||||
* avail->flags prove to be unreliable. Till it is figured out how
|
||||
* reliable use avail->flags value interrupts are always sent to guest.
|
||||
*/
|
||||
eventfd_write(vq->callfd, (eventfd_t)1);
|
||||
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user