diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-10-17 14:44:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-18 10:19:43 -0700 |
commit | ec3359b685db834c249953db6ac5717bf5cde425 (patch) | |
tree | 0916e7ca918c766c95ead2903abdde98c5361a08 /net/vmw_vsock | |
parent | 2e978795bb4c14293bf6ecf32621d32529706aef (diff) | |
download | linux-ec3359b685db834c249953db6ac5717bf5cde425.tar.gz linux-ec3359b685db834c249953db6ac5717bf5cde425.tar.bz2 linux-ec3359b685db834c249953db6ac5717bf5cde425.zip |
vsock/virtio: send a credit update when buffer size is changed
When the user application set a new buffer size value, we should
update the remote peer about this change, since it uses this
information to calculate the credit available.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock')
-rw-r--r-- | net/vmw_vsock/virtio_transport_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index a666ef8fc54e..db127a69f5c3 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -458,6 +458,9 @@ void virtio_transport_set_buffer_size(struct vsock_sock *vsk, u64 val) vvs->buf_size_max = val; vvs->buf_size = val; vvs->buf_alloc = val; + + virtio_transport_send_credit_update(vsk, VIRTIO_VSOCK_TYPE_STREAM, + NULL); } EXPORT_SYMBOL_GPL(virtio_transport_set_buffer_size); |