Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
New upstream version 18.11.1
[deb_dpdk.git]
/
drivers
/
net
/
virtio
/
virtqueue.h
diff --git
a/drivers/net/virtio/virtqueue.h
b/drivers/net/virtio/virtqueue.h
index
26518ed
..
2e2abf1
100644
(file)
--- a/
drivers/net/virtio/virtqueue.h
+++ b/
drivers/net/virtio/virtqueue.h
@@
-336,6
+336,11
@@
vq_update_avail_ring(struct virtqueue *vq, uint16_t desc_idx)
static inline int
virtqueue_kick_prepare(struct virtqueue *vq)
{
+ /*
+ * Ensure updated avail->idx is visible to vhost before reading
+ * the used->flags.
+ */
+ virtio_mb();
return !(vq->vq_ring.used->flags & VRING_USED_F_NO_NOTIFY);
}