Lines Matching defs:vq
44 #define virtio_notify(vsc, vq) virtio_enqueue_commit(vsc, vq, -1, true)
140 int viocon_tx_drain(struct viocon_port *, struct virtqueue *vq);
328 viocon_tx_drain(struct viocon_port *vp, struct virtqueue *vq)
330 struct virtio_softc *vsc = vq->vq_owner;
334 while (virtio_dequeue(vsc, vq, &slot, &len) == 0) {
338 virtio_dequeue_commit(vsc, vq, slot);
345 viocon_tx_intr(struct virtqueue *vq)
347 struct virtio_softc *vsc = vq->vq_owner;
350 int portidx = (vq->vq_index - 1) / 2;
355 ndone = viocon_tx_drain(vp, vq);
367 struct virtqueue *vq = vp->vp_rx;
371 while ((r = virtio_enqueue_prep(vsc, vq, &slot)) == 0) {
372 if (virtio_enqueue_reserve(vsc, vq, slot, 1) != 0)
376 virtio_enqueue_p(vsc, vq, slot, vp->vp_dmamap, slot * BUFSIZE,
378 virtio_enqueue_commit(vsc, vq, slot, 0);
383 virtio_notify(vsc, vq);
387 viocon_rx_intr(struct virtqueue *vq)
389 struct virtio_softc *vsc = vq->vq_owner;
391 int portidx = (vq->vq_index - 1) / 2;
402 struct virtqueue *vq = vp->vp_rx;
403 struct virtio_softc *vsc = vq->vq_owner;
408 while (!vp->vp_iflow && virtio_dequeue(vsc, vq, &slot, &len) == 0) {
414 virtio_dequeue_commit(vsc, vq, slot);
428 struct virtqueue *vq;
433 vq = vp->vp_tx;
437 ndone = viocon_tx_drain(vp, vq);
452 ret = virtio_enqueue_prep(vsc, vq, &slot);
458 ret = virtio_enqueue_reserve(vsc, vq, slot, 1);
465 virtio_enqueue_p(vsc, vq, slot, vp->vp_dmamap,
467 virtio_enqueue_commit(vsc, vq, slot, 0);
471 virtio_notify(vsc, vq);