Commit 39286fa4 authored by Sridhar Samudrala's avatar Sridhar Samudrala Committed by Michael S. Tsirkin

vhost-net: restart tx poll on sk_sndbuf full

guest to remote communication with vhost net sometimes stops until
guest driver is restarted. This happens when we get guest kick precisely
when the backend send queue is full, as a result handle_tx() returns without
polling backend. This patch fixes this by restarting tx poll on this condition.
Signed-off-by: default avatarSridhar Samudrala <samudrala@us.ibm.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Tested-by: default avatarTom Lendacky <toml@us.ibm.com>
parent d6db3f5c
......@@ -114,8 +114,12 @@ static void handle_tx(struct vhost_net *net)
return;
wmem = atomic_read(&sock->sk->sk_wmem_alloc);
if (wmem >= sock->sk->sk_sndbuf)
if (wmem >= sock->sk->sk_sndbuf) {
mutex_lock(&vq->mutex);
tx_poll_start(net, sock);
mutex_unlock(&vq->mutex);
return;
}
use_mm(net->dev.mm);
mutex_lock(&vq->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment