[PATCH net v3 0/2] vsock/virtio: fix skb overhead accounting to preserve full buf_alloc

From: Stefano Garzarella

Date: Wed May 13 2026 - 06:54:53 EST


The code is exactly the same as in v2, but split into two patches as
Michael suggested in v2:
- 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.

v3:
- Split in 2 patches [MST]

v2: https://lore.kernel.org/netdev/20260512080737.36787-1-sgarzare@xxxxxxxxxx/
- 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/20260508092330.69690-1-sgarzare@xxxxxxxxxx/

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 | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)

--
2.54.0