xdp-for-windows icon indicating copy to clipboard operation
xdp-for-windows copied to clipboard

KM XDPAPI prototype

Open nigriMSFT opened this issue 1 year ago • 11 comments

KM XDPAPI prototype + hacks to test with xskbench and measure perf

nigriMSFT avatar Nov 02 '23 23:11 nigriMSFT

Some results comparing the user-mode and kernel-mode APIs that were taken on a physical machine. The difference is mostly insignificant, which would be expected.

perf suite commands:

.\tools\xskperfsuite.ps1 -Verbose -Fndis -RawResultsFile "artifacts/logs/xskperfsuite-user.csv" -XperfDirectory "artifacts/logs" -Config Release
.\tools\xskperfsuite.ps1 -Verbose -Fndis -RawResultsFile "artifacts/logs/xskperfsuite-kernel.csv" -XperfDirectory "artifacts/logs" -KernelMode -Config Release

PS N:\repos\xdp-for-windows> .\tools\xskperfcompare.ps1 -DataFile1 N:\shared\nigri\httpperf\xskperfsuite-user.csv -DataFile2 N:\shared\nigri\httpperf\xskperfsuite-kernel-cleaned.csv Test Case Avg1 Avg2 %Diff Significance XDPMP-NATIVE-RX-BUSY-2048chunksize-64iosize-FNDIS 19314 19178 -1 NOT Significant XDPMP-NATIVE-RX-BUSY-2048chunksize-1514iosize-FNDIS 5491 5478 0 NOT Significant XDPMP-NATIVE-TX-BUSY-2048chunksize-64iosize-FNDIS 34434 34267 0 NOT Significant XDPMP-NATIVE-TX-BUSY-2048chunksize-1514iosize-FNDIS 34462 34305 0 NOT Significant XDPMP-NATIVE-FWD-BUSY-2048chunksize-64iosize-FNDIS 12897 12956 0 NOT Significant XDPMP-NATIVE-FWD-BUSY-2048chunksize-1514iosize-FNDIS 4791 4784 0 NOT Significant XDPMP-GENERIC-RX-BUSY-2048chunksize-64iosize-FNDIS 8699 8896 2 NOT Significant XDPMP-GENERIC-RX-BUSY-2048chunksize-1514iosize-FNDIS 3832 3809 -1 NOT Significant XDPMP-GENERIC-TX-BUSY-2048chunksize-64iosize-FNDIS 5691 5805 2 NOT Significant XDPMP-GENERIC-TX-BUSY-2048chunksize-1514iosize-FNDIS 3455 3529 2 NOT Significant XDPMP-GENERIC-FWD-BUSY-2048chunksize-64iosize-FNDIS 1841 1935 5 Significant XDPMP-GENERIC-FWD-BUSY-2048chunksize-1514iosize-FNDIS 1214 1277 5 NOT Significant

*xskperfsuite-kernel-cleaned.csv as I had to undo the "KERNEL" added to the test case name in order for xskperfcompare to do its thing.

nigriMSFT avatar Nov 02 '23 23:11 nigriMSFT

Should XskRequiresTxBounceBuffer return false for kernel sockets? The idea was user mode sockets in generic mode cannot be trusted for TOC/TOU, but for kernel, we could rely on the caller to promise not to modify the packet during TX.

mtfriesen avatar Nov 03 '23 14:11 mtfriesen

Next merging to https://github.com/microsoft/xdp-for-windows/pull/622 causes build time warning and missing trace. There is logical conflicts....

image

Then these trace doesn't appear during functional tests for both user and kernel test image

ami-GS avatar Aug 27 '24 21:08 ami-GS

Next merging to #622 causes build time warning and missing trace. There is logical conflicts....

image

Then these trace doesn't appear during functional tests for both user and kernel test image

Build warnings are fixed.

Trace issue, which seems to be around test/functional/lib/tests.cpp. the log added in test/functionalt/taef/tests.cpp appears as expected. image

ami-GS avatar Aug 27 '24 22:08 ami-GS

last commit to merge. https://github.com/microsoft/xdp-for-windows/pull/657

There is build failure with the commit image

ami-GS avatar Aug 28 '24 01:08 ami-GS

This line is the cause. https://github.com/microsoft/xdp-for-windows/blob/3ceb8db8b4b83e8803efe243df1289ca1a7d59e8/src/xdp.cpp.user.props#L7

MultiThreadedDebug works, but not sure the intent of the change

ami-GS avatar Aug 28 '24 05:08 ami-GS

Please work with @mtfriesen to make sure the project files are properly formatted based on the recent changes he's been doing.

nibanks avatar Aug 28 '24 13:08 nibanks