OpenCloudOS-Kernel/drivers/vhost
Arseniy Krasnov 94e5f64283 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: b89d882dc9 ("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>
2024-01-25 15:35:26 -08:00
..
Kconfig vhost_task: Allow vhost layer to use copy_process 2023-03-23 12:45:36 +01:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
iotlb.c vhost_iotlb: split out IOTLB initialization 2022-05-31 12:44:28 -04:00
net.c vhost: convert poll work to be vq based 2023-07-03 12:15:13 -04:00
scsi.c vhost-scsi: Rename vhost_scsi_iov_to_sgl 2023-08-10 15:24:28 -04:00
test.c vhost-test: remove meaningless debug info 2023-02-20 19:26:58 -05:00
test.h tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
vdpa.c vhost-vdpa: fix use after free in vhost_vdpa_probe() 2023-11-28 17:19:49 +00:00
vhost.c vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE 2023-10-18 11:29:56 -04:00
vhost.h vhost: Make parameter name match of vhost_get_vq_desc() 2023-07-03 12:15:15 -04:00
vringh.c vringh: don't use vringh_kiov_advance() in vringh_iov_xfer() 2023-10-04 08:26:48 +01:00
vsock.c virtio/vsock: send credit update during setting SO_RCVLOWAT 2024-01-25 15:35:26 -08:00