Lines Matching refs:vq
76 struct virtqueue *vq; member
88 struct virtqueue *vq; member
172 static int vq2txq(struct virtqueue *vq) in vq2txq() argument
174 return (vq->index - 1) / 2; in vq2txq()
182 static int vq2rxq(struct virtqueue *vq) in vq2rxq() argument
184 return vq->index / 2; in vq2rxq()
224 static void skb_xmit_done(struct virtqueue *vq) in skb_xmit_done() argument
226 struct virtnet_info *vi = vq->vdev->priv; in skb_xmit_done()
229 virtqueue_disable_cb(vq); in skb_xmit_done()
232 netif_wake_subqueue(vi->dev, vq2txq(vq)); in skb_xmit_done()
380 ctx = (unsigned long)virtqueue_get_buf(rq->vq, &len); in receive_mergeable()
430 ctx = (unsigned long)virtqueue_get_buf(rq->vq, &len); in receive_mergeable()
566 err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); in add_recvbuf_small()
614 err = virtqueue_add_inbuf(rq->vq, rq->sg, MAX_SKB_FRAGS + 2, in add_recvbuf_big()
660 err = virtqueue_add_inbuf(rq->vq, rq->sg, 1, (void *)ctx, gfp); in add_recvbuf_mergeable()
692 } while (rq->vq->num_free); in try_fill_recv()
693 virtqueue_kick(rq->vq); in try_fill_recv()
718 virtqueue_disable_cb(rq->vq); in virtnet_napi_enable()
749 struct virtnet_info *vi = rq->vq->vdev->priv; in virtnet_receive()
754 (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) { in virtnet_receive()
759 if (rq->vq->num_free > virtqueue_get_vring_size(rq->vq) / 2) { in virtnet_receive()
777 r = virtqueue_enable_cb_prepare(rq->vq); in virtnet_poll()
779 if (unlikely(virtqueue_poll(rq->vq, r)) && in virtnet_poll()
781 virtqueue_disable_cb(rq->vq); in virtnet_poll()
795 struct virtnet_info *vi = rq->vq->vdev->priv; in virtnet_busy_poll()
804 virtqueue_disable_cb(rq->vq); in virtnet_busy_poll()
809 r = virtqueue_enable_cb_prepare(rq->vq); in virtnet_busy_poll()
811 if (unlikely(virtqueue_poll(rq->vq, r)) && in virtnet_busy_poll()
813 virtqueue_disable_cb(rq->vq); in virtnet_busy_poll()
846 struct virtnet_info *vi = sq->vq->vdev->priv; in free_old_xmit_skbs()
849 while ((skb = virtqueue_get_buf(sq->vq, &len)) != NULL) { in free_old_xmit_skbs()
865 struct virtnet_info *vi = sq->vq->vdev->priv; in xmit_skb()
930 return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, GFP_ATOMIC); in xmit_skb()
976 if (sq->vq->num_free < 2+MAX_SKB_FRAGS) { in start_xmit()
978 if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { in start_xmit()
981 if (sq->vq->num_free >= 2+MAX_SKB_FRAGS) { in start_xmit()
983 virtqueue_disable_cb(sq->vq); in start_xmit()
989 virtqueue_kick(sq->vq); in start_xmit()
1277 virtqueue_set_affinity(vi->rq[i].vq, -1); in virtnet_clean_affinity()
1278 virtqueue_set_affinity(vi->sq[i].vq, -1); in virtnet_clean_affinity()
1302 virtqueue_set_affinity(vi->rq[i].vq, cpu); in virtnet_set_affinity()
1303 virtqueue_set_affinity(vi->sq[i].vq, cpu); in virtnet_set_affinity()
1337 ring->rx_max_pending = virtqueue_get_vring_size(vi->rq[0].vq); in virtnet_get_ringparam()
1338 ring->tx_max_pending = virtqueue_get_vring_size(vi->sq[0].vq); in virtnet_get_ringparam()
1522 struct virtqueue *vq = vi->sq[i].vq; in free_unused_bufs() local
1523 while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) in free_unused_bufs()
1528 struct virtqueue *vq = vi->rq[i].vq; in free_unused_bufs() local
1530 while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) { in free_unused_bufs()
1609 vi->rq[i].vq = vqs[rxq2vq(i)]; in virtnet_find_vqs()
1610 vi->sq[i].vq = vqs[txq2vq(i)]; in virtnet_find_vqs()
1900 if (vi->rq[i].vq->num_free == in virtnet_probe()
1901 virtqueue_get_vring_size(vi->rq[i].vq)) { in virtnet_probe()