lguest: net block unneeded receive queue update notifications

Number of exits transmitting 10GB Guest->Host before:
	network xmit 7858610 recv 118136

After:
	network xmit 7750233 recv 1

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 Documentation/lguest/lguest.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -r d93f042abfbd Documentation/lguest/lguest.c
--- a/Documentation/lguest/lguest.c	Mon Jun 23 15:30:19 2008 +1000
+++ b/Documentation/lguest/lguest.c	Mon Jun 23 15:49:38 2008 +1000
@@ -933,6 +933,11 @@ static bool handle_tun_input(int fd, str
 		/* FIXME: Actually want DRIVER_ACTIVE here. */
 		if (dev->desc->status & VIRTIO_CONFIG_S_DRIVER_OK)
 			warn("network: no dma buffer!");
+
+		/* Now tell it we want to know if new things appear. */
+		dev->vq->vring.used->flags &= ~VRING_USED_F_NO_NOTIFY;
+		wmb();
+
 		/* We'll turn this back on if input buffers are registered. */
 		return false;
 	} else if (out_num)
@@ -971,6 +976,8 @@ static void enable_fd(int fd, struct vir
 
 static void net_enable_fd(int fd, struct virtqueue *vq)
 {
+	/* We don't need to know again when Guest refills receive buffer. */
+	vq->vring.used->flags |= VRING_USED_F_NO_NOTIFY;
 	net_recv_notify++;
 	add_device_fd(vq->dev->fd);
 	/* Tell waker to listen to it again */
