MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vq_update_avail_ring

Function vq_update_avail_ring

dpdk/drivers/net/virtio/virtqueue.h:476–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476static inline void
477vq_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
493static inline int
494virtqueue_kick_prepare(struct virtqueue *vq)

Calls

no outgoing calls

Tested by

no test coverage detected