vhost: fix interrupt mitigation with raw sockets
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 8 Mar 2010 21:24:22 +0000 (23:24 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 17 Mar 2010 14:44:20 +0000 (16:44 +0200)
A thinko in code means we never trigger interrupt
mitigation. Fix this.

Reported-by: Juan Quintela <quintela@redhat.com>
Reported-by: Unai Uribarri <unai.uribarri@optenet.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/net.c

index fcafb6b170fb8a8a93c2c36140646bf544c90683..a6a88dfd5029e87d13c141d6482f0efc8e085489 100644 (file)
@@ -125,7 +125,7 @@ static void handle_tx(struct vhost_net *net)
        mutex_lock(&vq->mutex);
        vhost_disable_notify(vq);
 
-       if (wmem < sock->sk->sk_sndbuf * 2)
+       if (wmem < sock->sk->sk_sndbuf / 2)
                tx_poll_stop(net);
        hdr_size = vq->hdr_size;