Skip to content
Snippets Groups Projects
Commit 9dcf799d authored by Honnappa Nagarahalli's avatar Honnappa Nagarahalli Committed by Xueming Li
Browse files

common/mlx5: use just sufficient barrier for Arm


cqe->op_own indicates if the CQE is owned by the NIC.
The rest of the fields in CQE should be read only after op_own is read.
On Arm platforms using "dmb ishld" is sufficient to enforce this.

Fixes: 88c07335 ("net/mlx5: extend Rx completion with error handling")
Cc: stable@dpdk.org

Signed-off-by: default avatarHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: default avatarRuifeng Wang <ruifeng.wang@arm.com>
Acked-by: default avatarViacheslav Ovsiienko <viacheslavo@nvidia.com>
parent 69401593
No related branches found
Tags
No related merge requests found
......@@ -203,7 +203,12 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
if (unlikely((op_owner != (!!(idx))) || (op_code == MLX5_CQE_INVALID)))
return MLX5_CQE_STATUS_HW_OWN;
rte_io_rmb();
/* Prevent speculative reading of other fields in CQE until
* CQE is valid.
*/
rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
if (unlikely(op_code == MLX5_CQE_RESP_ERR ||
op_code == MLX5_CQE_REQ_ERR))
return MLX5_CQE_STATUS_ERR;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment