summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_rxtx.h
diff options
context:
space:
mode:
authorDekel Peled <dekelp@mellanox.com>2019-02-28 17:20:30 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-03-08 17:52:22 +0100
commitfd350d3c9a13b5ebcb41741870c3f09b6920033f (patch)
tree594c97d0d65c8a86c983696ffdc07c9e9356230d /drivers/net/mlx5/mlx5_rxtx.h
parent38f0a160b5fe1c9e8451dea2cab9a78ebfe86675 (diff)
downloaddpdk-fd350d3c9a13b5ebcb41741870c3f09b6920033f.zip
dpdk-fd350d3c9a13b5ebcb41741870c3f09b6920033f.tar.gz
dpdk-fd350d3c9a13b5ebcb41741870c3f09b6920033f.tar.xz
net/mlx5: fix sync when handling Tx completions
Function mlx5_tx_complete() reads completion entry information from Tx queue. For some processors not having strongly-ordered memory model, there has to be a memory barrier between reading the entry index and the entry fields, in order to guarantee data is valid. Fixes: 54d3fe948dba ("net/mlx5: poll completion queue once per a call") Cc: stable@dpdk.org Signed-off-by: Dekel Peled <dekelp@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.h')
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index c0e1adf..53115dd 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -568,6 +568,7 @@ mlx5_tx_complete(struct mlx5_txq_data *txq)
}
#endif /* NDEBUG */
++cq_ci;
+ rte_cio_rmb();
txq->wqe_pi = rte_be_to_cpu_16(cqe->wqe_counter);
ctrl = (volatile struct mlx5_wqe_ctrl *)
tx_mlx5_wqe(txq, txq->wqe_pi);