| 118 | } |
| 119 | |
| 120 | static inline void |
| 121 | vq_update_avail_ring(struct virtqueue *vq, uint16_t desc_idx) |
| 122 | { |
| 123 | uint16_t avail_idx; |
| 124 | /* |
| 125 | * Place the head of the descriptor chain into the next slot and make |
| 126 | * it usable to the host. The chain is made available now rather than |
| 127 | * deferring to virtqueue_notify() in the hopes that if the host is |
| 128 | * currently running on another CPU, we can keep it processing the new |
| 129 | * descriptor. |
| 130 | */ |
| 131 | avail_idx = (uint16_t)(vq->vq_avail_idx & (vq->vq_nentries - 1)); |
| 132 | if (unlikely(vq->vq_ring.avail->ring[avail_idx] != desc_idx)) |
| 133 | vq->vq_ring.avail->ring[avail_idx] = desc_idx; |
| 134 | vq->vq_avail_idx++; |
| 135 | } |
| 136 | |
| 137 | static inline int |
| 138 | virtqueue_kick_prepare(struct virtqueue *vq) |
no outgoing calls
no test coverage detected