Skip to content

Commit ae3db5c

Browse files
ami-GSnibanks
andauthored
Unify datapath (#3819)
* Remove QUIC_USE_RAW_DATAPATH (logic only) * move logic to core side * remove QUIC_USE_RAW_DATAPATH from test * fix googletest version and add last line * replace from flag to function call * fix build error * fix build/test issues * implement CxPlatResolveRoute for normal socket * add Getter of Datapath feature * fix build issues * adopt comments * adopt comment and fix kernel build error * fix kernel build error * more fix for kernel build * Unify datapath * DatapathTest partially work * just unify build of both normal socket and xdp * SOCKET: RAW{...Socket{BASE{addr}}}, DATAPATH: XDP{RAW{DATAPATH*}} <-> DATAPATH{RAW*, BASE{callbacks}} * tmp * add preview_feature flag back * refactoring CxPlatIsRouteReady * fix linux code check * adjust func names * fix comments * fix IsRouteReady and clean ifdef for _KERNEL_MODE * kernel build error * Set RouteResolved for Rx * fix more tests * move global definition in header file * kernel to avoid calling helper function * move QuitTestIsFeatureSupported after RegistrationOpen * supress warning * remove QuitTestIsFeatureSupported from quic_gtest as it doesn't work as expected by dependency of MsQuicLib.Datapath * remove raw feature check as much as possible * ifdef for UseQTIP visibility * tmp * tmp * fix merge side effects * all tests passed * fix tests in msquicplatformtest * fix tcp with duonic * update clog * use xdp v1 * WIP cleanup * refactoring CXPLAT_SEND_DATA * remove mangling and function pointer * remove unnecessary change in test * fix comments * cleanup * move logic to _winuser * use dummy raw datapath for uwp build * dummy raw * remove double free * fix comments * update dummy func * fix perf run for TCP * partially fix comments * fix build error for uwp and remove duplicate variable in raw socket * set socket before start receiving * add dummy to clog * add clog files for dummy * fix dependency for cargo on windows * remove dummy clog files * remove AuxSocket * add pwsh for cargo setup * clog fix * add include dir for cargo * [WIP] fix cargo and qtip * fix clog, qtip, rename private raw functions and cleanup * experiment to avoid write overflow * use Config->Route->DatapathType for data allocation * more strict if conditions * fix comments * fix uwp build * fix clog and artifact name * fix back xdp dependency * Simply build automation * missed one * apply unification to linux and remove QUIC_USE_XDP flag * move types to any platform * add abstruction layer for linux * add clog * add clog dependencies * fix CodeCheck issues * remove xdp specific artifact dir name and always install xdp deps * add docs * More Fixes for XDP in automation (mostly OneBranch) --------- Co-authored-by: Nick Banks <[email protected]>
1 parent f9d26ac commit ae3db5c

File tree

63 files changed

+3170
-2868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3170
-2868
lines changed

.azure/OneBranch.Official.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,6 @@ extends:
8686
parameters:
8787
config: Debug
8888

89-
- stage: build_windows_xdp
90-
displayName: Build Windows XDP
91-
dependsOn: []
92-
jobs:
93-
- template: .azure/obtemplates/build-winuser-xdp.yml@self
94-
parameters:
95-
config: Release
96-
tls: schannel
97-
- template: .azure/obtemplates/build-winuser-xdp.yml@self
98-
parameters:
99-
config: Release
100-
tls: openssl
101-
- template: .azure/obtemplates/build-winuser-xdp.yml@self
102-
parameters:
103-
config: Debug
104-
10589
- stage: build_windows
10690
displayName: Build Windows
10791
dependsOn: []
@@ -204,7 +188,6 @@ extends:
204188
dependsOn:
205189
- build_windows
206190
- build_uwp
207-
- build_windows_xdp
208191
jobs:
209192
- template: .azure/obtemplates/build-nuget.yml@self
210193
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:

.azure/OneBranch.PullRequest.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,6 @@ extends:
8282
parameters:
8383
config: Debug
8484

85-
- stage: build_windows_xdp
86-
displayName: Build Windows XDP
87-
dependsOn: []
88-
jobs:
89-
- template: .azure/obtemplates/build-winuser-xdp.yml@self
90-
parameters:
91-
config: Release
92-
tls: schannel
93-
- template: .azure/obtemplates/build-winuser-xdp.yml@self
94-
parameters:
95-
config: Release
96-
tls: openssl
97-
- template: .azure/obtemplates/build-winuser-xdp.yml@self
98-
parameters:
99-
config: Debug
100-
10185
- stage: build_windows
10286
displayName: Build Windows
10387
dependsOn: []
@@ -198,6 +182,5 @@ extends:
198182
dependsOn:
199183
- build_windows
200184
- build_uwp
201-
- build_windows_xdp
202185
jobs:
203186
- template: .azure/obtemplates/build-nuget.yml@self

.azure/azure-pipelines.perf.yml

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ stages:
157157
arch: ${{ parameters.arch }}
158158
config: Release
159159

160-
- ${{ if or(eq(parameters.winkernel, true), eq(parameters.winuser_schannel, true)) }}:
160+
- ${{ if or(eq(parameters.winkernel, true), eq(parameters.winuser_schannel, true), eq(parameters.winuser_xdp, true)) }}:
161161
- stage: build_winuser_schannel
162162
displayName: Build Windows (Schannel)
163163
dependsOn: []
@@ -171,33 +171,12 @@ stages:
171171
arch: ${{ parameters.arch }}
172172
tls: schannel
173173
config: Release
174-
extraPrepareArgs: -DisableTest
174+
extraPrepareArgs: -DisableTest -InstallXdpSdk
175175
${{ if eq(parameters.pgo_mode, false) }}:
176176
extraBuildArgs: -DisableTest -DisableTools
177177
${{ if eq(parameters.pgo_mode, true) }}:
178178
extraBuildArgs: -DisableTest -DisableTools -PGO
179179

180-
- ${{ if eq(parameters.winuser_xdp, true) }}:
181-
- stage: build_winuser_xdp
182-
displayName: Build Windows (XDP)
183-
dependsOn: []
184-
variables:
185-
runCodesignValidationInjection: false
186-
jobs:
187-
- template: ./templates/build-config-user.yml
188-
parameters:
189-
image: windows-latest
190-
platform: windows
191-
arch: ${{ parameters.arch }}
192-
tls: schannel
193-
config: Release
194-
extraName: 'xdp'
195-
extraPrepareArgs: -DisableTest -InstallXdpSdk
196-
${{ if eq(parameters.pgo_mode, false) }}:
197-
extraBuildArgs: -DisableTest -DisableTools -UseXdp -ExtraArtifactDir Xdp
198-
${{ if eq(parameters.pgo_mode, true) }}:
199-
extraBuildArgs: -DisableTest -DisableTools -UseXdp -ExtraArtifactDir Xdp -PGO
200-
201180
- ${{ if eq(parameters.winuser_openssl, true) }}:
202181
- stage: build_winuser_openssl
203182
displayName: Build Windows (OpenSSL)
@@ -331,7 +310,7 @@ stages:
331310
- stage: perf_winuser_xdp
332311
displayName: Performance Testing Windows (XDP)
333312
dependsOn:
334-
- build_winuser_xdp
313+
- build_winuser_schannel
335314
jobs:
336315
- template: ./templates/run-performance.yml
337316
parameters:
@@ -344,11 +323,10 @@ stages:
344323
protocol: ${{ parameters.protocol }}
345324
logProfile: ${{ parameters.logging }}
346325
timeout: ${{ parameters.timeout }}
347-
extraArtifactDir: '_Xdp'
348326
${{ if eq(parameters.QTIP, true) }}:
349-
extraTestArgs: -ExtraArtifactDir _Xdp -XDP -QTIP
327+
extraTestArgs: -XDP -QTIP
350328
${{ else }}:
351-
extraTestArgs: -ExtraArtifactDir _Xdp -XDP
329+
extraTestArgs: -XDP
352330
${{ if ne(parameters.testToRun, 'all') }}:
353331
testToRun: ${{ parameters.testToRun }}
354332
testTypes: Remote

.azure/azure-pipelines.periodic.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ stages:
3434
arch: x64
3535
tls: schannel
3636
config: Release
37-
extraPrepareArgs: -DisableTest
37+
extraPrepareArgs: -DisableTest -InstallXdpSdk
3838
extraBuildArgs: -DisableTest -DisableTools -PGO
3939

4040
- stage: build_winuser_openssl
@@ -69,23 +69,6 @@ stages:
6969
extraPrepareArgs: -DisableTest
7070
extraBuildArgs: -DisableTest -DisableTools -PGO
7171

72-
- stage: build_winuser_xdp
73-
displayName: Build Windows (XDP)
74-
dependsOn: []
75-
variables:
76-
runCodesignValidationInjection: false
77-
jobs:
78-
- template: ./templates/build-config-user.yml
79-
parameters:
80-
image: windows-latest
81-
platform: windows
82-
arch: x64
83-
tls: schannel
84-
config: Release
85-
extraName: 'xdp'
86-
extraPrepareArgs: -DisableTest -InstallXdpSdk
87-
extraBuildArgs: -DisableTest -DisableTools -UseXdp -ExtraArtifactDir Xdp -PGO
88-
8972
#
9073
# Performance Tests
9174
#
@@ -141,7 +124,7 @@ stages:
141124
- stage: perf_winuser_xdp
142125
displayName: Performance Testing Windows (XDP)
143126
dependsOn:
144-
- build_winuser_xdp
127+
- build_winuser_schannel
145128
jobs:
146129
- template: ./templates/run-performance.yml
147130
parameters:
@@ -150,8 +133,7 @@ stages:
150133
localTls: schannel
151134
remoteTls: schannel
152135
arch: x64
153-
extraArtifactDir: '_Xdp'
154-
extraTestArgs: -ExtraArtifactDir _Xdp -XDP
136+
extraTestArgs: -XDP
155137
testTypes: Remote
156138
extraArgs: -PGO
157139
failOnRegression: 0

.azure/obtemplates/build-nuget.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,6 @@ jobs:
5656
artifact: drop_build_uwp_build_uwp_openssl_Debug
5757
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
5858

59-
- task: DownloadPipelineArtifact@2
60-
inputs:
61-
artifact: drop_build_windows_xdp_build_windows_schannel_Debug_xdp
62-
path: $(Build.SourcesDirectory)\artifacts\bin\windows
63-
- task: DownloadPipelineArtifact@2
64-
inputs:
65-
artifact: drop_build_windows_xdp_build_windows_schannel_Release_xdp
66-
path: $(Build.SourcesDirectory)\artifacts\bin\windows
67-
- task: DownloadPipelineArtifact@2
68-
inputs:
69-
artifact: drop_build_windows_xdp_build_windows_openssl_Release_xdp
70-
path: $(Build.SourcesDirectory)\artifacts\bin\windows
71-
7259
- task: PowerShell@2
7360
displayName: Package Nuget
7461
inputs:
@@ -99,26 +86,6 @@ jobs:
9986
${{ if eq(parameters.release, true) }}:
10087
arguments: -Tls schannel -ReleaseBuild
10188

102-
- task: PowerShell@2
103-
displayName: Package Nuget
104-
inputs:
105-
pwsh: false
106-
filePath: scripts/package-nuget.ps1
107-
${{ if eq(parameters.release, false) }}:
108-
arguments: -Tls schannel -XDP
109-
${{ if eq(parameters.release, true) }}:
110-
arguments: -Tls schannel -ReleaseBuild -XDP
111-
112-
- task: PowerShell@2
113-
displayName: Package Nuget
114-
inputs:
115-
pwsh: false
116-
filePath: scripts/package-nuget.ps1
117-
${{ if eq(parameters.release, false) }}:
118-
arguments: -Tls openssl -XDP
119-
${{ if eq(parameters.release, true) }}:
120-
arguments: -Tls openssl -ReleaseBuild -XDP
121-
12289
- task: onebranch.pipeline.signing@1
12390
inputs:
12491
command: 'sign'

.azure/obtemplates/build-winuser-xdp.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.azure/obtemplates/build-winuser.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ jobs:
1313
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sdl
1414
ob_sdl_codeSignValidation_excludes: -|**\*.exe # Disable signing requirements for test executables
1515
steps:
16+
- task: PowerShell@2
17+
displayName: Prepare Build Machine
18+
target: windows_build_container2
19+
inputs:
20+
pwsh: true
21+
filePath: scripts/prepare-machine.ps1
22+
arguments: -InstallXdpSdk -ForContainerBuild
1623
- task: PowerShell@2
1724
displayName: x64
1825
target: windows_build_container2

.github/workflows/build-reuse-win.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ on:
4747
# - openssl
4848
# - openssl3
4949
# - schannel
50-
xdp:
51-
required: false
52-
default: ''
53-
type: string
5450
static:
5551
required: false
5652
default: ''
@@ -89,11 +85,11 @@ jobs:
8985
- name: Build For Test
9086
if: inputs.test == '-Test'
9187
shell: pwsh
92-
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisablePerf -DynamicCRT ${{ inputs.xdp }} ${{ inputs.sanitize }}
88+
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} -DisablePerf -DynamicCRT ${{ inputs.sanitize }}
9389
- name: Build
9490
if: inputs.test == ''
9591
shell: pwsh
96-
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.xdp }} ${{ inputs.sanitize }} ${{ inputs.static }}
92+
run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.sanitize }} ${{ inputs.static }}
9793
- name: Filter Build Artifacts
9894
shell: pwsh
9995
run: |
@@ -103,5 +99,5 @@ jobs:
10399
- name: Upload build artifacts
104100
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
105101
with:
106-
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.xdp }}${{ inputs.sanitize }}${{ inputs.static }}${{ inputs.test }}
102+
name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.sanitize }}${{ inputs.static }}${{ inputs.test }}
107103
path: artifacts

.github/workflows/build.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
arch: [x86, x64, arm64]
3333
tls: [schannel, openssl, openssl3]
3434
static: ['', '-Static']
35-
xdp: ['', '-UseXdp']
3635
exclude:
3736
# OpenSSL doesn't support arm64
3837
- tls: openssl
@@ -46,15 +45,6 @@ jobs:
4645
# TODO: FIX: Static builds fail with UWP
4746
- plat: uwp
4847
static: '-Static'
49-
# XDP not supported in UWP
50-
- plat: uwp
51-
xdp: '-UseXdp'
52-
# XDP only supports x64 currently
53-
- arch: x86
54-
xdp: '-UseXdp'
55-
# XDP only supports x64 currently
56-
- arch: arm64
57-
xdp: '-UseXdp'
5848
uses: ./.github/workflows/build-reuse-win.yml
5949
with:
6050
config: ${{ matrix.config }}
@@ -63,7 +53,6 @@ jobs:
6353
arch: ${{ matrix.arch }}
6454
tls: ${{ matrix.tls }}
6555
static: ${{ matrix.static }}
66-
xdp: ${{ matrix.xdp }}
6756

6857
build-windows-kernel:
6958
name: WinKernel
@@ -201,8 +190,6 @@ jobs:
201190
{ plat: "uwp", tls: "openssl", arg: "-UWP" },
202191
{ plat: "windows", tls: "openssl" },
203192
{ plat: "windows", tls: "schannel" },
204-
{ plat: "windows", tls: "openssl", xdp: "-UseXdp", arg: "-XDP" },
205-
{ plat: "windows", tls: "schannel", xdp: "-UseXdp", arg: "-XDP" },
206193
]
207194
runs-on: windows-2022
208195
steps:
@@ -211,19 +198,19 @@ jobs:
211198
- name: Download Build Artifacts
212199
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
213200
with:
214-
name: Release-${{ matrix.vec.plat }}-windows-2022-x86-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}
201+
name: Release-${{ matrix.vec.plat }}-windows-2022-x86-${{ matrix.vec.tls }}
215202
path: artifacts
216203
if_no_artifact_found: ignore
217204
- name: Download Build Artifacts
218205
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
219206
with:
220-
name: Release-${{ matrix.vec.plat }}-windows-2022-x64-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}
207+
name: Release-${{ matrix.vec.plat }}-windows-2022-x64-${{ matrix.vec.tls }}
221208
path: artifacts
222209
if_no_artifact_found: ignore
223210
- name: Download Build Artifacts
224211
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
225212
with:
226-
name: Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}
213+
name: Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }}
227214
path: artifacts
228215
if_no_artifact_found: ignore
229216
- name: Build Package
@@ -232,5 +219,5 @@ jobs:
232219
- name: Upload build artifacts
233220
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
234221
with:
235-
name: Nuget-Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}
222+
name: Nuget-Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }}
236223
path: artifacts/dist/*.nupkg

.github/workflows/cargo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
- name: Cargo test
4646
run: cargo test --all
4747
- name: Cargo Publish (dry run)
48-
run: cargo publish --dry-run
48+
run: cargo publish --dry-run --allow-dirty

0 commit comments

Comments
 (0)