vhost: relax full barriers for used idx
[dpdk.git] / lib / librte_vhost / vdpa.c
index ae6fdd2..99a926a 100644 (file)
@@ -217,8 +217,8 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
                idx++;
        }
 
-       rte_smp_wmb();
-       vq->used->idx = idx_m;
+       /* used idx is the synchronization point for the split vring */
+       __atomic_store_n(&vq->used->idx, idx_m, __ATOMIC_RELEASE);
 
        if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))
                vring_used_event(s_vring) = idx_m;