diff options
| author | Arseniy Krasnov <avkrasnov@salutedevices.com> | 2023-12-14 15:52:29 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-25 15:35:26 -0800 |
| commit | 94e5f64283a16d6b9eda82e0ebb9ec477a6c2ef6 (patch) | |
| tree | 1d1f953647fcffee39dfe9ebf5f2213f319dcb6f /drivers/vhost | |
| parent | 925c22d438350db9e5d669ce296f213328ced74e (diff) | |
| download | linux-94e5f64283a16d6b9eda82e0ebb9ec477a6c2ef6.tar.gz linux-94e5f64283a16d6b9eda82e0ebb9ec477a6c2ef6.tar.bz2 linux-94e5f64283a16d6b9eda82e0ebb9ec477a6c2ef6.zip | |
virtio/vsock: send credit update during setting SO_RCVLOWAT
[ Upstream commit 0fe1798968115488c0c02f4633032a015b1faf97 ]
Send credit update message when SO_RCVLOWAT is updated and it is bigger
than number of bytes in rx queue. It is needed, because 'poll()' will
wait until number of bytes in rx queue will be not smaller than
O_RCVLOWAT, so kick sender to send more data. Otherwise mutual hungup
for tx/rx is possible: sender waits for free space and receiver is
waiting data in 'poll()'.
Rename 'set_rcvlowat' callback to 'notify_set_rcvlowat' and set
'sk->sk_rcvlowat' only in one place (i.e. 'vsock_set_rcvlowat'), so the
transport doesn't need to do it.
Fixes: b89d882dc9fc ("vsock/virtio: reduce credit update messages")
Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/vhost')
| -rw-r--r-- | drivers/vhost/vsock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 817d377a3f36..61255855d490 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -438,6 +438,7 @@ static struct virtio_transport vhost_transport = { .notify_send_pre_enqueue = virtio_transport_notify_send_pre_enqueue, .notify_send_post_enqueue = virtio_transport_notify_send_post_enqueue, .notify_buffer_size = virtio_transport_notify_buffer_size, + .notify_set_rcvlowat = virtio_transport_notify_set_rcvlowat, .read_skb = virtio_transport_read_skb, }, |
