-
Notifications
You must be signed in to change notification settings - Fork 553
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
Kernel Platform Worker Support #4605
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4605 +/- ##
==========================================
- Coverage 87.43% 86.02% -1.42%
==========================================
Files 56 56
Lines 17634 17634
==========================================
- Hits 15419 15169 -250
- Misses 2215 2465 +250 ☔ View full report in Codecov by Sentry. |
Looks like the kernel BVTs are crashing. I will try to investigate later. |
…icrosoft/msquic into nibanks/kernel-platform-worker
Something seems broken in netperf runs. I can't tell if it's because of this or not. Needs to be investigated before merging. |
Is the netperf result reliable? wsk related failure is really few. others are more |
Converted this back to draft, because we need to switch to using |
I suggest using the Zw variants for KM, unless QUIC is calling on behalf of the user mode thread calling QUIC, and all in the same thread context. |
Co-authored-by: Nick Banks <nibanks@microsoft.com>
Because platform_winkernel.c copies from zwapi.h, quic_platform_winkernel.h does same. |
Line 174 in 101f6b9
RegistrationClose doesn't return by here Edit: |
Likely means the worker thread isn't actually woken to clean up. |
@@ -469,58 +469,235 @@ _CxPlatEventWaitWithTimeout( | |||
#define CxPlatEventWaitWithTimeout(Event, TimeoutMs) \ | |||
(STATUS_SUCCESS == _CxPlatEventWaitWithTimeout(&Event, TimeoutMs)) | |||
|
|||
// | |||
// TODO: Publish and document the following APIs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to be sure kernel is fine publishing these, especially since we can't simply use the Zw high-level ones, but needs to use Io* directly to get around the DISPATCH_LEVEL access problem.
Co-authored-by: Nick Banks <nibanks@microsoft.com>
(PVOID*)&queue->IoCompletion, | ||
NULL); | ||
|
||
NtClose(Handle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally we NT_VERIFY(NT_SUCCESS()) the result of closing handles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't cost anything on release builds, and the assert on debug builds will catch otherwise silent failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Historically we haven't done a good job of this, but with the stepped-up focus on security, our code should always at least nominally (e.g., debug-only) inspect return values of functions.
Description
Extracts/refactors some of the code in #4023 to support platform worker threads, which is a prereq for kernel xdp support.
Testing
CI/CD
Documentation
N/A