summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_rxtx.c
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2018-01-25 13:02:50 -0800
committerThomas Monjalon <thomas@monjalon.net>2018-01-28 08:30:36 +0100
commit1742c2d9fab07e66209f2d14e7daa50829fc4423 (patch)
treed2060a9091a45d9e1745c47134bf77902ab17009 /drivers/net/mlx5/mlx5_rxtx.c
parent4fe7f662ac5c71c8433d96e16b144719924dfceb (diff)
downloaddpdk-1742c2d9fab07e66209f2d14e7daa50829fc4423.zip
dpdk-1742c2d9fab07e66209f2d14e7daa50829fc4423.tar.gz
dpdk-1742c2d9fab07e66209f2d14e7daa50829fc4423.tar.xz
net/mlx5: fix synchronization on polling Rx completions
Polling a new packet is basically sensing the generation bit in a completion entry. For some processors not having strongly-ordered memory model, there has to be a memory barrier between reading the generation bit and other fields of the entry in order to guarantee data is not stale. Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.c')
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 7a24d67..8e46361 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1669,6 +1669,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
return 0;
++rxq->cq_ci;
op_own = cqe->op_own;
+ rte_cio_rmb();
if (MLX5_CQE_FORMAT(op_own) == MLX5_COMPRESSED) {
volatile struct mlx5_mini_cqe8 (*mc)[8] =
(volatile struct mlx5_mini_cqe8 (*)[8])