-
Notifications
You must be signed in to change notification settings - Fork 532
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
Treat CxPlatWorker as a full object #4492
Conversation
@microsoft-github-policy-service agree |
Generally looks good. Let's just rename WorkerManager to WorkerPool. I think I like that better. Thanks! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4492 +/- ##
==========================================
- Coverage 86.37% 84.69% -1.68%
==========================================
Files 56 56
Lines 15515 15520 +5
==========================================
- Hits 13401 13145 -256
- Misses 2114 2375 +261 ☔ View full report in Codecov by Sentry. |
Kernel mode doesn't currently rely on the worker pool. |
Fixed. Just made them a no-op in kernel mode. Should be fine, any use of CxPlatAddExecutionContext will assert, and then if any functions are used in the data paths they'll get linker errors. |
Ok. Should now correctly be fixed. Forgot how UNREFERENCED_PARAMETER macro worked. |
|
Looks like there are lots of test failures. |
Some of those are failing on main after #4518 was merged. But there are a few that look to be me. |
Crap, I thought everything was passing in that PR. |
Description
Currently, if you have an app that is creating a datapath outside of msquic, that datapath always shares the same worker context as msquic. There are some cases where this is not the desired behavior, and instead a completely separate worker context should be used, such as if you need to guarantee there is always a free worker, and you have limited the msquic execution context with QUIC_PARAM_GLOBAL_EXECUTION_CONFIG.
This PR changes CxPlatWorker into a full object, with a default instance used. All the datapath init functions take a Worker Manager, and if that manager is null, the default one is used in its place.
Testing
Alll existing tests will implicitly hit this path, and cover any necessary testing.
Documentation
No documentation changes, as using CxPlat directly generally isn't a supported scenario.