vhost: obey VRING_AVAIL_F_NO_INTERRUPT

If VRING_AVAIL_F_NO_INTERRUPT flag for queue is negotiated, guest can
set this flag in avail ring to suppress interrupts from host.

Change-Id: I2043067de33da009a974be5915ae81b1343fc424
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
This commit is contained in:
Pawel Wodkowski 2017-03-20 18:14:05 +01:00 committed by Jim Harris
parent bf31637789
commit 66894635fa

View File

@ -240,7 +240,9 @@ vq_used_ring_enqueue(struct rte_vhost_vring *vq, uint16_t id, uint32_t len)
rte_compiler_barrier(); rte_compiler_barrier();
vq->used->idx = vq->last_used_idx; vq->used->idx = vq->last_used_idx;
eventfd_write(vq->callfd, (eventfd_t)1); if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) {
eventfd_write(vq->callfd, (eventfd_t)1);
}
} }
static bool static bool