Lines Matching refs:vring

44  * information not stored with the vring structure
53 /* vring information */
54 struct vring vring; ///< vring data structure
55 struct capref vring_cap; ///< capability of the vring data structure
56 lvaddr_t vring_vaddr; ///< virtual address of the vring in memory
57 lpaddr_t vring_paddr; ///< physical address of the vring
58 lvaddr_t vring_align; ///< the alignment of the vring
60 uint16_t desc_num; ///< number of descriptors of this vring
108 uint16_t *used_event = vring_get_used_event(&vq->vring);
111 vq->vring.avail->flags &= ~VIRTIO_RING_AVAIL_F_NO_INTERRUPT;
124 * \brief initializes the vring structure of the virtqueue
126 * \param vq virtqueue of the vring to initialize
130 struct vring *vr = &vq->vring;
137 * initialize the vring structure in memory
185 new = vq->vring.avail->idx;
187 event_idx = vring_get_avail_event(&vq->vring);
192 return ((vq->vring.used->flags & VIRTIO_RING_USED_F_NO_NOTIFY) == 0);
249 VIRTIO_DEBUG_VQ("Allocated memory for vring: [0x%lx & 0x%lx]\n",
269 * \param vring_cap capability to be used for the vring
414 * \brief Returns the physical address of the vring.
418 * \returns the physical address of the vring
426 * \brief returns the alignment of the vring
430 * \returns vring alignment
438 * \brief Returns the frame capability of the vring
488 * \brief Returns the number of elements (number of descriptors)in the vring of
493 * \returns number of elements in the vring
549 num_used = vq->vring.used->idx - vq->used_tail;
573 if (vq->used_tail == vq->vring.used->idx) {
621 uint16_t ndesc = vq->vring.avail->idx - vq->used_tail;
645 uint16_t *used_event = vring_get_used_event(&vq->vring);
648 vq->vring.avail->flags |= VIRTIO_RING_AVAIL_F_NO_INTERRUPT;
668 * We layout the vring structure in memory as follows:
670 * struct vring {
692 * \brief Maps the given capability and initializes the vring on the memory
695 * \param vr pointer to the vring structure to be initialized
697 * \param align alignment constraints for the vring
703 errval_t vring_init_from_cap(struct vring *vr,
738 * \brief allocates a new vring structure
740 * \param vr pointer to the vring structure
742 * \param align the alignment constraints for the vring
748 errval_t vring_alloc(struct vring *vr,
779 * \brief frees the resources used by the vring structure
781 * \param vr the vring to be freed
786 errval_t vring_free(struct vring *vr)
814 uint16_t avail_idx = vq->vring.avail->idx & (vq->desc_num - 1);
815 vq->vring.avail->ring[avail_idx] = idx;
822 vq->queue_index, vq->vring.avail->idx + 1, vq->desc_num_queued + 1);
824 vq->vring.avail->idx++;
848 struct vring_desc *desc = vq->vring.desc;
985 desc = &vq->vring.desc[desc_idx];
995 desc = &vq->vring.desc[desc->next];
1036 if (vq->used_tail == vq->vring.used->idx) {
1041 elem = &vq->vring.used->ring[used_idx];