Blame SOURCES/dpdk-dev-vhost-flush-used--idx-update-before-reading-avail--flags.patch

15b5e9
diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c
15b5e9
index 510ffe8..6afba35 100644
15b5e9
--- a/lib/librte_vhost/vhost_rxtx.c
15b5e9
+++ b/lib/librte_vhost/vhost_rxtx.c
15b5e9
@@ -178,6 +178,9 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,
15b5e9
 	*(volatile uint16_t *)&vq->used->idx += count;
15b5e9
 	vq->last_used_idx = res_end_idx;
15b5e9
 
15b5e9
+	/* flush used->idx update before we read avail->flags. */
15b5e9
+	rte_mb();
15b5e9
+
15b5e9
 	/* Kick the guest if necessary. */
15b5e9
 	if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT))
15b5e9
 		eventfd_write((int)vq->callfd, 1);