Skip to content

Transfer TCP receive memory with the segment that owns it - #16827

Open
tamird wants to merge 1 commit into
google:masterfrom
tamird:research/tcp-listener-transfer
Open

tamird wants to merge 1 commit into
google:masterfrom
tamird:research/tcp-listener-transfer

Conversation

@tamird

@tamird tamird commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

A data-bearing ACK can pass through the listening socket and then the
accepted socket. Charging it on every enqueue but releasing it only once
leaves the listener accounting for data the application already read.
A later connection can then lose the data on its final handshake ACK.

Keep one owner per segment. Requeueing on the same socket preserves the
charge; moving to another socket transfers it. Test that a listener with
a small receive buffer keeps accepting connections with handshake data.

A data-bearing ACK can pass through the listening socket and then the
accepted socket. Charging it on every enqueue but releasing it only once
leaves the listener accounting for data the application already read.
A later connection can then lose the data on its final handshake ACK.

Keep one owner per segment. Requeueing on the same socket preserves the
charge; moving to another socket transfers it. Test that a listener with
a small receive buffer keeps accepting connections with handshake data.
@tamird

tamird commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@manninglucas, could you review receive-memory ownership when an ACK carries data from the listener to an accepted socket? The segment needs one charge and one matching release.

Posted by Codex on behalf of @tamird.

@tamird

tamird commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@kerumeto, could you review the changes to pkg/tcpip/transport/tcp/ in this PR? You worked in this directory in #14458.

Posted by Codex on behalf of @tamird.

github-actions Bot added a commit to tamird/gvisor that referenced this pull request Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant