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

Function virtqueue_store_flags_packed

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

Source from the content-addressed store, hash-verified

86}
87
88static inline void
89virtqueue_store_flags_packed(struct vring_packed_desc *dp,
90 uint16_t flags, uint8_t weak_barriers)
91{
92 if (weak_barriers) {
93/* x86 prefers to using rte_io_wmb over __atomic_store_n as it reports
94 * a better perf(~1.5%), which comes from the saved branch by the compiler.
95 * The if and else branch are identical on the platforms except Arm.
96 */
97#ifdef RTE_ARCH_ARM
98 __atomic_store_n(&dp->flags, flags, __ATOMIC_RELEASE);
99#else
100 rte_io_wmb();
101 dp->flags = flags;
102#endif
103 } else {
104 rte_io_wmb();
105 dp->flags = flags;
106 }
107}
108
109#ifdef RTE_PMD_PACKET_PREFETCH
110#define rte_packet_prefetch(p) rte_prefetch1(p)

Calls

no outgoing calls

Tested by

no test coverage detected