* 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. */
| 34 | * barriers. |
| 35 | */ |
| 36 | static inline void |
| 37 | virtio_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 | |
| 45 | static inline void |
| 46 | virtio_rmb(uint8_t weak_barriers) |
no test coverage detected