Lines Matching refs:nvq

242 	struct vhost_net_virtqueue *nvq =  in vhost_zerocopy_signal_used()  local
247 for (i = nvq->done_idx; i != nvq->upend_idx; i = (i + 1) % UIO_MAXIOV) { in vhost_zerocopy_signal_used()
257 add = min(UIO_MAXIOV - nvq->done_idx, j); in vhost_zerocopy_signal_used()
259 &vq->heads[nvq->done_idx], add); in vhost_zerocopy_signal_used()
260 nvq->done_idx = (nvq->done_idx + add) % UIO_MAXIOV; in vhost_zerocopy_signal_used()
295 struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; in handle_tx() local
296 struct vhost_virtqueue *vq = &nvq->vq; in handle_tx()
320 hdr_size = nvq->vhost_hlen; in handle_tx()
321 zcopy = nvq->ubufs; in handle_tx()
331 if (unlikely((nvq->upend_idx + vq->num - VHOST_MAX_PEND) in handle_tx()
332 % UIO_MAXIOV == nvq->done_idx)) in handle_tx()
369 && (nvq->upend_idx + 1) % UIO_MAXIOV != in handle_tx()
370 nvq->done_idx in handle_tx()
376 ubuf = nvq->ubuf_info + nvq->upend_idx; in handle_tx()
378 vq->heads[nvq->upend_idx].id = cpu_to_vhost32(vq, head); in handle_tx()
379 vq->heads[nvq->upend_idx].len = VHOST_DMA_IN_PROGRESS; in handle_tx()
381 ubuf->ctx = nvq->ubufs; in handle_tx()
382 ubuf->desc = nvq->upend_idx; in handle_tx()
385 ubufs = nvq->ubufs; in handle_tx()
387 nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV; in handle_tx()
397 nvq->upend_idx = ((unsigned)nvq->upend_idx - 1) in handle_tx()
520 struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX]; in handle_rx() local
521 struct vhost_virtqueue *vq = &nvq->vq; in handle_rx()
550 vhost_hlen = nvq->vhost_hlen; in handle_rx()
551 sock_hlen = nvq->sock_hlen; in handle_rx()
721 struct vhost_net_virtqueue *nvq = in vhost_net_disable_vq() local
723 struct vhost_poll *poll = n->poll + (nvq - n->vqs); in vhost_net_disable_vq()
732 struct vhost_net_virtqueue *nvq = in vhost_net_enable_vq() local
734 struct vhost_poll *poll = n->poll + (nvq - n->vqs); in vhost_net_enable_vq()
881 struct vhost_net_virtqueue *nvq; in vhost_net_set_backend() local
895 nvq = &n->vqs[index]; in vhost_net_set_backend()
928 oldubufs = nvq->ubufs; in vhost_net_set_backend()
929 nvq->ubufs = ubufs; in vhost_net_set_backend()