Lines Matching refs:qe
595 struct vq_entry *qe; in vq_alloc_entry() local
602 qe = list_remove_head(&vq->vq_freelist); in vq_alloc_entry()
609 qe->qe_next = NULL; in vq_alloc_entry()
610 qe->qe_indirect_next = 0; in vq_alloc_entry()
611 (void) memset(qe->qe_desc, 0, sizeof (struct vring_desc)); in vq_alloc_entry()
613 return (qe); in vq_alloc_entry()
617 vq_free_entry(struct virtqueue *vq, struct vq_entry *qe) in vq_free_entry() argument
621 list_insert_head(&vq->vq_freelist, qe); in vq_free_entry()
656 virtio_ve_set(struct vq_entry *qe, uint64_t paddr, uint32_t len, in virtio_ve_set() argument
659 virtio_ve_set_desc(qe->qe_desc, paddr, len, write); in virtio_ve_set()
663 virtio_ve_add_indirect_buf(struct vq_entry *qe, uint64_t paddr, uint32_t len, in virtio_ve_add_indirect_buf() argument
668 ASSERT(qe->qe_queue->vq_indirect_num); in virtio_ve_add_indirect_buf()
669 ASSERT(qe->qe_indirect_next < qe->qe_queue->vq_indirect_num); in virtio_ve_add_indirect_buf()
671 indirect_desc = &qe->qe_indirect_descs[qe->qe_indirect_next]; in virtio_ve_add_indirect_buf()
673 qe->qe_indirect_next++; in virtio_ve_add_indirect_buf()
677 virtio_ve_add_cookie(struct vq_entry *qe, ddi_dma_handle_t dma_handle, in virtio_ve_add_cookie() argument
683 virtio_ve_add_indirect_buf(qe, dma_cookie.dmac_laddress, in virtio_ve_add_cookie()
714 virtio_push_chain(struct vq_entry *qe, boolean_t sync) in virtio_push_chain() argument
716 struct virtqueue *vq = qe->qe_queue; in virtio_push_chain()
717 struct vq_entry *head = qe; in virtio_push_chain()
721 ASSERT(qe); in virtio_push_chain()
729 if (qe->qe_indirect_next > 1) { in virtio_push_chain()
736 virtio_ve_set_desc(qe->qe_desc, in virtio_push_chain()
737 qe->qe_indirect_dma_cookie.dmac_laddress, in virtio_push_chain()
738 sizeof (struct vring_desc) * qe->qe_indirect_next, in virtio_push_chain()
740 qe->qe_desc->flags |= VRING_DESC_F_INDIRECT; in virtio_push_chain()
744 desc = &qe->qe_indirect_descs[i]; in virtio_push_chain()
749 } while (i < qe->qe_indirect_next - 1); in virtio_push_chain()
753 if (qe->qe_next) { in virtio_push_chain()
754 qe->qe_desc->flags |= VRING_DESC_F_NEXT; in virtio_push_chain()
755 qe->qe_desc->next = qe->qe_next->qe_index; in virtio_push_chain()
758 qe = qe->qe_next; in virtio_push_chain()
759 } while (qe); in virtio_push_chain()
810 virtio_free_chain(struct vq_entry *qe) in virtio_free_chain() argument
813 struct virtqueue *vq = qe->qe_queue; in virtio_free_chain()
815 ASSERT(qe); in virtio_free_chain()
818 ASSERT(qe->qe_queue == vq); in virtio_free_chain()
819 tmp = qe->qe_next; in virtio_free_chain()
820 vq_free_entry(vq, qe); in virtio_free_chain()
821 qe = tmp; in virtio_free_chain()