Patch 1 resets the connection when we can no longer queue packets, this prevents silent data loss, and both peers are notified.
Patch 2 increases the total budget to `buf_alloc * 2` for payload plus skb overhead similar to how SO_RCVBUF is doubled to reserve space for sk_buff metadata. This preserves the full buf_alloc for payload under normal operation, while still bounding the skb queue growth. In the future, we plan to improve how we handle the merging of packets to minimize overhead and avoid closing connections. v4: - Split the buf_alloc check to be sure the credit is still respected and to avoid overflow of buf_used [sashiko] - call virtio_transport_do_close() and vsock_remove_sock() to properly close the connection and remove the socket from the connect table [sashiko] v3: https://lore.kernel.org/netdev/[email protected]/ - Split in 2 patches [MST] v2: https://lore.kernel.org/netdev/[email protected]/ - Close the connection when we can no longer queue new packets instead of losing data. - No longer announce the reduced buf_alloc to avoid violating the spec. [MST] v1: https://lore.kernel.org/netdev/[email protected]/ Stefano Garzarella (2): vsock/virtio: reset connection on receiving queue overflow vsock/virtio: fix skb overhead accounting to preserve full buf_alloc net/vmw_vsock/virtio_transport_common.c | 29 ++++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) -- 2.54.0

