Skip to content

Commit

Permalink
App Controlled Execution Config (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Sep 30, 2022
1 parent 2fc5c34 commit 5b921c9
Show file tree
Hide file tree
Showing 63 changed files with 1,025 additions and 1,022 deletions.
34 changes: 0 additions & 34 deletions .azure/azure-pipelines.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,6 @@ stages:
config: Debug
extraName: 'static'
extraBuildArgs: -EnableTelemetryAsserts -Static -ExtraArtifactDir Static
- template: ./templates/build-config-user.yml
parameters:
image: windows-2019
platform: windows
arch: x64
tls: schannel
config: Debug
extraName: 'shared_ec'
extraBuildArgs: -EnableTelemetryAsserts -SharedEC -ExtraArtifactDir shared_ec
- template: ./templates/build-config-user.yml
parameters:
image: windows-2019
Expand Down Expand Up @@ -334,15 +325,6 @@ stages:
config: Debug
extraName: 'systemopenssl'
extraBuildArgs: -UseSystemOpenSSLCrypto -ExtraArtifactDir SystemCrypto
- template: ./templates/build-config-user.yml
parameters:
image: ubuntu-latest
platform: linux
arch: x64
tls: openssl
config: Debug
extraName: 'shared_ec'
extraBuildArgs: -SharedEC -ExtraArtifactDir shared_ec

- stage: build_linux_nontest
displayName: Build Linux - Non Tested
Expand Down Expand Up @@ -689,14 +671,6 @@ stages:
platform: windows
tls: schannel
allocFail: 100
- template: ./templates/run-spinquic.yml
parameters:
image: windows-2022
platform: windows
tls: schannel
allocFail: 100
extraArtifactDir: '_shared_ec'
extraTestArgs: -ExtraArtifactDir shared_ec
- template: ./templates/run-spinquic.yml
parameters:
image: windows-2022
Expand Down Expand Up @@ -738,14 +712,6 @@ stages:
platform: linux
tls: openssl
allocFail: 100
- template: ./templates/run-spinquic.yml
parameters:
image: ubuntu-latest
platform: linux
tls: openssl
allocFail: 100
extraArtifactDir: '_shared_ec'
extraTestArgs: -ExtraArtifactDir shared_ec
- template: ./templates/run-spinquic.yml
parameters:
image: macOS-12
Expand Down
114 changes: 3 additions & 111 deletions .azure/azure-pipelines.perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ parameters:
type: boolean
displayName: Windows (Schannel)
default: true
- name: winuser_sharedec
type: boolean
displayName: Windows (SharedEC, Schannel)
default: true
- name: winuser_xdp
type: boolean
displayName: Windows (XDP, Schannel)
Expand All @@ -68,10 +64,6 @@ parameters:
type: boolean
displayName: Linux (OpenSSL)
default: true
- name: linux_sharedec
type: boolean
displayName: Linux (SharedEC, OpenSSL)
default: true
- name: arch
type: string
displayName: Architecture
Expand Down Expand Up @@ -172,27 +164,6 @@ stages:
${{ if eq(parameters.pgo_mode, true) }}:
extraBuildArgs: -DisableTest -DisableTools -PGO

- ${{ if eq(parameters.winuser_sharedec, true) }}:
- stage: build_winuser_sharedec
displayName: Build Windows (SharedEC)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: windows-latest
platform: windows
arch: ${{ parameters.arch }}
tls: schannel
config: Release
extraName: 'sharedec'
extraPrepareArgs: -DisableTest
${{ if eq(parameters.pgo_mode, false) }}:
extraBuildArgs: -DisableTest -DisableTools -SharedEC -ExtraArtifactDir SharedEC
${{ if eq(parameters.pgo_mode, true) }}:
extraBuildArgs: -DisableTest -DisableTools -SharedEC -ExtraArtifactDir SharedEC -PGO

- ${{ if eq(parameters.winuser_xdp, true) }}:
- stage: build_winuser_xdp
displayName: Build Windows (XDP)
Expand Down Expand Up @@ -251,27 +222,6 @@ stages:
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTest -DisableTools

- ${{ if eq(parameters.linux_sharedec, true) }}:
- stage: build_linux_sharedec
displayName: Build Linux (SharedEC)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: ubuntu-latest
platform: linux
arch: ${{ parameters.arch }}
tls: openssl
config: Release
extraName: 'sharedec'
extraPrepareArgs: -DisableTest
${{ if eq(parameters.pgo_mode, false) }}:
extraBuildArgs: -DisableTest -DisableTools -SharedEC -ExtraArtifactDir SharedEC
${{ if eq(parameters.pgo_mode, true) }}:
extraBuildArgs: -DisableTest -DisableTools -SharedEC -ExtraArtifactDir SharedEC -PGO

#
# Tests
#
Expand Down Expand Up @@ -327,33 +277,6 @@ stages:
extraArgs: -PGO
failOnRegression: 0

- ${{ if eq(parameters.winuser_sharedec, true) }}:
- stage: perf_winuser_sharedec
displayName: Performance Testing Windows (SharedEC)
dependsOn:
- build_winuser_sharedec
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: schannel
remoteTls: schannel
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
extraArtifactDir: '_SharedEC'
extraTestArgs: -ExtraArtifactDir _SharedEC
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
${{ if eq(parameters.pgo_mode, false) }}:
extraArgs: -SharedEC -Publish
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -SharedEC -PGO
failOnRegression: 0

- ${{ if eq(parameters.winuser_xdp, true) }}:
- stage: perf_winuser_xdp
displayName: Performance Testing Windows (XDP)
Expand All @@ -372,14 +295,14 @@ stages:
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
extraArtifactDir: '_Xdp'
extraTestArgs: -ExtraArtifactDir _Xdp
extraTestArgs: -ExtraArtifactDir _Xdp -XDP
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: Remote
${{ if eq(parameters.pgo_mode, false) }}:
extraArgs: -XDP -Publish
extraArgs: -Publish
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -XDP -PGO
extraArgs: -PGO
failOnRegression: 0

- ${{ if eq(parameters.winuser_openssl, true) }}:
Expand Down Expand Up @@ -430,46 +353,15 @@ stages:
extraArgs: -PGO
failOnRegression: 0

- ${{ if eq(parameters.linux_sharedec, true) }}:
- stage: perf_linux_sharedec
displayName: Performance Testing Linux (SharedEC)
dependsOn:
- build_linux_sharedec
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Linux-Perf
platform: linux
localTls: openssl
remoteTls: openssl
iterations: ${{ parameters.iterations }}
arch: ${{ parameters.arch }}
protocol: ${{ parameters.protocol }}
logProfile: ${{ parameters.logging }}
timeout: ${{ parameters.timeout }}
extraArtifactDir: '_SharedEC'
extraTestArgs: -ExtraArtifactDir _SharedEC
${{ if ne(parameters.testToRun, 'all') }}:
testToRun: ${{ parameters.testToRun }}
testTypes: 'Remote'
${{ if eq(parameters.pgo_mode, false) }}:
extraArgs: -SharedEC -Publish
${{ if eq(parameters.pgo_mode, true) }}:
extraArgs: -SharedEC -PGO
failOnRegression: 0


- ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
- stage: perf_post_process
displayName: Perf Post Processing
condition: succeededOrFailed()
dependsOn:
- perf_winkernel
- perf_winuser_schannel
- perf_winuser_sharedec
- perf_winuser_xdp
- perf_winuser_openssl
- perf_linux_openssl
- perf_linux_sharedec
jobs:
- template: ./templates/post-process-performance.yml
40 changes: 2 additions & 38 deletions .azure/azure-pipelines.periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,6 @@ stages:
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTest -DisableTools -PGO

- stage: build_winuser_sharedec
displayName: Build Windows (SharedEC)
dependsOn: []
variables:
runCodesignValidationInjection: false
jobs:
- template: ./templates/build-config-user.yml
parameters:
image: windows-latest
platform: windows
arch: x64
tls: schannel
config: Release
extraName: 'sharedec'
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTest -DisableTools -SharedEC -ExtraArtifactDir SharedEC -PGO

- stage: build_winuser_xdp
displayName: Build Windows (XDP)
dependsOn: []
Expand Down Expand Up @@ -123,24 +106,6 @@ stages:
extraArgs: -PGO
failOnRegression: 0

- stage: perf_winuser_sharedec
displayName: Performance Testing Windows (SharedEC)
dependsOn:
- build_winuser_sharedec
jobs:
- template: ./templates/run-performance.yml
parameters:
pool: MsQuic-Win-Perf
platform: windows
localTls: schannel
remoteTls: schannel
arch: x64
extraArtifactDir: '_SharedEC'
extraTestArgs: -ExtraArtifactDir _SharedEC
testTypes: Remote
extraArgs: -SharedEC -PGO
failOnRegression: 0

- stage: perf_winuser_xdp
displayName: Performance Testing Windows (XDP)
dependsOn:
Expand All @@ -154,17 +119,16 @@ stages:
remoteTls: schannel
arch: x64
extraArtifactDir: '_Xdp'
extraTestArgs: -ExtraArtifactDir _Xdp
extraTestArgs: -ExtraArtifactDir _Xdp -XDP
testTypes: Remote
extraArgs: -XDP -PGO
extraArgs: -PGO
failOnRegression: 0

- stage: make_pull_request
displayName: Make Pull Request
dependsOn:
- perf_winuser_schannel
- perf_winuser_openssl
- perf_winuser_sharedec
- perf_winuser_xdp
jobs:
- template: ./templates/make-pgo-pr.yml
4 changes: 2 additions & 2 deletions .github/workflows/test-down-level.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
run: |
chmod +x artifacts/bin/linux/${{matrix.arch}}_Release_${{matrix.tls}}/msquictest
$env:LD_LIBRARY_PATH = Join-Path (Get-Location).Path "artifacts/bin/linux/${{matrix.arch}}_Release_${{matrix.tls}}"
scripts/test.ps1 -AZP -Config Release -Arch ${{ matrix.arch }} -Tls ${{ matrix.tls }} -SkipUnitTests -Filter -*CredValidation*:*ConnectClientCertificate*:Basic.StartTwoListenersSameALPN
scripts/test.ps1 -AZP -Config Release -Arch ${{ matrix.arch }} -Tls ${{ matrix.tls }} -SkipUnitTests -Filter -*CredValidation*:*ConnectClientCertificate*:Basic.StartTwoListenersSameALPN:ParameterValidation.ValidateGlobalParam
- name: Run Tests (Windows)
if: runner.os == 'Windows'
run: scripts/test.ps1 -AZP -Config Release -Arch ${{ matrix.arch }} -Tls ${{ matrix.tls }} -SkipUnitTests -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ConnectClientCertificate*:Basic.StartTwoListenersSameALPN
run: scripts/test.ps1 -AZP -Config Release -Arch ${{ matrix.arch }} -Tls ${{ matrix.tls }} -SkipUnitTests -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ConnectClientCertificate*:Basic.StartTwoListenersSameALPN:ParameterValidation.ValidateGlobalParam
20 changes: 6 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ option(QUIC_SKIP_CI_CHECKS "Disable CI specific build checks" OFF)
option(QUIC_TELEMETRY_ASSERTS "Enable telemetry asserts in release builds" OFF)
option(QUIC_USE_SYSTEM_LIBCRYPTO "Use system libcrypto if openssl TLS" OFF)
option(QUIC_HIGH_RES_TIMERS "Configure the system to use high resolution timers" OFF)
option(QUIC_SHARED_EC "Use shared execution contexts between QUIC and UDP" OFF)
option(QUIC_USE_XDP "Uses XDP instead of socket APIs" OFF)
option(QUIC_DISABLE_POSIX_GSO "Disable GSO for systems that say they support it but don't" OFF)
set(QUIC_FOLDER_PREFIX "" CACHE STRING "Optional prefix for source group folders when using an IDE generator")
Expand Down Expand Up @@ -323,21 +322,14 @@ if(QUIC_HIGH_RES_TIMERS)
list(APPEND QUIC_COMMON_DEFINES QUIC_HIGH_RES_TIMERS=1)
endif()

if(QUIC_SHARED_EC)
list(APPEND QUIC_COMMON_DEFINES QUIC_USE_EXECUTION_CONTEXTS=1)
endif()

if(QUIC_USE_XDP)
list(APPEND QUIC_COMMON_DEFINES QUIC_USE_EXECUTION_CONTEXTS=1 QUIC_USE_RAW_DATAPATH=1)
list(APPEND QUIC_COMMON_DEFINES QUIC_USE_RAW_DATAPATH=1)
endif()

if(QUIC_TLS STREQUAL "schannel")
message(STATUS "Enabling Schannel configuration tests")
list(APPEND QUIC_COMMON_DEFINES QUIC_TEST_SCHANNEL_FLAGS=1)
if (NOT QUIC_SHARED_EC)
message(STATUS "Enabling UDP Send Queuing")
list(APPEND QUIC_COMMON_DEFINES CXPLAT_DATAPATH_QUEUE_SENDS=1)
endif()

message(STATUS "Disabling PFX tests")
list(APPEND QUIC_COMMON_DEFINES QUIC_DISABLE_PFX_TESTS)
message(STATUS "Disabling 0-RTT support")
Expand Down Expand Up @@ -383,6 +375,9 @@ if(WIN32)
message(STATUS "Disabling (client) shared port support")
list(APPEND QUIC_COMMON_DEFINES QUIC_DISABLE_SHARED_PORT_TESTS)

message(STATUS "Enabling UDP Send Queuing")
list(APPEND QUIC_COMMON_DEFINES CXPLAT_DATAPATH_QUEUE_SENDS=1)

if (QUIC_UWP_BUILD)
list(APPEND QUIC_COMMON_DEFINES QUIC_UWP_BUILD QUIC_RESTRICTED_BUILD)
set(CMAKE_CXX_STANDARD_LIBRARIES "")
Expand Down Expand Up @@ -484,10 +479,7 @@ if(WIN32)
set(QUIC_PGO_NAME "msquic.${QUIC_TLS}.xdp.pgd")
set(QUIC_PGO_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/bin/winuser/pgo_${SYSTEM_PROCESSOR}/${QUIC_PGO_NAME}")
endif()
if(NOT EXISTS "${QUIC_PGO_FILE}" AND QUIC_SHARED_EC)
set(QUIC_PGO_NAME "msquic.${QUIC_TLS}.sharedec.pgd")
set(QUIC_PGO_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/bin/winuser/pgo_${SYSTEM_PROCESSOR}/${QUIC_PGO_NAME}")
endif()

if(NOT EXISTS "${QUIC_PGO_FILE}")
set(QUIC_PGO_NAME "msquic.${QUIC_TLS}.pgd")
set(QUIC_PGO_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/bin/winuser/pgo_${SYSTEM_PROCESSOR}/${QUIC_PGO_NAME}")
Expand Down
2 changes: 1 addition & 1 deletion docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ These parameters are accessed by calling [GetParam](./api/GetParam.md) or [SetPa
| `QUIC_PARAM_GLOBAL_GLOBAL_SETTINGS`<br> 6 | QUIC_GLOBAL_SETTINGS | Both | Globally change global only settings. |
| `QUIC_PARAM_GLOBAL_VERSION_SETTINGS`<br> 7 | QUIC_VERSIONS_SETTINGS | Both | Globally change version settings for all subsequent connections. |
| `QUIC_PARAM_GLOBAL_LIBRARY_GIT_HASH`<br> 8 | char[64] | Get-only | Git hash used to build MsQuic (null terminated string) |
| `QUIC_PARAM_GLOBAL_DATAPATH_PROCESSORS`<br> 9 | uint16_t[] | Both | Globally change the list of CPUs that datapath can use. Must be set before opening registration. |
| `QUIC_PARAM_GLOBAL_EXECUTION_CONFIG`<br> 9 | QUIC_EXECUTION_CONFIG | Both | Globally configure the execution model used for QUIC. Must be set before opening registration. |
| `QUIC_PARAM_GLOBAL_TLS_PROVIDER`<br> 10 | QUIC_TLS_PROVIDER | Get-Only | The TLS provider being used by MsQuic for the TLS handshake. |

## Registration Parameters
Expand Down
Loading

0 comments on commit 5b921c9

Please sign in to comment.