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

Add 'cancel on loss' send mode to MsQuicStream. #4037

Merged
merged 12 commits into from
Jan 8, 2024

Conversation

sebastianpick
Copy link
Contributor

@sebastianpick sebastianpick commented Jan 5, 2024

Description

This commit adds an implementation of the stream 'cancel of loss' feature as requested per #3984.

The feature is enabled on a stream when the 'QUIC_SEND_FLAG_CANCEL_ON_LOSS' send flag is supplied during a send. From that time on, the stream will never change back from this behavior again.

Testing

Yes, a test 'CancelOnLossSend' has been added for this.

Documentation

Yes, the documentation in Streams.md and StreamSend.md has been extended.

@sebastianpick sebastianpick requested a review from a team as a code owner January 5, 2024 14:51
@@ -240,13 +240,14 @@ typedef enum QUIC_SEND_FLAGS {
QUIC_SEND_FLAG_FIN = 0x0004, // Indicates the request is the one last sent on the stream.
QUIC_SEND_FLAG_DGRAM_PRIORITY = 0x0008, // Indicates the datagram is higher priority than others.
QUIC_SEND_FLAG_DELAY_SEND = 0x0010, // Indicates the send should be delayed because more will be queued soon.
QUIC_SEND_FLAG_CANCEL_ON_LOSS = 0x0020, // Indicates that a stream is to be cancelled when packet loss is detected.
Copy link
Member

Choose a reason for hiding this comment

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

Going to need to update docs for this too.

src/core/stream.h Outdated Show resolved Hide resolved
src/core/stream_send.c Outdated Show resolved Hide resolved
src/core/stream_send.c Outdated Show resolved Hide resolved
src/core/stream_send.c Outdated Show resolved Hide resolved
src/test/MsQuicTests.h Outdated Show resolved Hide resolved
src/test/MsQuicTests.h Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (81f0309) 87.35% compared to head (ffe5012) 86.97%.
Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4037      +/-   ##
==========================================
- Coverage   87.35%   86.97%   -0.39%     
==========================================
  Files          56       56              
  Lines       16957    16938      -19     
==========================================
- Hits        14813    14731      -82     
- Misses       2144     2207      +63     

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

src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
@nibanks
Copy link
Member

nibanks commented Jan 5, 2024

Looks like the .NET build failed because those headers weren't updated. Please run .\scripts\generate-dotnet.ps1.

@nibanks
Copy link
Member

nibanks commented Jan 5, 2024

Kernel mode build failures:

  D:\a\msquic\msquic\src\test\bin\winkernel\control.cpp(515,1): error C2338: static_assert failed: 'QUIC_IOCTL_BUFFER_SIZES must be kept in sync with the IOCTLs' [D:\a\msquic\msquic\src\test\bin\winkernel\msquictest.kernel.vcxproj]
  D:\a\msquic\msquic\src\test\bin\winkernel\control.cpp(1424,9): error C2039: 'DropPackets': is not a member of 'QUIC_IOCTL_PARAMS' [D:\a\msquic\msquic\src\test\bin\winkernel\msquictest.kernel.vcxproj]

@nibanks nibanks added Area: API Area: Core Related to the shared, core protocol logic labels Jan 6, 2024
nibanks
nibanks previously approved these changes Jan 8, 2024
@nibanks
Copy link
Member

nibanks commented Jan 8, 2024

Kernel build error:

"D:\a\msquic\msquic\msquic.kernel.sln" (default target) (1) ->
"D:\a\msquic\msquic\src\test\bin\winkernel\msquictest.kernel.vcxproj" (default target) (7) ->
(Link target) -> 
  testlib.lib(DataTest.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned __int64)" (??2@YAPEAX_K@Z) [D:\a\msquic\msquic\src\test\bin\winkernel\msquictest.kernel.vcxproj]
  D:\a\msquic\msquic\artifacts\bin\winkernel\x64_Debug_schannel\msquictest.sys : fatal error LNK1120: 1 unresolved externals [D:\a\msquic\msquic\src\test\bin\winkernel\msquictest.kernel.vcxproj]

Looks like you're not using an std::nothrow new.

src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
@nibanks nibanks merged commit 9416cd6 into microsoft:main Jan 8, 2024
398 of 405 checks passed
@sebastianpick sebastianpick deleted the feature/implCancelOnLossStreams branch January 8, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: API Area: Core Related to the shared, core protocol logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants