summaryrefslogtreecommitdiffstats
path: root/net/vmw_vsock/vsock_loopback.c
diff options
context:
space:
mode:
authorArseniy Krasnov <avkrasnov@salutedevices.com>2023-12-14 15:52:29 +0300
committerDavid S. Miller <davem@davemloft.net>2023-12-15 10:37:35 +0000
commit0fe1798968115488c0c02f4633032a015b1faf97 (patch)
tree93c1841ec7259c8be1b0ef2636440c4858f8ff10 /net/vmw_vsock/vsock_loopback.c
parent93b80887668226180ea5f5349cc728ca6dc700ab (diff)
downloadlinux-0fe1798968115488c0c02f4633032a015b1faf97.tar.gz
linux-0fe1798968115488c0c02f4633032a015b1faf97.tar.bz2
linux-0fe1798968115488c0c02f4633032a015b1faf97.zip
virtio/vsock: send credit update during setting SO_RCVLOWAT
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>
Diffstat (limited to 'net/vmw_vsock/vsock_loopback.c')
-rw-r--r--net/vmw_vsock/vsock_loopback.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c
index 048640167411..6dea6119f5b2 100644
--- a/net/vmw_vsock/vsock_loopback.c
+++ b/net/vmw_vsock/vsock_loopback.c
@@ -96,6 +96,7 @@ static struct virtio_transport loopback_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,
},