Skip to content
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

Fail on Stream Blocked Immediate #4276

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

nibanks
Copy link
Member

@nibanks nibanks commented May 2, 2024

Description

A prototype change to update the StreamStart API to fail inline if the app passes QUIC_STREAM_START_FLAG_FAIL_BLOCKED.

Testing

CI/CD

Documentation

TODO

@@ -191,8 +193,10 @@ QuicStreamSetReleaseStream(
uint8_t Flags = (uint8_t)(Stream->ID & STREAM_ID_MASK);
QUIC_STREAM_TYPE_INFO* Info = &StreamSet->Types[Flags];

CxPlatDispatchLockAcquire(&StreamSet->TypesLock);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only other synchronization we'd need (besides in QuicStreamSetNewLocalStreamID below), but it's a bit tricky.

Info->CurrentStreamCount++;
Info->TotalStreamCount++;
if (!QuicStreamSetInsertStream(StreamSet, Stream)) {
Status = QUIC_STATUS_OUT_OF_MEMORY;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to roll back the CurrentStreamCount and TotalStreamCount increments on failure? I think we don't we need to fatal the whole connection... But if we do roll back, for the 'fail on blocked' case, we already told the app they're good to go. Rolling back would break that promise. So I think fatal is the best way to go.

Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.23%. Comparing base (bc4454f) to head (71a3304).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4276   +/-   ##
=======================================
  Coverage   84.23%   84.23%           
=======================================
  Files          56       56           
  Lines       15382    15397   +15     
=======================================
+ Hits        12957    12970   +13     
- Misses       2425     2427    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nibanks
Copy link
Member Author

nibanks commented May 2, 2024

FYI, since this is a behavior change for 'fail on block' stream start calls, the down-level tests are failing. Might have to create a new flag to the effect of FAIL_ON_BLOCKED_INLINE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant