Skip to content

Windows Kernel XDP Support #4654

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

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
92cb8a8
Kernel Platform Worker Support
nibanks Oct 9, 2024
3b8a0b6
more SAL
nibanks Oct 9, 2024
265ab8e
Fixes
nibanks Oct 9, 2024
1f47cd4
minor refactor
nibanks Oct 9, 2024
47505ab
Start the worker pool
nibanks Oct 10, 2024
a10451c
Merge branch 'main' into nibanks/kernel-platform-worker
nibanks Nov 3, 2024
7d7e3f2
Remove extra variable
nibanks Nov 3, 2024
b332a71
merge winkernel and dummy datapath
ami-GS Nov 11, 2024
91d4cc1
fix
ami-GS Nov 11, 2024
22924dd
flag to identify datapath
ami-GS Nov 11, 2024
866179e
Merge branch 'main' into dev/daiki/winkernel_merging
ami-GS Nov 12, 2024
7cdc727
trailing newline
ami-GS Nov 12, 2024
e186b59
Merge branch 'main' into nibanks/kernel-platform-worker
nibanks Nov 13, 2024
3569672
Merge branch 'nibanks/kernel-platform-worker' of https://github.com/m…
nibanks Nov 13, 2024
56c8ce0
Merge branch 'main' into dev/daiki/winkernel_merging
ami-GS Nov 14, 2024
84593b2
use common members
ami-GS Nov 14, 2024
1a363f1
cleanup
ami-GS Nov 19, 2024
75cfc74
change dp type naming
ami-GS Nov 19, 2024
70fdaca
fix type and refactoring
ami-GS Nov 19, 2024
d67a79b
fix
ami-GS Nov 19, 2024
ca42af4
assemble definition in same ifdef
ami-GS Nov 20, 2024
93cda23
try using latest xdp
ami-GS Nov 12, 2024
8d627d6
build
ami-GS Nov 12, 2024
aba07ac
adjust newer xdp api restriction
ami-GS Nov 12, 2024
70ff428
remove XDP_ASSERT_INTERNAL
ami-GS Nov 13, 2024
7fe7903
build with placeholders
ami-GS Nov 13, 2024
a127407
use named branch
ami-GS Nov 13, 2024
ac86872
update xdp-for-windows directly
ami-GS Nov 14, 2024
a8a81e1
move macro definition to code
ami-GS Nov 14, 2024
b89d1db
install built xdp
ami-GS Nov 14, 2024
83b37b1
download prerelease
ami-GS Nov 14, 2024
2f1dac7
signing
ami-GS Nov 14, 2024
37a4f13
tmp
ami-GS Nov 20, 2024
58c1a6f
FIX?
ami-GS Nov 21, 2024
507f020
ending by newline
ami-GS Nov 22, 2024
b375145
Merge branch 'dev/daiki/winkernel_merging' into dev/daiki/winkernel_m…
ami-GS Nov 22, 2024
e16934d
kernel build fix
ami-GS Nov 25, 2024
b1b8402
enable XDP for kernel
ami-GS Nov 25, 2024
ba3423c
Merge branch 'main' into dev/daiki/winkernel_merging_exp
ami-GS Nov 25, 2024
99a9aac
update clog
ami-GS Nov 26, 2024
32d778f
fix several access violation
ami-GS Nov 27, 2024
f277b67
Merge branch 'main' into dev/daiki/winkernel_merging_exp
ami-GS Nov 27, 2024
f6bc45c
Merge branch 'nibanks/kernel-platform-worker' into dev/daiki/winkerne…
ami-GS Nov 27, 2024
6c1b53c
unify datapath_raw_winXXX
ami-GS Nov 27, 2024
fd92152
add logging
ami-GS Nov 28, 2024
b906cbe
Set Rx event. experimental
ami-GS Dec 10, 2024
107fb42
Merge branch 'main' into dev/daiki/winkernel_merging_exp
ami-GS Dec 10, 2024
05ca68f
rmeove macro
ami-GS Dec 10, 2024
2766546
fix usermode build
ami-GS Dec 10, 2024
33fcea4
remove ZwSetInformationFile from CxPlatXdpExecute
ami-GS Dec 11, 2024
e4c8271
fix interface init phase with proper flag and error code
ami-GS Dec 13, 2024
6cd0fee
make status code valid for both user/kernel
ami-GS Dec 13, 2024
3243f6d
Merge branch 'main' into nibanks/kernel-platform-worker
ami-GS Jan 14, 2025
484a446
Use Nt APIs
ami-GS Jan 14, 2025
51ef7bc
Update src/inc/quic_platform_winkernel.h
ami-GS Jan 15, 2025
79b9004
Update src/inc/quic_platform_winkernel.h
ami-GS Jan 15, 2025
c02e738
Update src/inc/quic_platform_winkernel.h
ami-GS Jan 15, 2025
09f2fbf
fix comment
ami-GS Jan 15, 2025
c4a8f36
write IO completion API placeholders
ami-GS Jan 15, 2025
1f23c09
link ntdll for Nt*IoCompletion APIs
ami-GS Jan 15, 2025
fd58cee
sync annotation
ami-GS Jan 15, 2025
1f9c6e9
Use Zw version API
ami-GS Jan 16, 2025
101f6b9
fix as proposed
ami-GS Jan 16, 2025
a7def7a
use InitializeObjectAttributes
ami-GS Jan 21, 2025
2d547c6
workaround to use completion port under DISPATCH_LEVEL
ami-GS Jan 29, 2025
fc6b308
Update src/inc/quic_platform_winkernel.h
ami-GS Jan 31, 2025
c364a7a
cleanup
ami-GS Jan 31, 2025
75579e2
Merge branch 'main' into nibanks/kernel-platform-worker
nibanks Feb 13, 2025
b7795f5
cleanup
nibanks Feb 13, 2025
8132f01
refactor
nibanks Feb 13, 2025
beeeffc
space
nibanks Feb 13, 2025
665315d
fix annotation
nibanks Feb 13, 2025
7c887e9
better sal
nibanks Feb 13, 2025
8cb40bd
fix sal
nibanks Feb 13, 2025
6dd2aed
per sqe minipacket; set4
nibanks Feb 13, 2025
b77cb3f
revert set4
nibanks Feb 13, 2025
565f872
Merge branch 'nibanks/kernel-platform-worker' into dev/daiki/winkerne…
nibanks Feb 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into nibanks/kernel-platform-worker
  • Loading branch information
ami-GS committed Jan 14, 2025
commit 3243f6d70ca0c249381a4869b790aa0f8e1b6666
5 changes: 2 additions & 3 deletions src/inc/quic_platform_winkernel.h
Original file line number Diff line number Diff line change
@@ -519,10 +519,10 @@ CxPlatEventQCleanup(
_IRQL_requires_max_(PASSIVE_LEVEL)
inline
BOOLEAN

CxPlatEventQEnqueue(
_In_ CXPLAT_EVENTQ* queue,
_In_ CXPLAT_SQE* sqe,
_In_opt_ void* user_data
_In_ CXPLAT_SQE* sqe
)
{
CxPlatLockAcquire(&queue->Lock);
@@ -532,7 +532,6 @@ CxPlatEventQEnqueue(
return TRUE;
}

sqe->UserData = user_data;
BOOLEAN SignalEvent = IsListEmpty(&queue->Events);
InsertTailList(&queue->Events, &sqe->Link);

9 changes: 0 additions & 9 deletions src/platform/platform_internal.h
Original file line number Diff line number Diff line change
@@ -772,15 +772,6 @@ CxPlatWorkerPoolGetEventQ(
_In_ uint16_t Index // Into the config processor array
);

#ifdef _KERNEL_MODE // Not supported on kernel mode (yet)
#define CxPlatDataPathProcessCqe(X) CXPLAT_FRE_ASSERT(FALSE)
#else
void
CxPlatDataPathProcessCqe(
_In_ CXPLAT_CQE* Cqe
);
#endif

BOOLEAN // Returns FALSE no work was done.
CxPlatDataPathPoll(
_In_ void* Context,
38 changes: 37 additions & 1 deletion src/platform/platform_worker.c
Original file line number Diff line number Diff line change
@@ -100,6 +100,42 @@ typedef struct QUIC_CACHEALIGN CXPLAT_WORKER {

CXPLAT_THREAD_CALLBACK(CxPlatWorkerThread, Context);

static void
ShutdownCompletion(
_In_ CXPLAT_CQE* Cqe
)
{
CXPLAT_WORKER* Worker =
CXPLAT_CONTAINING_RECORD(CxPlatCqeGetSqe(Cqe), CXPLAT_WORKER, ShutdownSqe);
Worker->StoppedThread = TRUE;
}

static void
WakeCompletion(
_In_ CXPLAT_CQE* Cqe
)
{
//
// No-op as the goal is simply to wake the event queue thread
//
UNREFERENCED_PARAMETER(Cqe);
}

void
CxPlatUpdateExecutionContexts(
_In_ CXPLAT_WORKER* Worker
);

static void
UpdatePollCompletion(
_In_ CXPLAT_CQE* Cqe
)
{
CXPLAT_WORKER* Worker =
CXPLAT_CONTAINING_RECORD(CxPlatCqeGetSqe(Cqe), CXPLAT_WORKER, UpdatePollSqe);
CxPlatUpdateExecutionContexts(Worker);
}

_IRQL_requires_max_(PASSIVE_LEVEL)
void
CxPlatWorkerPoolInit(
@@ -500,7 +536,7 @@ CxPlatRunExecutionContexts(
}

_IRQL_requires_max_(PASSIVE_LEVEL)
BOOLEAN
void
CxPlatProcessEvents(
_In_ CXPLAT_WORKER* Worker,
_Inout_ CXPLAT_EXECUTION_STATE* State
You are viewing a condensed version of this merge commit. You can view the full changes here.