From: Michael S. Tsirkin Date: Mon, 8 Mar 2010 21:24:22 +0000 (+0200) Subject: vhost: fix interrupt mitigation with raw sockets X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0e255572121180c900e24e33b87047abd8153cce;p=openwrt%2Fstaging%2Fblogic.git vhost: fix interrupt mitigation with raw sockets A thinko in code means we never trigger interrupt mitigation. Fix this. Reported-by: Juan Quintela Reported-by: Unai Uribarri Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index fcafb6b170fb..a6a88dfd5029 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;