Skip to content

Commit

Permalink
vsock/virtio: send a credit update when buffer size is changed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefano Garzarella authored and David S. Miller committed Oct 18, 2019
1 parent 2e97879 commit ec3359b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/vmw_vsock/virtio_transport_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ec3359b

Please sign in to comment.