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

Function bnxt_cpr_cmp_valid

dpdk/drivers/net/bnxt/bnxt_cpr.h:124–137  ·  view source on GitHub ↗

* Check validity of a completion ring entry. If the entry is valid, include a * C11 __ATOMIC_ACQUIRE fence to ensure that subsequent loads of fields in the * completion are not hoisted by the compiler or by the CPU to come before the * loading of the "valid" field. * * Note: the caller must not access any fields in the specified completion * entry prior to calling this function. * * @param

Source from the content-addressed store, hash-verified

122 * Size of completion ring.
123 */
124static __rte_always_inline bool
125bnxt_cpr_cmp_valid(const void *cmpl, uint32_t raw_cons, uint32_t ring_size)
126{
127 const struct cmpl_base *c = cmpl;
128 bool expected, valid;
129
130 expected = !(raw_cons & ring_size);
131 valid = !!(rte_le_to_cpu_32(c->info3_v) & CMPL_BASE_V);
132 if (valid == expected) {
133 rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
134 return true;
135 }
136 return false;
137}
138#endif

Callers 14

recv_burst_vec_avx2Function · 0.85
bnxt_handle_tx_cp_vecFunction · 0.85
bnxt_rx_queue_count_opFunction · 0.85
bnxt_handle_tx_cp_vecFunction · 0.85
bnxt_handle_tx_cpFunction · 0.85
bnxt_flush_tx_cmpFunction · 0.85
bnxt_agg_bufs_validFunction · 0.85
bnxt_rx_pktFunction · 0.85
bnxt_recv_pktsFunction · 0.85
bnxt_flush_rx_cmpFunction · 0.85

Calls 1

rte_atomic_thread_fenceFunction · 0.50

Tested by

no test coverage detected