Lines Matching refs:nvq

241 	struct vhost_net_virtqueue *nvq =  in vhost_zerocopy_signal_used()  local
246 for (i = nvq->done_idx; i != nvq->upend_idx; i = (i + 1) % UIO_MAXIOV) { in vhost_zerocopy_signal_used()
256 add = min(UIO_MAXIOV - nvq->done_idx, j); in vhost_zerocopy_signal_used()
258 &vq->heads[nvq->done_idx], add); in vhost_zerocopy_signal_used()
259 nvq->done_idx = (nvq->done_idx + add) % UIO_MAXIOV; in vhost_zerocopy_signal_used()
294 struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; in handle_tx() local
295 struct vhost_virtqueue *vq = &nvq->vq; in handle_tx()
319 hdr_size = nvq->vhost_hlen; in handle_tx()
320 zcopy = nvq->ubufs; in handle_tx()
330 if (unlikely((nvq->upend_idx + vq->num - VHOST_MAX_PEND) in handle_tx()
331 % UIO_MAXIOV == nvq->done_idx)) in handle_tx()
368 && (nvq->upend_idx + 1) % UIO_MAXIOV != in handle_tx()
369 nvq->done_idx in handle_tx()
375 ubuf = nvq->ubuf_info + nvq->upend_idx; in handle_tx()
377 vq->heads[nvq->upend_idx].id = cpu_to_vhost32(vq, head); in handle_tx()
378 vq->heads[nvq->upend_idx].len = VHOST_DMA_IN_PROGRESS; in handle_tx()
380 ubuf->ctx = nvq->ubufs; in handle_tx()
381 ubuf->desc = nvq->upend_idx; in handle_tx()
384 ubufs = nvq->ubufs; in handle_tx()
386 nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV; in handle_tx()
396 nvq->upend_idx = ((unsigned)nvq->upend_idx - 1) in handle_tx()
519 struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX]; in handle_rx() local
520 struct vhost_virtqueue *vq = &nvq->vq; in handle_rx()
549 vhost_hlen = nvq->vhost_hlen; in handle_rx()
550 sock_hlen = nvq->sock_hlen; in handle_rx()
720 struct vhost_net_virtqueue *nvq = in vhost_net_disable_vq() local
722 struct vhost_poll *poll = n->poll + (nvq - n->vqs); in vhost_net_disable_vq()
731 struct vhost_net_virtqueue *nvq = in vhost_net_enable_vq() local
733 struct vhost_poll *poll = n->poll + (nvq - n->vqs); in vhost_net_enable_vq()
880 struct vhost_net_virtqueue *nvq; in vhost_net_set_backend() local
894 nvq = &n->vqs[index]; in vhost_net_set_backend()
927 oldubufs = nvq->ubufs; in vhost_net_set_backend()
928 nvq->ubufs = ubufs; in vhost_net_set_backend()