* Check whether CQE has an error opcode. * * @param op_code * Opcode to check. * * @return * The CQE status. */
| 190 | * The CQE status. |
| 191 | */ |
| 192 | static __rte_always_inline enum mlx5_cqe_status |
| 193 | check_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. |
no test coverage detected