Add a helper for disabling interrupts in split ring to make the
code consistent with the corresponding code in packed ring.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
}
/**
- * Tell the backend not to interrupt us.
+ * Tell the backend not to interrupt us. Implementation for packed virtqueues.
*/
static inline void
virtqueue_disable_intr_packed(struct virtqueue *vq)
}
}
+/**
+ * Tell the backend not to interrupt us. Implementation for split virtqueues.
+ */
+static inline void
+virtqueue_disable_intr_split(struct virtqueue *vq)
+{
+ vq->vq_split.ring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
+}
+
/**
* Tell the backend not to interrupt us.
*/
if (vtpci_packed_queue(vq->hw))
virtqueue_disable_intr_packed(vq);
else
- vq->vq_split.ring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
+ virtqueue_disable_intr_split(vq);
}
/**