Lines Matching refs:vq
35 void vring_detach(struct vring_virtqueue *vq, unsigned int head) in vring_detach() argument
37 struct vring *vr = &vq->vring; in vring_detach()
48 vr->desc[i].next = vq->free_head; in vring_detach()
50 vq->free_head = head; in vring_detach()
60 int vring_get_buf(struct vring_virtqueue *vq, unsigned int *len) in vring_get_buf() argument
62 struct vring *vr = &vq->vring; in vring_get_buf()
67 BUG_ON(!vring_more_used(vq)); in vring_get_buf()
69 elem = &vr->used->ring[vq->last_used_idx % vr->num]; in vring_get_buf()
75 ret = vq->vdata[id]; in vring_get_buf()
77 vring_detach(vq, id); in vring_get_buf()
79 vq->last_used_idx++; in vring_get_buf()
84 void vring_add_buf(struct vring_virtqueue *vq, in vring_add_buf() argument
89 struct vring *vr = &vq->vring; in vring_add_buf()
95 head = vq->free_head; in vring_add_buf()
114 vq->free_head = i; in vring_add_buf()
116 vq->vdata[head] = index; in vring_add_buf()
123 void vring_kick(unsigned int ioaddr, struct vring_virtqueue *vq, int num_added) in vring_kick() argument
125 struct vring *vr = &vq->vring; in vring_kick()
132 vp_notify(ioaddr, vq->queue_index); in vring_kick()