git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vhost: relax full barriers for desc flags
[dpdk.git]
/
lib
/
librte_vhost
/
virtio_net.c
diff --git
a/lib/librte_vhost/virtio_net.c
b/lib/librte_vhost/virtio_net.c
index
c912ae3
..
b779034
100644
(file)
--- a/
lib/librte_vhost/virtio_net.c
+++ b/
lib/librte_vhost/virtio_net.c
@@
-222,8
+222,9
@@
vhost_flush_dequeue_shadow_packed(struct virtio_net *dev,
struct vring_used_elem_packed *used_elem = &vq->shadow_used_packed[0];
vq->desc_packed[vq->shadow_last_used_idx].id = used_elem->id;
struct vring_used_elem_packed *used_elem = &vq->shadow_used_packed[0];
vq->desc_packed[vq->shadow_last_used_idx].id = used_elem->id;
- rte_smp_wmb();
- vq->desc_packed[vq->shadow_last_used_idx].flags = used_elem->flags;
+ /* desc flags is the synchronization point for virtio packed vring */
+ __atomic_store_n(&vq->desc_packed[vq->shadow_last_used_idx].flags,
+ used_elem->flags, __ATOMIC_RELEASE);
vhost_log_cache_used_vring(dev, vq, vq->shadow_last_used_idx *
sizeof(struct vring_packed_desc),
vhost_log_cache_used_vring(dev, vq, vq->shadow_last_used_idx *
sizeof(struct vring_packed_desc),