Lines Matching refs:vring

51 	vring_init(&q->tx.vring, vring_desc_len, q->tx.shmem, ETH_IVSHMEM_VRING_ALIGNMENT);  in eth_ivshmem_queue_init()
52 vring_init(&q->rx.vring, vring_desc_len, q->rx.shmem, ETH_IVSHMEM_VRING_ALIGNMENT); in eth_ivshmem_queue_init()
58 struct vring_used *tmp_used = q->tx.vring.used; in eth_ivshmem_queue_init()
60 q->tx.vring.used = q->rx.vring.used; in eth_ivshmem_queue_init()
61 q->rx.vring.used = tmp_used; in eth_ivshmem_queue_init()
85 for (unsigned int i = 0; i < q->tx.vring.num - 1; i++) { in eth_ivshmem_queue_reset()
86 q->tx.vring.desc[i].next = i + 1; in eth_ivshmem_queue_reset()
88 q->tx.vring.desc[q->tx.vring.num - 1].next = 0; in eth_ivshmem_queue_reset()
112 struct vring_desc *tx_desc = &q->tx.vring.desc[q->tx.desc_head]; in eth_ivshmem_queue_tx_get_buff()
142 q->tx.vring.avail->ring[q->tx.avail_idx % q->desc_max_len] = desc_head; in eth_ivshmem_queue_tx_commit_buff()
144 VRING_FLUSH(q->tx.vring.avail->ring[q->tx.avail_idx % q->desc_max_len]); in eth_ivshmem_queue_tx_commit_buff()
148 q->tx.vring.avail->idx = q->tx.avail_idx; in eth_ivshmem_queue_tx_commit_buff()
150 VRING_FLUSH(q->tx.vring.avail->idx); in eth_ivshmem_queue_tx_commit_buff()
169 struct vring_desc *desc = &q->rx.vring.desc[avail_desc_idx]; in eth_ivshmem_queue_rx()
200 q->rx.vring.used->ring[used_idx].id = avail_desc_idx; in eth_ivshmem_queue_rx_complete()
201 q->rx.vring.used->ring[used_idx].len = 1; in eth_ivshmem_queue_rx_complete()
202 VRING_FLUSH(q->rx.vring.used->ring[used_idx]); in eth_ivshmem_queue_rx_complete()
205 q->rx.vring.used->idx = q->rx.used_idx; in eth_ivshmem_queue_rx_complete()
206 VRING_FLUSH(q->rx.vring.used->idx); in eth_ivshmem_queue_rx_complete()
210 vring_avail_event(&q->rx.vring) = q->rx.avail_idx; in eth_ivshmem_queue_rx_complete()
211 VRING_FLUSH(vring_avail_event(&q->rx.vring)); in eth_ivshmem_queue_rx_complete()
270 VRING_INVALIDATE(q->tx.vring.used->idx); in tx_clean_used()
271 if (q->tx.used_idx == q->tx.vring.used->idx) { in tx_clean_used()
275 struct vring_used_elem *used = &q->tx.vring.used->ring[ in tx_clean_used()
285 struct vring_desc *desc = &q->tx.vring.desc[used->id]; in tx_clean_used()
310 VRING_INVALIDATE(q->rx.vring.avail->idx); in get_rx_avail_desc_idx()
312 uint16_t avail_idx = q->rx.vring.avail->idx; in get_rx_avail_desc_idx()
318 VRING_INVALIDATE(q->rx.vring.avail->ring[q->rx.avail_idx % q->desc_max_len]); in get_rx_avail_desc_idx()
319 *avail_desc_idx = q->rx.vring.avail->ring[q->rx.avail_idx % q->desc_max_len]; in get_rx_avail_desc_idx()