-
Notifications
You must be signed in to change notification settings - Fork 640
Persists the virtual buffer size when switching to app owned buffers #5690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5690 +/- ##
==========================================
- Coverage 86.11% 84.80% -1.31%
==========================================
Files 60 60
Lines 18710 18712 +2
==========================================
- Hits 16112 15869 -243
- Misses 2598 2843 +245 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
47a91d3 to
3c44c74
Compare
3c44c74 to
3405d87
Compare
mtfriesen
reviewed
Jan 15, 2026
mtfriesen
reviewed
Jan 15, 2026
mtfriesen
reviewed
Jan 15, 2026
Co-authored-by: Michael Friesen <3517159+mtfriesen@users.noreply.github.com>
mtfriesen
reviewed
Jan 15, 2026
mtfriesen
approved these changes
Jan 15, 2026
guhetier
added a commit
that referenced
this pull request
Jan 16, 2026
…fers #5690 (#5719) ## Description When an endpoint receives a new stream indication, it can provide some receive buffers inline to convert the stream to app-owned buffer mode. When doing so, the receive buffer struct of the stream is reinitialized, and the virtual buffer length (which correspond to the stream receive window) was set to zero. This is incorrect since we introduced the "more buffer needed" notification and the receive window is no longer tied to the amount of buffer provided. This would result in a receive failure with data received outside of the virtual size. When converting the receive buffer to app-buffer mode, the virtual size is now preserved. Fixes #5672. ## Testing Test not backported as they rely on changes present only in main ## Documentation Clarify documentation about the app provided receive buffer ownership. --------- Co-authored-by: Michael Friesen <3517159+mtfriesen@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When an endpoint receives a new stream indication, it can provide some receive buffers inline to convert the stream to app-owned buffer mode.
When doing so, the receive buffer struct of the stream is reinitialized, and the virtual buffer length (which correspond to the stream receive window) was set to zero.
This is incorrect since we introduced the "more buffer needed" notification and the receive window is no longer tied to the amount of buffer provided.
This would result in a receive failure with data received outside of the virtual size.
When converting the receive buffer to app-buffer mode, the virtual size is now preserved.
Fixes #5672.
Testing
Test didn't catch this issue because the amount of buffer provided were too big and a single datagram would not allow to go over the virtual size.
Adding more test case:
While this is a large churn of test code to implement the various scenarios, the tested logic is still the same:
Documentation
Clarify documentation about the app provided receive buffer ownership.