diff options
author | Arseniy Krasnov <AVKrasnov@sberdevices.ru> | 2022-08-19 05:39:24 +0000 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-08-23 10:43:11 +0200 |
commit | 39f1ed33a4489e2f7a55d5a96576c73af3529461 (patch) | |
tree | 3241a1596ac5512dba42ccfb1ee1e261d7d6a813 /net/vmw_vsock/virtio_transport_common.c | |
parent | f2fdcf67aceb1a7d5e0661cb7ca95cda68d3014a (diff) |
virtio/vsock: check SO_RCVLOWAT before wake up reader
This adds extra condition to wake up data reader: do it only when number
of readable bytes >= SO_RCVLOWAT. Otherwise, there is no sense to kick
user,because it will wait until SO_RCVLOWAT bytes will be dequeued. This
check is performed in vsock_data_ready().
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/vmw_vsock/virtio_transport_common.c')
-rw-r--r-- | net/vmw_vsock/virtio_transport_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 8f6356ebcdd1..35863132f4f1 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -1081,7 +1081,7 @@ virtio_transport_recv_connected(struct sock *sk, switch (le16_to_cpu(pkt->hdr.op)) { case VIRTIO_VSOCK_OP_RW: virtio_transport_recv_enqueue(vsk, pkt); - sk->sk_data_ready(sk); + vsock_data_ready(sk); return err; case VIRTIO_VSOCK_OP_CREDIT_REQUEST: virtio_transport_send_credit_update(vsk); |