Lines Matching refs:qe

579 	struct vq_entry *qe;  in vq_alloc_entry()  local
586 qe = list_remove_head(&vq->vq_freelist); in vq_alloc_entry()
593 qe->qe_next = NULL; in vq_alloc_entry()
594 qe->qe_indirect_next = 0; in vq_alloc_entry()
595 (void) memset(qe->qe_desc, 0, sizeof (struct vring_desc)); in vq_alloc_entry()
597 return (qe); in vq_alloc_entry()
601 vq_free_entry(struct virtqueue *vq, struct vq_entry *qe) in vq_free_entry() argument
605 list_insert_head(&vq->vq_freelist, qe); in vq_free_entry()
638 virtio_ve_set(struct vq_entry *qe, uint64_t paddr, uint32_t len, in virtio_ve_set() argument
641 virtio_ve_set_desc(qe->qe_desc, paddr, len, write); in virtio_ve_set()
645 virtio_ve_indirect_available(struct vq_entry *qe) in virtio_ve_indirect_available() argument
647 return (qe->qe_queue->vq_indirect_num - (qe->qe_indirect_next - 1)); in virtio_ve_indirect_available()
651 virtio_ve_add_indirect_buf(struct vq_entry *qe, uint64_t paddr, uint32_t len, in virtio_ve_add_indirect_buf() argument
656 ASSERT(qe->qe_queue->vq_indirect_num); in virtio_ve_add_indirect_buf()
657 ASSERT(qe->qe_indirect_next < qe->qe_queue->vq_indirect_num); in virtio_ve_add_indirect_buf()
659 indirect_desc = &qe->qe_indirect_descs[qe->qe_indirect_next]; in virtio_ve_add_indirect_buf()
661 qe->qe_indirect_next++; in virtio_ve_add_indirect_buf()
665 virtio_ve_add_cookie(struct vq_entry *qe, ddi_dma_handle_t dma_handle, in virtio_ve_add_cookie() argument
671 virtio_ve_add_indirect_buf(qe, dma_cookie.dmac_laddress, in virtio_ve_add_cookie()
703 virtio_push_chain(struct vq_entry *qe, boolean_t sync) in virtio_push_chain() argument
705 struct virtqueue *vq = qe->qe_queue; in virtio_push_chain()
706 struct vq_entry *head = qe; in virtio_push_chain()
710 ASSERT(qe); in virtio_push_chain()
718 if (qe->qe_indirect_next > 1) { in virtio_push_chain()
725 virtio_ve_set_desc(qe->qe_desc, in virtio_push_chain()
726 qe->qe_indirect_dma_cookie.dmac_laddress, in virtio_push_chain()
727 sizeof (struct vring_desc) * qe->qe_indirect_next, in virtio_push_chain()
729 qe->qe_desc->flags |= VRING_DESC_F_INDIRECT; in virtio_push_chain()
733 desc = &qe->qe_indirect_descs[i]; in virtio_push_chain()
738 } while (i < qe->qe_indirect_next - 1); in virtio_push_chain()
742 if (qe->qe_next) { in virtio_push_chain()
743 qe->qe_desc->flags |= VRING_DESC_F_NEXT; in virtio_push_chain()
744 qe->qe_desc->next = qe->qe_next->qe_index; in virtio_push_chain()
747 qe = qe->qe_next; in virtio_push_chain()
748 } while (qe); in virtio_push_chain()
801 virtio_free_chain(struct vq_entry *qe) in virtio_free_chain() argument
804 struct virtqueue *vq = qe->qe_queue; in virtio_free_chain()
806 ASSERT(qe); in virtio_free_chain()
809 ASSERT(qe->qe_queue == vq); in virtio_free_chain()
810 tmp = qe->qe_next; in virtio_free_chain()
811 vq_free_entry(vq, qe); in virtio_free_chain()
812 qe = tmp; in virtio_free_chain()