summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-03-08 23:24:22 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-03-17 16:44:20 +0200
commit0e255572121180c900e24e33b87047abd8153cce (patch)
treef28e91b088f7a751ef8349a226e7d7c4c7046756
parent1dace8c801ac531022bd31a7316a6b4351837617 (diff)
vhost: fix interrupt mitigation with raw sockets
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>
-rw-r--r--drivers/vhost/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index fcafb6b170f..a6a88dfd502 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -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;