Re: [PATCH net 1/2] vsock/virtio: collapse receive queue under memory pressure

From: Stefano Garzarella

Date: Thu Jul 02 2026 - 05:01:56 EST


On Wed, Jul 01, 2026 at 09:34:35AM -0700, Bobby Eshleman wrote:
On Fri, Jun 26, 2026 at 03:48:22PM +0200, Stefano Garzarella wrote:

[...]

+out:
+ if (new_skb)
+ __skb_queue_tail(&new_queue, new_skb);
+
+ skb_queue_splice(&new_queue, &vvs->rx_queue);

I think the new skbs will also need skb_set_owner_sk_safe(skb, sk)
when adding to rx_queue?

IIRC we added it in the rx path, mainily for loopback to pass the ownership from the tx socket to the rx socket, but here we are already in the rx path, so the skb will never leave this socket.

Maybe it's necessary for the eBPF path?

In any case, I can add it, but if you can help me better understand what it prevents, that will also help me add a comment above it.

Thanks,
Stefano