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

Function check_cqe_error

dpdk/drivers/common/mlx5/mlx5_common.h:192–204  ·  view source on GitHub ↗

* Check whether CQE has an error opcode. * * @param op_code * Opcode to check. * * @return * The CQE status. */

Source from the content-addressed store, hash-verified

190 * The CQE status.
191 */
192static __rte_always_inline enum mlx5_cqe_status
193check_cqe_error(const uint8_t op_code)
194{
195 /* Prevent speculative reading of other fields in CQE until
196 * CQE is valid.
197 */
198 rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
199
200 if (unlikely(op_code == MLX5_CQE_RESP_ERR ||
201 op_code == MLX5_CQE_REQ_ERR))
202 return MLX5_CQE_STATUS_ERR;
203 return MLX5_CQE_STATUS_SW_OWN;
204}
205
206/**
207 * Check whether CQE is valid using owner bit.

Callers 2

check_cqeFunction · 0.85
check_cqe_iterationFunction · 0.85

Calls 1

rte_atomic_thread_fenceFunction · 0.50

Tested by

no test coverage detected