Skip to content

Reliable reset: plumb FinalSize and enforce reset-equivalent flow-control accounting#6024

Open
gaurav2699 wants to merge 6 commits into
mainfrom
reliablereset_finalsize
Open

Reliable reset: plumb FinalSize and enforce reset-equivalent flow-control accounting#6024
gaurav2699 wants to merge 6 commits into
mainfrom
reliablereset_finalsize

Conversation

@gaurav2699

Copy link
Copy Markdown
Contributor

Description

Adds FinalSize to QuicStreamProcessReliableResetFrame and updates RELIABLE_RESET dispatch to pass Frame.FinalSize.
Mirrors QuicStreamProcessResetFrame accounting in reliable reset handling:

  • OrderedStreamBytesReceived adjustment based on FinalSize.
  • MaxData credit adjustment when unread bytes remain.

Testing

Do any existing tests cover this change? Are new tests needed?

Documentation

Is there any documentation impact for this change?

@gaurav2699 gaurav2699 requested a review from a team as a code owner May 21, 2026 13:53
@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.37%. Comparing base (23711d2) to head (5573929).

Files with missing lines Patch % Lines
src/core/stream_recv.c 34.78% 15 Missing ⚠️

❌ Your patch check has failed because the patch coverage (40.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6024      +/-   ##
==========================================
+ Coverage   85.03%   85.37%   +0.34%     
==========================================
  Files          60       60              
  Lines       18792    18816      +24     
==========================================
+ Hits        15980    16065      +85     
+ Misses       2812     2751      -61     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guhetier guhetier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Except for the FinalSize < ReliableOffset check, I don't understand what this change tries to achieve.

Comment thread src/core/stream_recv.c
BOOLEAN CloseNow = Stream->RecvBuffer.BaseOffset >= ReliableOffset;

if (!Stream->Flags.RemoteCloseResetReliable && CloseNow) {
uint64_t TotalRecvLength = QuicRecvBufferGetTotalLength(&Stream->RecvBuffer);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are you looking for Stream->RecvMaxLength?

Comment thread src/core/stream_recv.c
// as a result.
//
uint64_t FlowControlIncrease = FinalSize - TotalReadLength;
Stream->Connection->Send.MaxData += FlowControlIncrease;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think we have a reason to give flow control here. More flow control will be granted as we receive bytes.

@ProjectsByJackHe

Copy link
Copy Markdown
Contributor

What issue is this PR resolving?

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.

3 participants