| 474 | } |
| 475 | |
| 476 | static inline void |
| 477 | vq_update_avail_ring(struct virtqueue *vq, uint16_t desc_idx) |
| 478 | { |
| 479 | uint16_t avail_idx; |
| 480 | /* |
| 481 | * Place the head of the descriptor chain into the next slot and make |
| 482 | * it usable to the host. The chain is made available now rather than |
| 483 | * deferring to virtqueue_notify() in the hopes that if the host is |
| 484 | * currently running on another CPU, we can keep it processing the new |
| 485 | * descriptor. |
| 486 | */ |
| 487 | avail_idx = (uint16_t)(vq->vq_avail_idx & (vq->vq_nentries - 1)); |
| 488 | if (unlikely(vq->vq_split.ring.avail->ring[avail_idx] != desc_idx)) |
| 489 | vq->vq_split.ring.avail->ring[avail_idx] = desc_idx; |
| 490 | vq->vq_avail_idx++; |
| 491 | } |
| 492 | |
| 493 | static inline int |
| 494 | virtqueue_kick_prepare(struct virtqueue *vq) |
no outgoing calls
no test coverage detected