Netdev List
 help / color / mirror / Atom feed
* [PATCH net v4 0/2] vsock/virtio: fix skb overhead accounting to preserve full buf_alloc
@ 2026-05-18  9:06 Stefano Garzarella
  2026-05-18  9:06 ` [PATCH net v4 1/2] vsock/virtio: reset connection on receiving queue overflow Stefano Garzarella
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stefano Garzarella @ 2026-05-18  9:06 UTC (permalink / raw)
  To: netdev
  Cc: Simon Horman, Jakub Kicinski, Michael S. Tsirkin, Paolo Abeni,
	Jason Wang, Stefano Garzarella, David S. Miller, kvm,
	Stefan Hajnoczi, linux-kernel, Eric Dumazet, Xuan Zhuo,
	virtualization, Eugenio Pérez

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/20260513105417.56761-1-sgarzare@redhat.com/
- Split in 2 patches [MST]

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

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-21  2:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-18  9:06 [PATCH net v4 0/2] vsock/virtio: fix skb overhead accounting to preserve full buf_alloc Stefano Garzarella
2026-05-18  9:06 ` [PATCH net v4 1/2] vsock/virtio: reset connection on receiving queue overflow Stefano Garzarella
2026-05-18  9:06 ` [PATCH net v4 2/2] vsock/virtio: fix skb overhead accounting to preserve full buf_alloc Stefano Garzarella
2026-05-19  9:27 ` [PATCH net v4 0/2] " Stefano Garzarella
2026-05-21  2:23 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox