summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_rxtx.c
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2017-10-09 11:46:54 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-12 01:36:58 +0100
commit9afa3f74658afc0e21fbe5c3884c55a21ff49299 (patch)
tree8507ca8d03e113ec93a03ace8952981cd1776bff /drivers/net/mlx5/mlx5_rxtx.c
parent0887aa7f27f3698b883ebe63abf74484305e71c4 (diff)
downloaddpdk-9afa3f74658afc0e21fbe5c3884c55a21ff49299.zip
dpdk-9afa3f74658afc0e21fbe5c3884c55a21ff49299.tar.gz
dpdk-9afa3f74658afc0e21fbe5c3884c55a21ff49299.tar.xz
net/mlx5: cleanup memory barriers
Updating a consumer index to HW doesn't require a memory barrier in case that there's no updated data to be posted to HW, but a compiler barrier is sufficient. rte_wmb() is replaced with rte_io_wmb() when it makes changes visible to HW, not other core. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 9389383..275cd6a 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1928,9 +1928,9 @@ skip:
return 0;
/* Update the consumer index. */
rxq->rq_ci = rq_ci >> sges_n;
- rte_wmb();
+ rte_io_wmb();
*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
- rte_wmb();
+ rte_io_wmb();
*rxq->rq_db = rte_cpu_to_be_32(rxq->rq_ci);
#ifdef MLX5_PMD_SOFT_COUNTERS
/* Increment packets counter. */