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

Function virtio_mb

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

* Per virtio_ring.h in Linux. * For virtio_pci on SMP, we don't need to order with respect to MMIO * accesses through relaxed memory I/O windows, so thread_fence is * sufficient. * * For using virtio to talk to real devices (eg. vDPA) we do need real * barriers. */

Source from the content-addressed store, hash-verified

34 * barriers.
35 */
36static inline void
37virtio_mb(uint8_t weak_barriers)
38{
39 if (weak_barriers)
40 rte_atomic_thread_fence(__ATOMIC_SEQ_CST);
41 else
42 rte_mb();
43}
44
45static inline void
46virtio_rmb(uint8_t weak_barriers)

Callers 3

virtqueue_kick_prepareFunction · 0.85

Calls 1

rte_atomic_thread_fenceFunction · 0.50

Tested by

no test coverage detected