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

Support Priority Work on Connections #4279

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

nibanks
Copy link
Member

@nibanks nibanks commented May 3, 2024

Description

Sometimes an application would like to prefer new work over existing work already queued on the connection. This PR adds the notion of priority to the connection's operation queue, and exposes flags through the API to allow the app to chose to leverage this.

Testing

SpinQuic updated.
Need to add some explicit BVTs.

Documentation

TODO

src/core/operation.c Fixed Show fixed Hide fixed
Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.05%. Comparing base (971eb6f) to head (a23bd3e).
Report is 7 commits behind head on main.

Files Patch % Lines
src/core/connection.c 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4279      +/-   ##
==========================================
- Coverage   85.44%   85.05%   -0.39%     
==========================================
  Files          56       56              
  Lines       15384    15426      +42     
==========================================
- Hits        13145    13121      -24     
- Misses       2239     2305      +66     

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

mtfriesen
mtfriesen previously approved these changes May 3, 2024
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
src/test/lib/DataTest.cpp Outdated Show resolved Hide resolved
@ami-GS ami-GS marked this pull request as ready for review June 12, 2024 00:57
@ami-GS ami-GS requested a review from a team as a code owner June 12, 2024 00:57
src/core/operation.c Outdated Show resolved Hide resolved
@ami-GS
Copy link
Contributor

ami-GS commented Jun 12, 2024

What's this build error?
image

@nibanks
Copy link
Member Author

nibanks commented Jun 12, 2024

What's this build error? image

Means you're not calling new correctly. You need to use the std::nothrow version.

#endif
StartProcessing = CxPlatListIsEmpty(&OperQ->List) && !OperQ->ActivelyProcessing;
CxPlatListInsertTail(*OperQ->PriorityTail, &Oper->Link);
OperQ->PriorityTail = &Oper->Link.Flink;

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address which arrived via a
parameter
may be assigned to a non-local variable.
@ami-GS
Copy link
Contributor

ami-GS commented Jun 12, 2024

CIFulzz is failling in QuicConnRelease, by CXPLAT_TEL_ASSERT(Connection->RefTypeCount[QUIC_CONN_REF_STREAM] > 0).
I believe that QuicOperationFree is not called as expected? and Stream might not be released.

Any idea of affecting releasing Operation by changing operation order.

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

3 participants