• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/virtio/

Lines Matching refs:vring

45  * information not stored with the vring structure
54 /* vring information */
55 struct vring vring; ///< vring data structure
56 struct capref vring_cap; ///< capability of the vring data structure
57 lvaddr_t vring_vaddr; ///< virtual address of the vring in memory
58 lpaddr_t vring_paddr; ///< physical address of the vring
59 lvaddr_t vring_align; ///< the alignment of the vring
61 uint16_t desc_num; ///< number of descriptors of this vring
205 * \brief allocates and initiates a new virtqueue structure with no vring mem
260 * \param vring_cap capability to be used for the vring
278 VIRTIO_DEBUG_VQ("failed to identify vring cap.\n");
282 VIRTIO_DEBUG_VQ("Assigning vring [0x%016lx] to virtq %u %s buffers\n",
300 VIRTIO_DEBUG_VQ("failed to map vring cap.\n");
304 VIRTIO_DEBUG_VQ("initializing vring of size %u\n", ndesc);
305 vring_init(&vqh->vring, ndesc, vqh->vring_align, vring_base);
349 * \param vring_cap capability to be used for the vring
422 vring_init(&vq->vring, vq->desc_num, vq->vring_align, (void *) vq->vring_vaddr);
452 * \brief Returns the physical address of the vring.
456 * \returns the physical address of the vring
464 * \brief returns the alignment of the vring
468 * \returns vring alignment
476 * \brief Returns the frame capability of the vring
490 * \brief Returns the number of elements (number of descriptors)in the vring of
495 * \returns number of elements in the vring
524 return (vq->vring.avail->idx == vq->avail_tail);
538 num_used = vq->vring.avail->idx - vq->avail_tail;
566 * We layout the vring structure in memory as follows:
568 * struct vring {
590 * \brief Maps the given capability and initializes the vring on the memory
593 * \param vr pointer to the vring structure to be initialized
595 * \param align alignment constraints for the vring
601 errval_t vring_init_from_cap(struct vring *vr,
636 * \brief frees the resources used by the vring structure
638 * \param vr the vring to be freed
643 errval_t vring_free(struct vring *vr)
672 uint16_t used_head = vq->vring.used->idx & (vq->desc_num - 1);
674 vq->vring.used->ring[used_head].length = length;
675 vq->vring.used->ring[used_head].id = idx;
681 vq->vring.used->idx++;
739 if (vq->avail_tail == vq->vring.avail->idx) {
747 uint16_t desc_idx = vq->vring.avail->ring[avail_idx];
749 desc = &vq->vring.desc[desc_idx];
762 desc = &vq->vring.desc[desc->next];