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

Function virtqueue_fetch_flags_packed

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

Source from the content-addressed store, hash-verified

61}
62
63static inline uint16_t
64virtqueue_fetch_flags_packed(struct vring_packed_desc *dp,
65 uint8_t weak_barriers)
66{
67 uint16_t flags;
68
69 if (weak_barriers) {
70/* x86 prefers to using rte_io_rmb over __atomic_load_n as it reports
71 * a better perf(~1.5%), which comes from the saved branch by the compiler.
72 * The if and else branch are identical on the platforms except Arm.
73 */
74#ifdef RTE_ARCH_ARM
75 flags = __atomic_load_n(&dp->flags, __ATOMIC_ACQUIRE);
76#else
77 flags = dp->flags;
78 rte_io_rmb();
79#endif
80 } else {
81 flags = dp->flags;
82 rte_io_rmb();
83 }
84
85 return flags;
86}
87
88static inline void
89virtqueue_store_flags_packed(struct vring_packed_desc *dp,

Callers 1

desc_is_usedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected