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

Function check_cqe

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

* Check whether CQE is valid using owner bit. * * @param cqe * Pointer to CQE. * @param cqes_n * Size of completion queue. * @param ci * Consumer index. * * @return * The CQE status. */

Source from the content-addressed store, hash-verified

217 * The CQE status.
218 */
219static __rte_always_inline enum mlx5_cqe_status
220check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
221 const uint16_t ci)
222{
223 const uint16_t idx = ci & cqes_n;
224 const uint8_t op_own = cqe->op_own;
225 const uint8_t op_owner = MLX5_CQE_OWNER(op_own);
226 const uint8_t op_code = MLX5_CQE_OPCODE(op_own);
227
228 if (unlikely((op_owner != (!!(idx))) ||
229 (op_code == MLX5_CQE_INVALID)))
230 return MLX5_CQE_STATUS_HW_OWN;
231 return check_cqe_error(op_code);
232}
233
234/**
235 * Check whether CQE is valid using validity iteration count.

Callers 15

rx_queue_countFunction · 0.85
mlx5_rx_err_handleFunction · 0.85
mlx5_rx_poll_lenFunction · 0.85
mlx5_aso_pull_completionFunction · 0.85

Calls 1

check_cqe_errorFunction · 0.85

Tested by

no test coverage detected