[PATCH] Always notify a virtio_ring when it's full

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I saw that the tx timer was removed in your patch queue but you weren't
notifying when full.  I decided to do it here instead of in the error case on
add_buf for really no great reason other than I thought it made more sense
for it to happen in the notify().

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 7fa1c72..57b7ad3 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -146,7 +146,8 @@ static void vring_kick(struct virtqueue *_vq)
 	/* Need to update avail index before checking if we should notify */
 	mb();
 
-	if (!(vq->vring.used->flags & VRING_USED_F_NO_NOTIFY))
+	/* Always notify when the queue is full */
+	if (!(vq->vring.used->flags & VRING_USED_F_NO_NOTIFY) || !vq->num_free)
 		/* Prod other side to tell it about changes. */
 		vq->notify(&vq->vq);
 
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux