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

Function vq_update_avail_idx

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

Source from the content-addressed store, hash-verified

451 uint16_t num);
452
453static inline void
454vq_update_avail_idx(struct virtqueue *vq)
455{
456 if (vq->hw->weak_barriers) {
457 /* x86 prefers to using rte_smp_wmb over __atomic_store_n as
458 * it reports a slightly better perf, which comes from the
459 * saved branch by the compiler.
460 * The if and else branches are identical with the smp and
461 * io barriers both defined as compiler barriers on x86.
462 */
463#ifdef RTE_ARCH_X86_64
464 rte_smp_wmb();
465 vq->vq_split.ring.avail->idx = vq->vq_avail_idx;
466#else
467 __atomic_store_n(&vq->vq_split.ring.avail->idx,
468 vq->vq_avail_idx, __ATOMIC_RELEASE);
469#endif
470 } else {
471 rte_io_wmb();
472 vq->vq_split.ring.avail->idx = vq->vq_avail_idx;
473 }
474}
475
476static inline void
477vq_update_avail_ring(struct virtqueue *vq, uint16_t desc_idx)

Callers 8

virtio_recv_pktsFunction · 0.70
virtio_recv_pkts_inorderFunction · 0.70
virtio_xmit_pktsFunction · 0.70
virtio_xmit_pkts_inorderFunction · 0.70
virtio_rxq_rearm_vecFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected