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

Function vq_update_avail_ring

dpdk/drivers/crypto/virtio/virtqueue.h:120–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static inline void
121vq_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
137static inline int
138virtqueue_kick_prepare(struct virtqueue *vq)

Calls

no outgoing calls

Tested by

no test coverage detected