summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-11-23 14:56:55 +0100
committerFlorin Coras <florin.coras@gmail.com>2018-11-23 16:52:39 +0000
commit96e8cd0e1d6c21e5f47470c146958a9845ee29a6 (patch)
tree606082e01f2ce353f15fc0e28328a29ab5386ef0 /src
parente61ad8d6c49d6c2fb30d29b446f6e6603c8b1de6 (diff)
vhost-user: use memory store barrier
Should be less expensive... Change-Id: I678a39e42a054bf5f6ef9c59d0fb93ff9719b964 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 570f0806772..97303ce3791 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -215,7 +215,7 @@ vhost_user_rx_discard_packet (vlib_main_t * vm,
out:
txvq->last_avail_idx = last_avail_idx;
txvq->last_used_idx = last_used_idx;
- CLIB_MEMORY_BARRIER ();
+ CLIB_MEMORY_STORE_BARRIER ();
txvq->used->idx = txvq->last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
return discarded_packets;
@@ -589,7 +589,7 @@ vhost_user_if_input (vlib_main_t * vm,
copy_len = 0;
/* give buffers back to driver */
- CLIB_MEMORY_BARRIER ();
+ CLIB_MEMORY_STORE_BARRIER ();
txvq->used->idx = last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
}
@@ -609,7 +609,7 @@ stop:
}
/* give buffers back to driver */
- CLIB_MEMORY_BARRIER ();
+ CLIB_MEMORY_STORE_BARRIER ();
txvq->used->idx = txvq->last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);