Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0020948
add tools
ProjectsByJackHe May 15, 2026
9830250
phase 2 looks good so far
ProjectsByJackHe May 15, 2026
7ba0bf1
phase 2 improvements
ProjectsByJackHe May 15, 2026
b364f47
better diagnostics
ProjectsByJackHe May 15, 2026
01df062
phase 3 plumbing...
ProjectsByJackHe May 16, 2026
3097b18
phase 3: iter 2
ProjectsByJackHe May 16, 2026
5750131
bug fixes man
ProjectsByJackHe May 16, 2026
bbf64e0
E2E
ProjectsByJackHe May 16, 2026
c62d7b1
fix comment
ProjectsByJackHe May 18, 2026
08ff04e
update xdp commit
ProjectsByJackHe May 18, 2026
b8285dc
get rid of tools
ProjectsByJackHe May 18, 2026
4546dfe
get rid of preview features
ProjectsByJackHe May 18, 2026
ba539a7
add unit tests
ProjectsByJackHe May 18, 2026
d15f3a7
CLOG
ProjectsByJackHe May 18, 2026
4fe8094
fix abi incompat
ProjectsByJackHe May 18, 2026
47f162d
address code feedback
ProjectsByJackHe May 19, 2026
0b83796
Merge branch 'main' into jackhe/xdp_map_dp_int_pr_2_core
ProjectsByJackHe May 20, 2026
f68a1d8
fix dp tests + update logging
ProjectsByJackHe May 20, 2026
d8fe2d2
infer xdp enablement if map mode is set
ProjectsByJackHe May 21, 2026
96ded75
set xdpenabled to false explicitly in map mode returns error
ProjectsByJackHe May 21, 2026
240f0d2
fix unit test, address comments
ProjectsByJackHe May 22, 2026
1559660
generate clog, fix code pattern
ProjectsByJackHe May 22, 2026
892304c
update comment
ProjectsByJackHe May 22, 2026
1388f07
put map mode flag in rawdatapath
ProjectsByJackHe May 22, 2026
c472280
rename
ProjectsByJackHe May 22, 2026
acc113b
simplify the code
ProjectsByJackHe May 22, 2026
2ae68ba
fix build
ProjectsByJackHe May 22, 2026
db73b3c
refactor map into RAW dp
ProjectsByJackHe May 22, 2026
4eb0d70
CLOG
ProjectsByJackHe May 22, 2026
c9e7b1f
remove bogus test
ProjectsByJackHe May 22, 2026
c1fa28c
stash changes
ProjectsByJackHe May 23, 2026
3b85f5e
improve tests
ProjectsByJackHe May 26, 2026
815ff66
add cibir/qtip matrix
ProjectsByJackHe May 26, 2026
39ce0e6
add CI to target map mode explicitly
ProjectsByJackHe May 26, 2026
3d9d478
comment out map job
ProjectsByJackHe May 28, 2026
9716cef
Merge branch 'main' into jackhe/xdp_map_dp_int_pr_2_core
ProjectsByJackHe May 28, 2026
d524666
move stuff out of the test harness
ProjectsByJackHe Jun 11, 2026
cb6db81
test harness refactors
ProjectsByJackHe Jun 11, 2026
4c30ab2
more feedback refactors
ProjectsByJackHe Jun 12, 2026
d69d27d
add coverage for wildcard clients
ProjectsByJackHe Jun 12, 2026
3e997ff
rename to not ref map mode
ProjectsByJackHe Jun 12, 2026
f658a8b
use -1
ProjectsByJackHe Jun 12, 2026
3432322
add proper preview guards
ProjectsByJackHe Jun 12, 2026
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
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,17 @@ jobs:
if: matrix.vec.os == 'WinServerPrerelease'
shell: pwsh
timeout-minutes: 120
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -GHA -LogProfile ${{ matrix.vec.log || (inputs.log_level || 'Full.Light') }} -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} ${{ inputs.filter && '-Filter' }} ${{ inputs.filter || '' }}
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -GHA -LogProfile ${{ matrix.vec.log || (inputs.log_level || 'Full.Light') }} -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} ${{ matrix.vec.xdpmapmode }} ${{ (matrix.vec.testfilter || inputs.filter) && '-Filter' || '' }} ${{ matrix.vec.testfilter || inputs.filter || '' }}
- name: Test
if: matrix.vec.os != 'WinServerPrerelease'
shell: pwsh
timeout-minutes: 120
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -OsRunner ${{ matrix.vec.os }} -GHA -LogProfile ${{ matrix.vec.log || (inputs.log_level || 'Full.Light') }} -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} ${{ inputs.filter && '-Filter' }} ${{ inputs.filter || '' }}
run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -OsRunner ${{ matrix.vec.os }} -GHA -LogProfile ${{ matrix.vec.log || (inputs.log_level || 'Full.Light') }} -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} ${{ matrix.vec.xdpmapmode }} ${{ (matrix.vec.testfilter || inputs.filter) && '-Filter' || '' }} ${{ matrix.vec.testfilter || inputs.filter || '' }}
- name: Upload on Failure or Cancellation
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
if: failure() || cancelled()
with:
name: BVT-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.iouring }}${{ matrix.vec.qtip }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }}
name: BVT-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.iouring }}${{ matrix.vec.qtip }}${{ matrix.vec.xdpmapmode }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }}
path: artifacts

bvt-kernel:
Expand Down
12 changes: 12 additions & 0 deletions scripts/run-gtest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ as necessary.
.PARAMETER DuoNic
Uses DuoNic instead of loopback.

.PARAMETER XdpMapMode
Uses XDP map mode with DuoNic.
Comment thread
ProjectsByJackHe marked this conversation as resolved.

#>

param (
Expand Down Expand Up @@ -133,6 +136,9 @@ param (
[Parameter(Mandatory = $false)]
[switch]$DuoNic = $false,

[Parameter(Mandatory = $false)]
[switch]$XdpMapMode = $false,

[Parameter(Mandatory = $false)]
[string]$OsRunner = "",

Expand Down Expand Up @@ -403,6 +409,9 @@ function Start-TestCase([String]$Name) {
if ($DuoNic) {
$Arguments += " --duoNic"
}
if ($XdpMapMode) {
$Arguments += " --xdpMapMode"
}
if ($UseQtip) {
$Arguments += " --useQTIP"
}
Expand Down Expand Up @@ -450,6 +459,9 @@ function Start-AllTestCases {
if ($DuoNic) {
$Arguments += " --duoNic"
}
if ($XdpMapMode) {
$Arguments += " --xdpMapMode"
}
if ($UseQtip) {
$Arguments += " --useQTIP"
}
Expand Down
14 changes: 14 additions & 0 deletions scripts/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ This script runs the MsQuic tests.
.Parameter DuoNic
Uses DuoNic instead of loopback (DuoNic must already be installed via 'prepare-machine.ps1 -InstallDuoNic').

.Parameter XdpMapMode
Uses XDP map mode with DuoNic (Windows user-mode only, requires XDP + DuoNic).

.Parameter NumIterations
Number of times to run this particular command. Catches tricky edge cases due to random nature of networks.

Expand Down Expand Up @@ -178,6 +181,9 @@ param (
[Parameter(Mandatory = $false)]
[switch]$DuoNic = $false,

[Parameter(Mandatory = $false)]
[switch]$XdpMapMode = $false,

[Parameter(Mandatory = $false)]
[switch]$UseXdp = $false,

Expand Down Expand Up @@ -235,6 +241,11 @@ if ($UseXdp) {
$DuoNic = $true
}

if ($XdpMapMode) {
# Map mode implies DuoNic
$DuoNic = $true
}

# Root directory of the project.
$RootDir = Split-Path $PSScriptRoot -Parent

Expand Down Expand Up @@ -298,6 +309,9 @@ $TestArguments = "-IsolationMode $IsolationMode -PfxPath $PfxFile"
if ($DuoNic) {
$TestArguments += " -DuoNic"
}
if ($XdpMapMode) {
Comment thread
ProjectsByJackHe marked this conversation as resolved.
$TestArguments += " -XdpMapMode"
}
if ($Kernel) {
$TestArguments += " -Kernel $KernelPath"
}
Expand Down
9 changes: 7 additions & 2 deletions scripts/update-sidecar.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ if (Test-Path $OutputDir) {
}
}

$TmpOutputDir = Join-Path $RootDir "build" "tmp"

# Clean stale generated files so removed/renamed sources don't leave orphans
if (Test-Path $TmpOutputDir) {
Remove-Item $TmpOutputDir -Recurse -Force
}

$Sidecar = Join-Path $SrcDir "manifest" "clog.sidecar"
$ConfigFile = Join-Path $SrcDir "manifest" "msquic.clog_config"

$TmpOutputDir = Join-Path $RootDir "build" "tmp"
$ClogDir = Join-Path $RootDir "build" "clog"

# Create directories
Expand Down
2 changes: 2 additions & 0 deletions src/core/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ QuicLibraryLazyInitialize(

CXPLAT_DATAPATH_INIT_CONFIG InitConfig = {0};
InitConfig.EnableDscpOnRecv = MsQuicLib.EnableDscpOnRecv;
InitConfig.XdpMapConfigs = MsQuicLib.XdpMapConfigs;
InitConfig.XdpMapConfigCount = MsQuicLib.XdpMapConfigCount;

Status =
CxPlatDataPathInitialize(
Expand Down
12 changes: 12 additions & 0 deletions src/core/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,18 @@ QuicSettingApply(
Destination->IsSet.ReliableResetEnabled = TRUE;
}

//
// If XDP map mode is active (XdpMapConfigCount > 0), XDP is implicitly
// enabled for all sockets. Reject an explicit XdpEnabled = FALSE since
// it contradicts map mode — there is no OS datapath to fall back to.
//
if (Source->IsSet.XdpEnabled && !Source->XdpEnabled && MsQuicLib.XdpMapConfigCount > 0) {
QuicTraceLogError(
SettingXdpDisabledInMapMode,
"[ lib] Error: XdpEnabled cannot be set to FALSE when XDP map mode is active.");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's make logs slightly more actionable for users. "xdp map mode" is our current name for this feature, but we don't expose it in the API. Let's also avoid double negatives.

Suggested change
"[ lib] Error: XdpEnabled cannot be set to FALSE when XDP map mode is active.");
"[ lib] Error: Xdp must be enabled when an XDP map was configured.");

return FALSE;
}

if (Source->IsSet.XdpEnabled && (!Destination->IsSet.XdpEnabled || OverWrite)) {
Destination->XdpEnabled = Source->XdpEnabled;
Destination->IsSet.XdpEnabled = TRUE;
Expand Down
22 changes: 22 additions & 0 deletions src/generated/linux/datapath_raw.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,35 @@
#include "datapath_raw.c.clog.h.lttng.h"
#endif
#include <lttng/tracepoint-event.h>
#ifndef _clog_MACRO_QuicTraceLogVerbose
#define _clog_MACRO_QuicTraceLogVerbose 1
#define QuicTraceLogVerbose(a, ...) _clog_CAT(_clog_ARGN_SELECTOR(__VA_ARGS__), _clog_CAT(_,a(#a, __VA_ARGS__)))
#endif
#ifndef _clog_MACRO_QuicTraceEvent
#define _clog_MACRO_QuicTraceEvent 1
#define QuicTraceEvent(a, ...) _clog_CAT(_clog_ARGN_SELECTOR(__VA_ARGS__), _clog_CAT(_,a(#a, __VA_ARGS__)))
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*----------------------------------------------------------
// Decoder Ring for DatapathRawMapInsertFail
// [ dp] XDP map mode: failed to insert XSK sockets into map, status:%d
// QuicTraceLogVerbose(
DatapathRawMapInsertFail,
"[ dp] XDP map mode: failed to insert XSK sockets into map, status:%d",
Status);
// arg2 = arg2 = Status = arg2
----------------------------------------------------------*/
#ifndef _clog_3_ARGS_TRACE_DatapathRawMapInsertFail
#define _clog_3_ARGS_TRACE_DatapathRawMapInsertFail(uniqueId, encoded_arg_string, arg2)\
tracepoint(CLOG_DATAPATH_RAW_C, DatapathRawMapInsertFail , arg2);\

#endif




/*----------------------------------------------------------
// Decoder Ring for AllocFailure
// Allocation of '%s' failed. (%llu bytes)
Expand Down
19 changes: 19 additions & 0 deletions src/generated/linux/datapath_raw.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@



/*----------------------------------------------------------
// Decoder Ring for DatapathRawMapInsertFail
// [ dp] XDP map mode: failed to insert XSK sockets into map, status:%d
// QuicTraceLogVerbose(
DatapathRawMapInsertFail,
"[ dp] XDP map mode: failed to insert XSK sockets into map, status:%d",
Status);
// arg2 = arg2 = Status = arg2
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_C, DatapathRawMapInsertFail,
TP_ARGS(
int, arg2),
TP_FIELDS(
ctf_integer(int, arg2, arg2)
)
)



/*----------------------------------------------------------
// Decoder Ring for AllocFailure
// Allocation of '%s' failed. (%llu bytes)
Expand Down
48 changes: 48 additions & 0 deletions src/generated/linux/datapath_raw_xdp_win.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,54 @@ tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpPartitionShutdownComplete , arg2);\



/*----------------------------------------------------------
// Decoder Ring for XdpMapInsertFailed
// [ixdp][%p] XdpMapInsert failed for IfIndex=%u, QueueId=%u, XskMap=%p, RxXsk=%p
// QuicTraceLogVerbose(
XdpMapInsertFailed,
"[ixdp][%p] XdpMapInsert failed for IfIndex=%u, QueueId=%u, XskMap=%p, RxXsk=%p",
Interface,
Interface->IfIndex,
j,
XskMap,
Queue->RxXsk);
// arg2 = arg2 = Interface = arg2
// arg3 = arg3 = Interface->IfIndex = arg3
// arg4 = arg4 = j = arg4
// arg5 = arg5 = XskMap = arg5
// arg6 = arg6 = Queue->RxXsk = arg6
----------------------------------------------------------*/
#ifndef _clog_7_ARGS_TRACE_XdpMapInsertFailed
#define _clog_7_ARGS_TRACE_XdpMapInsertFailed(uniqueId, encoded_arg_string, arg2, arg3, arg4, arg5, arg6)\
tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpMapInsertFailed , arg2, arg3, arg4, arg5, arg6);\

#endif




/*----------------------------------------------------------
// Decoder Ring for XdpMapModeConfigured
// [ixdp][%p] Map mode configured for IfIndex=%u (MapHandle=%p)
// QuicTraceLogVerbose(
XdpMapModeConfigured,
"[ixdp][%p] Map mode configured for IfIndex=%u (MapHandle=%p)",
Interface,
Interface->IfIndex,
XskMap);
// arg2 = arg2 = Interface = arg2
// arg3 = arg3 = Interface->IfIndex = arg3
// arg4 = arg4 = XskMap = arg4
----------------------------------------------------------*/
#ifndef _clog_5_ARGS_TRACE_XdpMapModeConfigured
#define _clog_5_ARGS_TRACE_XdpMapModeConfigured(uniqueId, encoded_arg_string, arg2, arg3, arg4)\
tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpMapModeConfigured , arg2, arg3, arg4);\

#endif




/*----------------------------------------------------------
// Decoder Ring for LibraryErrorStatus
// [ lib] ERROR, %u, %s.
Expand Down
62 changes: 62 additions & 0 deletions src/generated/linux/datapath_raw_xdp_win.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,68 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpPartitionShutdownComplete,



/*----------------------------------------------------------
// Decoder Ring for XdpMapInsertFailed
// [ixdp][%p] XdpMapInsert failed for IfIndex=%u, QueueId=%u, XskMap=%p, RxXsk=%p
// QuicTraceLogVerbose(
XdpMapInsertFailed,
"[ixdp][%p] XdpMapInsert failed for IfIndex=%u, QueueId=%u, XskMap=%p, RxXsk=%p",
Interface,
Interface->IfIndex,
j,
XskMap,
Queue->RxXsk);
// arg2 = arg2 = Interface = arg2
// arg3 = arg3 = Interface->IfIndex = arg3
// arg4 = arg4 = j = arg4
// arg5 = arg5 = XskMap = arg5
// arg6 = arg6 = Queue->RxXsk = arg6
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpMapInsertFailed,
TP_ARGS(
const void *, arg2,
unsigned int, arg3,
unsigned int, arg4,
const void *, arg5,
const void *, arg6),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2)
ctf_integer(unsigned int, arg3, arg3)
ctf_integer(unsigned int, arg4, arg4)
ctf_integer_hex(uint64_t, arg5, (uint64_t)arg5)
ctf_integer_hex(uint64_t, arg6, (uint64_t)arg6)
)
)



/*----------------------------------------------------------
// Decoder Ring for XdpMapModeConfigured
// [ixdp][%p] Map mode configured for IfIndex=%u (MapHandle=%p)
// QuicTraceLogVerbose(
XdpMapModeConfigured,
"[ixdp][%p] Map mode configured for IfIndex=%u (MapHandle=%p)",
Interface,
Interface->IfIndex,
XskMap);
// arg2 = arg2 = Interface = arg2
// arg3 = arg3 = Interface->IfIndex = arg3
// arg4 = arg4 = XskMap = arg4
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpMapModeConfigured,
TP_ARGS(
const void *, arg2,
unsigned int, arg3,
const void *, arg4),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2)
ctf_integer(unsigned int, arg3, arg3)
ctf_integer_hex(uint64_t, arg4, (uint64_t)arg4)
)
)



/*----------------------------------------------------------
// Decoder Ring for LibraryErrorStatus
// [ lib] ERROR, %u, %s.
Expand Down
Loading
Loading