diff --git a/.azure/OneBranch.Official.yml b/.azure/OneBranch.Official.yml index c2d0feb745..520dfcf7f8 100644 --- a/.azure/OneBranch.Official.yml +++ b/.azure/OneBranch.Official.yml @@ -27,7 +27,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time - name: 'WindowsContainerImage2DockerTag' displayName: 'WindowsContainerImage2 DockerTag' type: string - default: '20240309.1' # if initializing docker takes too long, grab a newer docker image from Docker.Official pipeline. + default: '20240713.1' # if initializing docker takes too long, grab a newer docker image from Docker.Official pipeline. variables: CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning @@ -78,12 +78,12 @@ extends: - container: linux_build_container # Default container image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-cross' type: Linux - - container: ubuntu_2204_xdp - image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-xdp' - type: Linux - - container: ubuntu_2204_cross + - container: kernel5_15_cross image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-cross' type: Linux + - container: kernel6_8_cross + image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-24.04-cross' + type: Linux stages: - stage: build_winkernel @@ -179,11 +179,23 @@ extends: - template: .azure/obtemplates/build-linux.yml@self parameters: config: Release + kernel: "kernel5_15" + tls: openssl3 + - template: .azure/obtemplates/build-linux.yml@self + parameters: + config: Debug + kernel: "kernel5_15" + tls: openssl3 + - template: .azure/obtemplates/build-linux.yml@self + parameters: + config: Release + kernel: "kernel6_8" tls: openssl3 xdp: "-UseXdp" - template: .azure/obtemplates/build-linux.yml@self parameters: config: Debug + kernel: "kernel6_8" tls: openssl3 xdp: "-UseXdp" @@ -195,6 +207,15 @@ extends: - template: .azure/obtemplates/build-linux-packages.yml@self parameters: sign: true + kernel: "kernel5_4" + - template: .azure/obtemplates/build-linux-packages.yml@self + parameters: + sign: true + kernel: "kernel5_15" + - template: .azure/obtemplates/build-linux-packages.yml@self + parameters: + sign: true + kernel: "kernel6_8" - stage: package_windows displayName: Package Windows diff --git a/.azure/OneBranch.Package.yml b/.azure/OneBranch.Package.yml index 8e925c3b91..f4d71f8228 100644 --- a/.azure/OneBranch.Package.yml +++ b/.azure/OneBranch.Package.yml @@ -95,7 +95,7 @@ extends: ob_createvpack_owneralias: quicdev ob_createvpack_description: msquic.$(Build.SourceBranchName) ob_createvpack_versionAs: string - ob_createvpack_version: 2.4.0-$(Build.BuildId) + ob_createvpack_version: 2.5.0-$(Build.BuildId) steps: - task: DownloadPipelineArtifact@2 inputs: diff --git a/.azure/OneBranch.Publish.yml b/.azure/OneBranch.Publish.yml index f9c9ec22c2..56d8e2e993 100644 --- a/.azure/OneBranch.Publish.yml +++ b/.azure/OneBranch.Publish.yml @@ -15,63 +15,173 @@ variables: DisableDockerDetector: true parameters: -- name: opensslrpmcblrepos +- name: debug # debug mode will not actually upload and publish packages + type: boolean + default: false + + # build on ubuntu 20.04 openssl 1.1 +- name: kernel5_4rpmcblrepos type: object default: - cbl-mariner-1.0-prod-Microsoft-x86_64-rpms-yum - cbl-mariner-2.0-prod-Microsoft-x86_64-yum - cbl-mariner-2.0-prod-Microsoft-aarch64-yum -- name: opensslrpmrepos +- name: kernel5_4rpmrepos type: object default: - - microsoft-sles12-prod-yum - - microsoft-sles15-prod-yum - - microsoft-centos7-prod-yum - - microsoft-centos8-prod-yum - - microsoft-opensuse15-prod-yum - - microsoft-fedora32-prod-yum - - microsoft-fedora33-prod-yum - - microsoft-fedora34-prod-yum - - microsoft-fedora37-prod-yum - - microsoft-rhel7.3-prod-yum - - microsoft-rhel8.0-prod-yum - - microsoft-rhel8.1-prod-yum -- name: openssldebrepos + - microsoft-sles12-prod-yum # 12 3.12 + - microsoft-sles15-prod-yum # 15 4.12 + - microsoft-centos7-prod-yum # 7 3.10 + - microsoft-centos8-prod-yum # 8 4.18 + - microsoft-opensuse15-prod-yum # 15 4.12 + - microsoft-fedora32-prod-yum # 32 5.6 + - microsoft-fedora33-prod-yum # 33 5.8 + - microsoft-fedora34-prod-yum # 34 5.11 + - microsoft-fedora35-prod-yum # 35 5.14 + - microsoft-rhel7.3-prod-yum # 7.3 3.10 + - microsoft-rhel8.0-prod-yum # 8.0 4.18 + - microsoft-rhel8.1-prod-yum # 8.1 4.18 +- name: kernel5_4debrepos type: object default: - - microsoft-ubuntu-xenial-prod-apt - - microsoft-debian-stretch-prod-apt - - microsoft-ubuntu-bionic-prod-apt - - microsoft-debian-buster-prod-apt - - microsoft-ubuntu-focal-prod-apt - - microsoft-ubuntu-groovy-prod-apt - - microsoft-ubuntu-hirsute-prod-apt - - microsoft-debian-bullseye-prod-apt -- name: openssl3debrepos + - microsoft-ubuntu-xenial-prod-apt # 16.04 4.4 + - microsoft-ubuntu-bionic-prod-apt # 18.04 4.15 + - microsoft-ubuntu-focal-prod-apt # 20.04 5.4 + - microsoft-ubuntu-groovy-prod-apt # 20.10 5.8 + - microsoft-ubuntu-hirsute-prod-apt # 21.04 5.11 + - microsoft-debian-stretch-prod-apt # 9 4.9 + - microsoft-debian-buster-prod-apt # 10 4.19 + - microsoft-debian-bullseye-prod-apt # 11 5.10 + + # built on ubuntu 22.04, openssl3 +- name: kernel5_15rpmrepos type: object default: - - microsoft-ubuntu-jammy-prod-apt - - microsoft-ubuntu-kinetic-prod-apt - - microsoft-ubuntu-lunar-prod-apt - - microsoft-ubuntu-mantic-prod-apt - - microsoft-debian-bookworm-prod-apt -- name: openssl3rpmrepos + - microsoft-fedora36-prod-yum # 36 5.17 + - microsoft-fedora37-prod-yum # 37 6.0 + - microsoft-fedora38-prod-yum # 38 6.2 + - microsoft-fedora39-prod-yum # 39 6.5 + - microsoft-rhel9.0-prod-yum # 9.0 5.14 +- name: kernel5_15debrepos type: object default: - - microsoft-fedora36-prod-yum - - microsoft-fedora38-prod-yum - - microsoft-fedora39-prod-yum - - microsoft-rhel9.0-prod-yum -- name: debug # debug mode will not actually upload and publish packages - type: boolean - default: false + - microsoft-ubuntu-jammy-prod-apt # 22.04 5.15 + - microsoft-ubuntu-kinetic-prod-apt # 22.10 5.19 + - microsoft-ubuntu-lunar-prod-apt # 23.04 6.2 + - microsoft-ubuntu-mantic-prod-apt # 23.10 6.5 + - microsoft-debian-bookworm-prod-apt # 12 6.1 + + # built on ubuntu 24.04 openssl3 XDP +- name: kernel6_8cblrpmrepos + type: object + default: + - azurelinux-3.0-prod-ms-oss-x86_64-yum # 3.0 6.6 + - azurelinux-3.0-prod-ms-oss-aarch64-yum # 3.0 6.6 +- name: kernel6_8rpmrepos + type: object + default: + - microsoft-fedora40-prod-yum # 40 6.8 +- name: kernel6_8debrepos + type: object + default: + - microsoft-ubuntu-noble-prod-apt # 24.04 6.8 stages: - stage: UploadPackage_stage condition: or(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['Build.Reason'], 'Manual')) jobs: - - job: UploadPackage_openssl_debs - displayName: Upload openSSL based DEB packages to repos + - job: UploadPackage_kernel5_4_debs + displayName: Upload kernel5_4 based DEB packages to repos + timeoutInMinutes: 120 + workspace: + clean: all + pool: + vmImage: 'ubuntu-latest' + variables: + - group: MsQuicAADApp + steps: + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: $(resources.pipeline.onebranch.projectID) + pipeline: $(resources.pipeline.onebranch.pipelineID) + preferTriggeringPipeline: true + runVersion: specific + runId: $(resources.pipeline.onebranch.runID) + artifact: drop_package_linux_distribution_kernel5_4 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_4 + - task: DownloadSecureFile@1 + name: pmcv4cert + displayName: 'Download cert for PMC v4' + inputs: + secureFile: 'auth.pem' + - ${{ each repo in parameters.kernel5_4debrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_4/gen -r ${{ repo }} -n "*.deb" + condition: eq(${{ parameters.debug }}, false) + displayName: ${{ repo }} + continueOnError: true + - job: UploadPackage_kernel5_4_rpms + displayName: Upload kernel5_4 based RPM packages to repos + timeoutInMinutes: 120 + workspace: + clean: all + pool: + vmImage: 'ubuntu-latest' + variables: + - group: MsQuicAADApp + steps: + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: $(resources.pipeline.onebranch.projectID) + pipeline: $(resources.pipeline.onebranch.pipelineID) + preferTriggeringPipeline: true + runVersion: specific + runId: $(resources.pipeline.onebranch.runID) + artifact: drop_package_linux_distribution_kernel5_4 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_4 + - task: DownloadSecureFile@1 + name: pmcv4cert + displayName: 'Download cert for PMC v4' + inputs: + secureFile: 'auth.pem' + - ${{ each repo in parameters.kernel5_4rpmrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_4/gen -r ${{ repo }} -n "*.rpm" + condition: eq(${{ parameters.debug }}, false) + displayName: ${{ repo }} + continueOnError: true + - job: UploadPackage_kernel5_4_rpms_cbl + displayName: Upload kernel5_4 based RPM packages to CBL repos + timeoutInMinutes: 120 + workspace: + clean: all + pool: + vmImage: 'ubuntu-latest' + variables: + - group: MsQuicAADApp + steps: + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: $(resources.pipeline.onebranch.projectID) + pipeline: $(resources.pipeline.onebranch.pipelineID) + preferTriggeringPipeline: true + runVersion: specific + runId: $(resources.pipeline.onebranch.runID) + artifact: drop_package_linux_distribution_kernel5_4 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_4 + - task: DownloadSecureFile@1 + name: pmcv4cert + displayName: 'Download cert for PMC v4' + inputs: + secureFile: 'auth.pem' + - ${{ each repo in parameters.kernel5_4rpmcblrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_4/cbl -r ${{ repo }} -n "*.rpm" + condition: eq(${{ parameters.debug }}, false) + displayName: ${{ repo }} + continueOnError: true + - job: UploadPackage_kernel6_8_rpms_cbl + displayName: Upload kernel6_8 based RPM packages to CBL repos timeoutInMinutes: 120 workspace: clean: all @@ -88,20 +198,20 @@ stages: preferTriggeringPipeline: true runVersion: specific runId: $(resources.pipeline.onebranch.runID) - artifact: drop_package_linux_distribution_openssl - path: $(Build.SourcesDirectory)/artifacts/signed/openssl + artifact: drop_package_linux_distribution_kernel6_8 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel6_8 - task: DownloadSecureFile@1 name: pmcv4cert displayName: 'Download cert for PMC v4' inputs: secureFile: 'auth.pem' - - ${{ each repo in parameters.openssldebrepos }}: - - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl/gen -r ${{ repo }} -n "*.deb" + - ${{ each repo in parameters.kernel6_8cblrpmrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel6_8/cbl -r ${{ repo }} -n "*.rpm" condition: eq(${{ parameters.debug }}, false) displayName: ${{ repo }} continueOnError: true - - job: UploadPackage_openssl_rpms - displayName: Upload openSSL based RPM packages to repos + - job: UploadPackage_kernel5_15_debs + displayName: Upload kernel5_15 based DEB packages to repos timeoutInMinutes: 120 workspace: clean: all @@ -118,20 +228,20 @@ stages: preferTriggeringPipeline: true runVersion: specific runId: $(resources.pipeline.onebranch.runID) - artifact: drop_package_linux_distribution_openssl - path: $(Build.SourcesDirectory)/artifacts/signed/openssl + artifact: drop_package_linux_distribution_kernel5_15 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_15 - task: DownloadSecureFile@1 name: pmcv4cert displayName: 'Download cert for PMC v4' inputs: secureFile: 'auth.pem' - - ${{ each repo in parameters.opensslrpmrepos }}: - - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl/gen -r ${{ repo }} -n "*.rpm" + - ${{ each repo in parameters.kernel5_15debrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_15/gen -r ${{ repo }} -n "*.deb" condition: eq(${{ parameters.debug }}, false) displayName: ${{ repo }} continueOnError: true - - job: UploadPackage_openssl_rpms_cbl - displayName: Upload openSSL based RPM packages to CBL repos + - job: UploadPackage_kernel6_8_debs + displayName: Upload kernel6_8 based DEB packages to repos timeoutInMinutes: 120 workspace: clean: all @@ -148,20 +258,20 @@ stages: preferTriggeringPipeline: true runVersion: specific runId: $(resources.pipeline.onebranch.runID) - artifact: drop_package_linux_distribution_openssl - path: $(Build.SourcesDirectory)/artifacts/signed/openssl + artifact: drop_package_linux_distribution_kernel6_8 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel6_8 - task: DownloadSecureFile@1 name: pmcv4cert displayName: 'Download cert for PMC v4' inputs: secureFile: 'auth.pem' - - ${{ each repo in parameters.opensslrpmcblrepos }}: - - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl/cbl -r ${{ repo }} -n "*.rpm" + - ${{ each repo in parameters.kernel6_8debrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel6_8/gen -r ${{ repo }} -n "*.deb" condition: eq(${{ parameters.debug }}, false) displayName: ${{ repo }} continueOnError: true - - job: UploadPackage_openssl3_debs - displayName: Upload openSSL3 based DEB packages to repos + - job: UploadPackage_kernel5_15_rpms + displayName: Upload kernel5_15 based RPM packages to repos timeoutInMinutes: 120 workspace: clean: all @@ -178,20 +288,20 @@ stages: preferTriggeringPipeline: true runVersion: specific runId: $(resources.pipeline.onebranch.runID) - artifact: drop_package_linux_distribution_openssl3 - path: $(Build.SourcesDirectory)/artifacts/signed/openssl3 + artifact: drop_package_linux_distribution_kernel5_15 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_15 - task: DownloadSecureFile@1 name: pmcv4cert displayName: 'Download cert for PMC v4' inputs: secureFile: 'auth.pem' - - ${{ each repo in parameters.openssl3debrepos }}: - - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl3/gen -r ${{ repo }} -n "*.deb" + - ${{ each repo in parameters.kernel5_15rpmrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_15/gen -r ${{ repo }} -n "*.rpm" condition: eq(${{ parameters.debug }}, false) displayName: ${{ repo }} continueOnError: true - - job: UploadPackage_openssl3_rpms - displayName: Upload openSSL3 based RPM packages to repos + - job: UploadPackage_kernel6_8_rpms + displayName: Upload kernel6_8 based RPM packages to repos timeoutInMinutes: 120 workspace: clean: all @@ -208,15 +318,15 @@ stages: preferTriggeringPipeline: true runVersion: specific runId: $(resources.pipeline.onebranch.runID) - artifact: drop_package_linux_distribution_openssl3 - path: $(Build.SourcesDirectory)/artifacts/signed/openssl3 + artifact: drop_package_linux_distribution_kernel6_8 + path: $(Build.SourcesDirectory)/artifacts/signed/kernel6_8 - task: DownloadSecureFile@1 name: pmcv4cert displayName: 'Download cert for PMC v4' inputs: secureFile: 'auth.pem' - - ${{ each repo in parameters.openssl3rpmrepos }}: - - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl3/gen -r ${{ repo }} -n "*.rpm" + - ${{ each repo in parameters.kernel6_8rpmrepos }}: + - script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel6_8/gen -r ${{ repo }} -n "*.rpm" condition: eq(${{ parameters.debug }}, false) displayName: ${{ repo }} continueOnError: true diff --git a/.azure/OneBranch.PullRequest.yml b/.azure/OneBranch.PullRequest.yml index d5ec8bcb6f..1b873524c9 100644 --- a/.azure/OneBranch.PullRequest.yml +++ b/.azure/OneBranch.PullRequest.yml @@ -25,7 +25,7 @@ parameters: - name: 'WindowsContainerImage2DockerTag' displayName: 'WindowsContainerImage2 DockerTag' type: string - default: 'vse2022.5' + default: '20240713.1' # if initializing docker takes too long, grab a newer docker image from Docker.Official pipeline. variables: system.debug: ${{ parameters.debug }} @@ -74,12 +74,12 @@ extends: - container: linux_build_container # Default container image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-cross' type: Linux - - container: ubuntu_2204_xdp - image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-xdp' - type: Linux - - container: ubuntu_2204_cross + - container: kernel5_15_cross image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-cross' type: Linux + - container: kernel6_8_cross + image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-24.04-cross' + type: Linux stages: - stage: build_winkernel @@ -175,11 +175,23 @@ extends: - template: .azure/obtemplates/build-linux.yml@self parameters: config: Release + kernel: "kernel5_15" + tls: openssl3 + - template: .azure/obtemplates/build-linux.yml@self + parameters: + config: Debug + kernel: "kernel5_15" + tls: openssl3 + - template: .azure/obtemplates/build-linux.yml@self + parameters: + config: Release + kernel: "kernel6_8" tls: openssl3 xdp: "-UseXdp" - template: .azure/obtemplates/build-linux.yml@self parameters: config: Debug + kernel: "kernel6_8" tls: openssl3 xdp: "-UseXdp" @@ -189,6 +201,14 @@ extends: - build_linux jobs: - template: .azure/obtemplates/build-linux-packages.yml@self + parameters: + kernel: "kernel5_4" + - template: .azure/obtemplates/build-linux-packages.yml@self + parameters: + kernel: "kernel5_15" + - template: .azure/obtemplates/build-linux-packages.yml@self + parameters: + kernel: "kernel6_8" - stage: package_windows displayName: Package Windows diff --git a/.azure/obtemplates/build-distribution.yml b/.azure/obtemplates/build-distribution.yml index 6b146fb8da..da280a297e 100644 --- a/.azure/obtemplates/build-distribution.yml +++ b/.azure/obtemplates/build-distribution.yml @@ -13,22 +13,39 @@ jobs: - template: ./download-artifacts.yml parameters: platform: linux + kernel: kernel5_4 config: Release tls: openssl - template: ./download-artifacts.yml parameters: platform: linux + kernel: kernel5_4 config: Debug tls: openssl - template: ./download-artifacts.yml parameters: platform: linux + kernel: kernel5_15 config: Release tls: openssl3 - template: ./download-artifacts.yml parameters: platform: linux + kernel: kernel5_15 + config: Debug + tls: openssl3 + + - template: ./download-artifacts.yml + parameters: + platform: linux + kernel: kernel6_8 + config: Release + tls: openssl3 + - template: ./download-artifacts.yml + parameters: + platform: linux + kernel: kernel6_8 config: Debug tls: openssl3 diff --git a/.azure/obtemplates/build-linux-packages.yml b/.azure/obtemplates/build-linux-packages.yml index 454debdb3e..bf8dbf69be 100644 --- a/.azure/obtemplates/build-linux-packages.yml +++ b/.azure/obtemplates/build-linux-packages.yml @@ -1,22 +1,17 @@ parameters: - sign: false +- name: sign + type: boolean + default: false +- name: kernel + type: string jobs: -- job: distribution +- job: distribution_${{ parameters.kernel }} # artifact becomes drop_package_linux_${{ jobname }} displayName: Distribution - strategy: - matrix: - openssl: - openssl_name: openssl - artifact_suffix: '_openssl' - openssl3: - openssl_name: openssl3 - artifact_suffix: '_openssl3' pool: type: linux variables: ob_outputDirectory: $(Build.SourcesDirectory)/artifacts/dist - ob_artifactSuffix: $(artifact_suffix) steps: - task: PowerShell@2 displayName: Prepare Build Machine @@ -26,12 +21,12 @@ jobs: arguments: -ForContainerBuild - task: DownloadPipelineArtifact@2 inputs: - artifact: drop_build_linux_build_linux_$(openssl_name)_Debug + artifact: drop_build_linux_${{ parameters.kernel }}_Debug path: $(Build.SourcesDirectory)/artifacts/bin/linux pattern: '*.tar' - task: DownloadPipelineArtifact@2 inputs: - artifact: drop_build_linux_build_linux_$(openssl_name)_Release + artifact: drop_build_linux_${{ parameters.kernel }}_Release path: $(Build.SourcesDirectory)/artifacts/bin/linux pattern: '*.tar' - script: | # rebuild artifacts with correct permissions and symlink attributes. @@ -43,6 +38,8 @@ jobs: inputs: pwsh: false filePath: scripts/package-distribution.ps1 + ${{ if eq(parameters.kernel, 'kernel6_8') }}: + arguments: -Time64Distro - script: | # prepare 2 sets of packages for signing with different keys (gen = general purpose, cbl = cbl-mariner) mkdir $(Build.SourcesDirectory)/artifacts/dist/gen find $(Build.SourcesDirectory)/artifacts/dist -type f -exec mv -t $(Build.SourcesDirectory)/artifacts/dist/gen/ {} + diff --git a/.azure/obtemplates/build-linux.yml b/.azure/obtemplates/build-linux.yml index 8d9b84122d..6eb4e59819 100644 --- a/.azure/obtemplates/build-linux.yml +++ b/.azure/obtemplates/build-linux.yml @@ -2,11 +2,12 @@ parameters: config: '' tls: 'openssl' platform: 'linux' + kernel: 'kernel5_4' xdp: '' jobs: -- job: build_${{ parameters.platform }}_${{ parameters.tls }}_${{ parameters.config }} - displayName: ${{ parameters.platform }} ${{ parameters.tls }} ${{ parameters.config }} +- job: ${{ parameters.kernel }}_${{ parameters.config }} # this job name becomes artifact suffix in the build pipeline + displayName: ${{ parameters.platform }} ${{ parameters.kernel }} ${{ parameters.tls }} ${{ parameters.config }} pool: type: linux variables: @@ -16,40 +17,48 @@ jobs: steps: - task: PowerShell@2 displayName: Prepare Build Machine - ${{ if eq(parameters.tls, 'openssl') }}: + ${{ if eq(parameters.kernel, 'kernel5_4') }}: target: linux_build_container + ${{ elseif eq(parameters.kernel, 'kernel5_15') }}: + target: kernel5_15_cross ${{ else }}: - target: ubuntu_2204_xdp + target: kernel6_8_cross inputs: pwsh: true filePath: scripts/prepare-machine.ps1 arguments: -Tls ${{ parameters.tls }} -ForContainerBuild - task: PowerShell@2 displayName: x64 - ${{ if eq(parameters.tls, 'openssl') }}: + ${{ if eq(parameters.kernel, 'kernel5_4') }}: target: linux_build_container + ${{ elseif eq(parameters.kernel, 'kernel5_15') }}: + target: kernel5_15_cross ${{ else }}: - target: ubuntu_2204_xdp + target: kernel6_8_cross inputs: pwsh: true filePath: scripts/build.ps1 arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} ${{ parameters.xdp }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease - task: PowerShell@2 displayName: arm64 - ${{ if eq(parameters.tls, 'openssl') }}: + ${{ if eq(parameters.kernel, 'kernel5_4') }}: target: linux_build_container + ${{ elseif eq(parameters.kernel, 'kernel5_15') }}: + target: kernel5_15_cross ${{ else }}: - target: ubuntu_2204_cross + target: kernel6_8_cross inputs: pwsh: true filePath: scripts/build.ps1 arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch arm64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease - task: PowerShell@2 displayName: arm - ${{ if eq(parameters.tls, 'openssl') }}: + ${{ if eq(parameters.kernel, 'kernel5_4') }}: target: linux_build_container + ${{ elseif eq(parameters.kernel, 'kernel5_15') }}: + target: kernel5_15_cross ${{ else }}: - target: ubuntu_2204_cross + target: kernel6_8_cross inputs: pwsh: true filePath: scripts/build.ps1 diff --git a/.azure/obtemplates/download-artifacts.yml b/.azure/obtemplates/download-artifacts.yml index 139b8e9106..7958379514 100644 --- a/.azure/obtemplates/download-artifacts.yml +++ b/.azure/obtemplates/download-artifacts.yml @@ -2,6 +2,7 @@ parameters: platform: '' + kernel: 'kernel5_4' tls: '' config: '' @@ -14,7 +15,10 @@ steps: preferTriggeringPipeline: true runVersion: specific runId: $(resources.pipeline.onebranch.runID) - artifact: drop_build_${{ parameters.platform }}_build_${{ parameters.platform }}_${{ parameters.tls }}_${{ parameters.config }} + ${{ if eq(parameters.platform, 'linux') }}: + artifact: drop_build_${{ parameters.platform }}_${{ parameters.kernel }}_${{ parameters.config }} + ${{ else }}: + artifact: drop_build_${{ parameters.platform }}_build_${{ parameters.platform }}_${{ parameters.tls }}_${{ parameters.config }} path: $(Build.SourcesDirectory)/artifacts/bin/${{ parameters.platform }} - task: PowerShell@2 diff --git a/.github/workflows/build-reuse-darwin-framework.yml b/.github/workflows/build-reuse-darwin-framework.yml index 95b0576511..a4c85fdc9c 100644 --- a/.github/workflows/build-reuse-darwin-framework.yml +++ b/.github/workflows/build-reuse-darwin-framework.yml @@ -58,12 +58,12 @@ jobs: repository: microsoft/msquic ref: ${{ inputs.ref }} - name: Download Build Artifacts (x64) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ inputs.config }}-macos-macos-12-x64-${{ inputs.tls }}${{ inputs.static }} path: artifacts - name: Download Build Artifacts (arm64) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ inputs.config }}-macos-macos-12-arm64-${{ inputs.tls }}${{ inputs.static }} path: artifacts @@ -71,7 +71,7 @@ jobs: shell: pwsh run: scripts/merge-darwin.ps1 -DeleteSource -Config ${{ inputs.config }} - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: ${{ inputs.config }}-macos-macos-12-universal-${{ inputs.tls }}${{ inputs.static }} path: artifacts @@ -95,7 +95,7 @@ jobs: repository: microsoft/msquic ref: ${{ inputs.ref }} - name: Download Build Artifacts (x64) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ inputs.config }}-${{ matrix.vec.plat }}-macos-12-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }} path: artifacts @@ -103,7 +103,7 @@ jobs: shell: pwsh run: scripts/package-darwin-framework.ps1 -Config ${{ inputs.config }} -Platform ${{ matrix.vec.plat }} -Arch ${{ matrix.vec.arch }} - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: Framework-${{ inputs.config }}-${{ matrix.vec.plat }}-macos-12-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }} path: artifacts @@ -119,17 +119,17 @@ jobs: repository: microsoft/msquic ref: ${{ inputs.ref }} - name: Download Build Artifacts (iOS x64) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: Framework-${{ inputs.config }}-ios-macos-12-x64-openssl path: artifacts - name: Download Build Artifacts (iOS arm64) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: Framework-${{ inputs.config }}-ios-macos-12-arm64-openssl path: artifacts - name: Download Build Artifacts (MacOS Universal) - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: Framework-${{ inputs.config }}-macos-macos-12-universal-openssl path: artifacts @@ -137,7 +137,7 @@ jobs: shell: pwsh run: scripts/package-darwin-xcframework.ps1 -Config ${{ inputs.config }} - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: XCFramework-${{ inputs.config }} path: artifacts/frameworks diff --git a/.github/workflows/build-reuse-unix.yml b/.github/workflows/build-reuse-unix.yml index 4530c0ae13..01b988f862 100644 --- a/.github/workflows/build-reuse-unix.yml +++ b/.github/workflows/build-reuse-unix.yml @@ -32,6 +32,7 @@ on: # options: # - ubuntu-20.04 # - ubuntu-22.04 + # - ubuntu-24.04 # - macos-12 arch: required: false @@ -85,7 +86,7 @@ jobs: name: Build runs-on: ${{ inputs.os }} container: - image: ${{ (inputs.plat == 'linux' && format('ghcr.io/microsoft/msquic/linux-build-xcomp:{0}-{1}', inputs.os, ((inputs.xdp == '-UseXdp' && inputs.os == 'ubuntu-22.04') && 'xdp') || 'cross')) || '' }} + image: ${{ (inputs.plat == 'linux' && format('ghcr.io/microsoft/msquic/linux-build-xcomp:{0}-cross', inputs.os)) || '' }} steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -113,7 +114,7 @@ jobs: shell: pwsh run: scripts/build.ps1 -Config ${{ inputs.config }} -Platform ${{ inputs.plat }} -Arch ${{ inputs.arch }} -Tls ${{ inputs.tls }} ${{ inputs.static }} ${{ inputs.clang }} ${{ inputs.systemcrypto }} ${{ inputs.codecheck }} ${{ inputs.sanitize }} ${{ inputs.xdp }} -OneBranch - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.static }}${{ inputs.clang }}${{ inputs.systemcrypto }}${{ inputs.codecheck }}${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }} path: artifacts diff --git a/.github/workflows/build-reuse-win.yml b/.github/workflows/build-reuse-win.yml index 85e1d32994..bdd47d6431 100644 --- a/.github/workflows/build-reuse-win.yml +++ b/.github/workflows/build-reuse-win.yml @@ -74,7 +74,7 @@ jobs: repository: microsoft/msquic ref: ${{ inputs.ref }} - name: Install Perl - uses: shogo82148/actions-setup-perl@28eae78d12c2bba1163aec45d123f6d9228bc307 + uses: shogo82148/actions-setup-perl@f551dafcc94572adc179bbddbb409b3ada8f8ff5 with: perl-version: '5.34' - name: Install NASM @@ -101,7 +101,7 @@ jobs: Remove-Item artifacts/corenet-ci-main -Recurse -Force -ErrorAction Ignore Remove-Item artifacts/xdp -Recurse -Force -ErrorAction Ignore - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.sanitize }}${{ inputs.static }}${{ inputs.build }} path: artifacts diff --git a/.github/workflows/build-reuse-winkernel.yml b/.github/workflows/build-reuse-winkernel.yml index 6c61f50cf8..7c2199beee 100644 --- a/.github/workflows/build-reuse-winkernel.yml +++ b/.github/workflows/build-reuse-winkernel.yml @@ -88,7 +88,7 @@ jobs: Remove-Item artifacts/corenet-ci-main -Recurse -Force -ErrorAction Ignore Remove-Item artifacts/xdp -Recurse -Force -ErrorAction Ignore - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: ${{ inputs.config }}-${{ inputs.plat }}-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}${{ inputs.build }} path: artifacts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d66d417af..25127add67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: matrix: config: ['Debug', 'Release'] plat: [linux] - os: ['ubuntu-20.04', 'ubuntu-22.04'] + os: ['ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04'] arch: [arm, arm64] tls: [openssl, openssl3] static: ['', '-Static'] @@ -102,7 +102,7 @@ jobs: matrix: config: ['Debug', 'Release'] plat: [linux, android] - os: ['ubuntu-20.04', 'ubuntu-22.04'] + os: ['ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04'] arch: [x86, x64] tls: [openssl, openssl3] systemcrypto: ['', '-UseSystemOpenSSLCrypto'] @@ -117,6 +117,9 @@ jobs: # Android doesn't use system crypto - plat: android systemcrypto: '-UseSystemOpenSSLCrypto' + # TODO: android to support ubuntu-24.04 + - plat: android + os: 'ubuntu-24.04' # No openssl3 system crypto on ubuntu-20.04 - plat: linux os: 'ubuntu-20.04' @@ -127,11 +130,18 @@ jobs: os: 'ubuntu-22.04' tls: 'openssl' systemcrypto: '-UseSystemOpenSSLCrypto' - # linux xdp is for ubuntu22.04 only for now + # No openssl system crypto on ubuntu-24.04 + - plat: linux + os: 'ubuntu-24.04' + tls: 'openssl' + systemcrypto: '-UseSystemOpenSSLCrypto' + # linux xdp is for ubuntu24.04 only for now - plat: android xdp: "-UseXdp" - os: 'ubuntu-20.04' xdp: "-UseXdp" + - os: 'ubuntu-22.04' + xdp: "-UseXdp" - arch: x86 xdp: "-UseXdp" # Android doesn't use Clang @@ -226,7 +236,7 @@ jobs: shell: pwsh run: scripts/package-nuget.ps1 -Tls ${{ matrix.vec.tls }} ${{ matrix.vec.arg }} -GHA - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: Nuget-Release-${{ matrix.vec.plat }}-windows-2022-arm64-${{ matrix.vec.tls }} path: artifacts/dist/*.nupkg diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index dfca9ac0e4..6ff737e81f 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -21,7 +21,7 @@ jobs: name: Cargo steps: - name: Harden Runner - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde with: egress-policy: audit - name: Checkout repository @@ -31,7 +31,7 @@ jobs: shell: pwsh - name: Install Perl if: runner.os == 'Windows' - uses: shogo82148/actions-setup-perl@28eae78d12c2bba1163aec45d123f6d9228bc307 + uses: shogo82148/actions-setup-perl@f551dafcc94572adc179bbddbb409b3ada8f8ff5 with: perl-version: '5.34' - name: Install NASM diff --git a/.github/workflows/check-clog.yml b/.github/workflows/check-clog.yml index 555aa0fa73..2b03d96066 100644 --- a/.github/workflows/check-clog.yml +++ b/.github/workflows/check-clog.yml @@ -20,7 +20,7 @@ jobs: runs-on: windows-latest steps: - name: Setup .NET - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee with: dotnet-version: 6.0.x - name: Checkout repository diff --git a/.github/workflows/check-dotnet.yml b/.github/workflows/check-dotnet.yml index b168b5d2f8..7e7f3b5694 100644 --- a/.github/workflows/check-dotnet.yml +++ b/.github/workflows/check-dotnet.yml @@ -20,7 +20,7 @@ jobs: runs-on: windows-latest steps: - name: Setup .NET - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee with: dotnet-version: 6.0.x - name: Checkout repository diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 95f13ef185..68e409955e 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -21,7 +21,7 @@ jobs: dry-run: false language: c - name: Upload Crash - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a if: failure() && steps.build.outcome == 'success' with: name: artifacts diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 6e6e938bb4..a87943ea9e 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -56,7 +56,7 @@ jobs: with: fetch-depth: 0 - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts @@ -76,7 +76,7 @@ jobs: continue-on-error: true run: scripts/test.ps1 -NoProgress -IsolationMode Batch -SkipUnitTests -CodeCoverage -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -LogProfile Full.Light ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} - name: Upload Results - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: BVT-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.qtip }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }} path: artifacts/coverage/*.cov @@ -106,7 +106,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 with: fetch-depth: 0 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts @@ -126,7 +126,7 @@ jobs: shell: pwsh run: scripts/spin.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -Timeout ${{ env.main-timeout }} -RepeatCount ${{ env.main-repeat }} -AllocFail ${{ env.main-allocfail }} ${{ matrix.vec.xdp }} -CodeCoverage -LogProfile Basic.Light - name: Upload Results - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: Spin-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }} path: artifacts/coverage/*.cov @@ -152,7 +152,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 with: fetch-depth: 0 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts @@ -172,7 +172,7 @@ jobs: shell: pwsh run: scripts/recvfuzz.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -timeout ${{ env.main-timeout }} ${{ matrix.vec.xdp }} -CodeCoverage -LogProfile Basic.Light - name: Upload Results - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: RecvFuzz-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }} path: artifacts/coverage/*.cov @@ -193,17 +193,17 @@ jobs: shell: pwsh run: | New-Item -ItemType Directory -Force -Path artifacts\coverage\windows\x64_Debug_openssl - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 name: Download BVT Coverage Results with: name: BVT-Debug-windows-windows-2022-x64-openssl path: artifacts\coverage\windows\x64_Debug_openssl - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 name: Download SpinQuic Coverage Results with: name: Spin-Debug-windows-windows-2022-x64-openssl path: artifacts\coverage\windows\x64_Debug_openssl - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 name: Download RecvFuzz Coverage Results with: name: RecvFuzz-Debug-windows-windows-2022-x64-openssl @@ -216,7 +216,7 @@ jobs: shell: pwsh run: scripts/merge-coverage.ps1 -Config Debug -Arch x64 -Tls openssl - name: Upload Results - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: merged path: artifacts\coverage\windows\x64_Debug_openssl\msquiccoverage.xml @@ -228,7 +228,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 name: Download Merged Coverage Report with: name: merged diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d254b43e3a..d0797dacdf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde with: egress-policy: audit - name: Checkout repository @@ -51,7 +51,7 @@ jobs: cmake --build . --target OpenSSL_Target - name: Initialize CodeQL - uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 + uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa with: languages: cpp config-file: ./.github/codeql/codeql-config.yml @@ -62,4 +62,4 @@ jobs: cmake --build . - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 + uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa diff --git a/.github/workflows/docker-publish-xcomp.yml b/.github/workflows/docker-publish-xcomp.yml index ddae926360..38f92c9d2c 100644 --- a/.github/workflows/docker-publish-xcomp.yml +++ b/.github/workflows/docker-publish-xcomp.yml @@ -30,13 +30,7 @@ jobs: fail-fast: false matrix: version: ['20.04', '22.04', '24.04'] - target: ['xdp', 'cross'] - exclude: - # 20.04 doesn't support XDP, 24.04's XDP is included in cross - - version: '20.04' - target: 'xdp' - - version: '24.04' - target: 'xdp' + target: ['cross'] name: Build runs-on: ubuntu-latest @@ -46,7 +40,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde with: egress-policy: audit @@ -57,7 +51,7 @@ jobs: # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -74,7 +68,7 @@ jobs: # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image - uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 + uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: .docker/ubuntu-${{ matrix.version }} file: .docker/ubuntu-${{ matrix.version }}/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7daf00607d..b1ad705929 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 + uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde with: egress-policy: audit - name: Checkout repository @@ -38,7 +38,7 @@ jobs: # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -55,7 +55,7 @@ jobs: # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image - uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 + uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 with: context: . file: scripts/qns.Dockerfile diff --git a/.github/workflows/dotnet-test.yml b/.github/workflows/dotnet-test.yml index a2575a7951..3bde02a0c4 100644 --- a/.github/workflows/dotnet-test.yml +++ b/.github/workflows/dotnet-test.yml @@ -34,7 +34,8 @@ jobs: matrix: vec: [ { plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" }, - { plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, + { plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" }, + { plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, ] uses: ./.github/workflows/build-reuse-unix.yml with: @@ -73,7 +74,8 @@ jobs: { plat: "windows", os: "windows-2022", arch: "x64", tls: "openssl" }, { plat: "windows", os: "windows-2022", arch: "x64", tls: "openssl3" }, { plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" }, - { plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, + { plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" }, + { plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, { plat: "macos", os: "macos-12", arch: "universal", tls: "openssl" }, ] runs-on: ${{ matrix.vec.os }} @@ -82,13 +84,13 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Prepare Machine shell: pwsh - run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }} + run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }} - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: Debug-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }} path: artifacts - - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + - uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee with: dotnet-version: 6.0.x - name: Run Lang Interop diff --git a/.github/workflows/package-linux.yml b/.github/workflows/package-linux.yml index 4362bf926a..632b0578e9 100644 --- a/.github/workflows/package-linux.yml +++ b/.github/workflows/package-linux.yml @@ -32,7 +32,10 @@ jobs: { config: "Release", os: "ubuntu-20.04", arch: "x64", tls: "openssl" }, { config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "openssl3" }, { config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "openssl3" }, - { config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, + { config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" }, + { config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "openssl3", time64: "-Time64Distro" }, + { config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "openssl3", time64: "-Time64Distro" }, + { config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", time64: "-Time64Distro" }, ] uses: ./.github/workflows/package-reuse-linux.yml with: @@ -41,33 +44,28 @@ jobs: arch: ${{ matrix.vec.arch }} tls: ${{ matrix.vec.tls }} xdp: ${{ matrix.vec.xdp }} + time64: ${{ matrix.vec.time64 }} test-packages: name: Test Linux Packages needs: [build-packages] - runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: vec: [ { config: "Release", os: "ubuntu-20.04", arch: "x64", tls: "openssl" }, - { config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, + { config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" }, + { config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" }, ] + runs-on: ${{ matrix.vec.os }} steps: - - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - with: - fetch-depth: 0 - - name: Prepare Machine - shell: pwsh - run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }} - name: Download Package - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto${{ matrix.vec.xdp }} path: artifacts - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: Package-${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto${{ matrix.vec.xdp }} path: artifacts @@ -76,7 +74,7 @@ jobs: sudo apt-add-repository ppa:lttng/stable-2.13 sudo apt-get update sudo apt-get install -y lttng-tools - sudo find -name "*.deb" -exec dpkg -i {} \; + sudo find -name "*.deb" -exec sudo apt install -y ./{} \; rm artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}/libmsquic.so* ls artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }} - name: Test diff --git a/.github/workflows/package-reuse-linux.yml b/.github/workflows/package-reuse-linux.yml index 333cc2b8ba..2723b3052f 100644 --- a/.github/workflows/package-reuse-linux.yml +++ b/.github/workflows/package-reuse-linux.yml @@ -54,6 +54,10 @@ on: required: false default: '' type: string + time64: + required: false + default: '' + type: string permissions: read-all @@ -75,7 +79,7 @@ jobs: package: name: Package needs: [build-unix-reuse] - runs-on: ubuntu-22.04 + runs-on: ${{ inputs.os }} steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -83,9 +87,9 @@ jobs: fetch-depth: 0 - name: Prepare Machine shell: pwsh - run: scripts/prepare-machine.ps1 -ForBuild ${{ inputs.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }} + run: scripts/prepare-machine.ps1 -ForBuild ${{ inputs.xdp }} - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ inputs.config }}-linux-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}-UseSystemOpenSSLCrypto${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }} path: artifacts @@ -96,9 +100,9 @@ jobs: find -name "*.tar" -exec tar -xvf '{}' \; - name: Build Package shell: pwsh - run: scripts/package-distribution.ps1 + run: scripts/package-distribution.ps1 ${{ inputs.time64 }} - name: Upload build artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: Package-${{ inputs.config }}-linux-${{ inputs.os }}-${{ inputs.arch }}-${{ inputs.tls }}-UseSystemOpenSSLCrypto${{ inputs.sanitize }}${{ inputs.xdp }}${{ inputs.build }} path: artifacts/dist diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index c0a3e2993c..4e9a842c15 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -30,7 +30,7 @@ jobs: uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce - name: Build run: msbuild src\plugins\msquic.windbg.sln /p:configuration=${{ matrix.configuration }} /p:platform=${{ matrix.platform }} - - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: bin_windbg_${{ matrix.configuration }}_${{ matrix.platform }} path: | @@ -51,18 +51,17 @@ jobs: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Setup .NET - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee with: dotnet-version: 6.0.x + - name: Install Dependencies + run: dotnet tool install --global Microsoft.Performance.Toolkit.Plugins.Cli --version 0.1.25-preview - name: Build run: dotnet build src\plugins\QuicTrace.sln -c ${{ matrix.configuration }} - - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: bin_quictrace_${{ matrix.configuration }} path: artifacts/bin/quictrace/${{ matrix.configuration }} - # Package the plugin - - name: Install plugintool - run: dotnet tool install --global Microsoft.Performance.Toolkit.Plugins.Cli --version 0.1.25-preview - name: Package shell: pwsh run: | @@ -74,7 +73,7 @@ jobs: $packageName = "$pluginId-$pluginVersion.ptix" Write-Host "Creating $packageName" & plugintool pack -s $sourceDir -o "artifacts/bin/quictrace/$packageName" - - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: ptix_quictrace_${{ matrix.configuration }} - path: artifacts/bin/quictrace/QuicTrace-1.0.0.ptix + path: artifacts/bin/quictrace/*.ptix diff --git a/.github/workflows/publish-docfx.yml b/.github/workflows/publish-docfx.yml index d5501b958d..4ec043d5f0 100644 --- a/.github/workflows/publish-docfx.yml +++ b/.github/workflows/publish-docfx.yml @@ -31,7 +31,7 @@ jobs: - name: Checkout uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Dotnet Setup - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee with: dotnet-version: 7.x diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index c37b39c84f..2a4465bf79 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -28,7 +28,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 + uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 with: results_file: results.sarif results_format: sarif @@ -43,7 +43,7 @@ jobs: # Upload the results as artifacts (optional). - name: "Upload artifact" - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: SARIF file path: results.sarif @@ -51,6 +51,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 + uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa with: sarif_file: results.sarif diff --git a/.github/workflows/stress.yml b/.github/workflows/stress.yml index 830dec4b9c..b14d4c8c87 100644 --- a/.github/workflows/stress.yml +++ b/.github/workflows/stress.yml @@ -51,8 +51,9 @@ jobs: { config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl3", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, - { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test" }, - { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" }, + { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" }, ] uses: ./.github/workflows/build-reuse-unix.yml with: @@ -75,7 +76,9 @@ jobs: vec: [ { config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, - { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" }, { config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl", build: "-Test" }, { config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl3", build: "-Test" }, { config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", sanitize: "-Sanitize", build: "-Test" }, @@ -97,12 +100,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 if: matrix.vec.plat == 'windows' with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 if: matrix.vec.plat == 'linux' || matrix.vec.plat == 'macos' with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.xdp }}${{ matrix.vec.build }} @@ -112,7 +115,7 @@ jobs: run: | sudo chmod -R 777 artifacts - name: Prepare Machine - run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }} + run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }} shell: pwsh - name: spinquic (PR) if: github.event_name == 'pull_request' @@ -124,11 +127,15 @@ jobs: timeout-minutes: 65 shell: pwsh run: scripts/spin.ps1 -AZP -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -Timeout ${{ env.main-timeout }} -RepeatCount ${{ env.main-repeat }} -AllocFail ${{ env.main-allocfail }} ${{ matrix.vec.xdp }} + - name: Fix log permissions for Linux XDP + if: failure() && matrix.vec.plat == 'linux' # (matrix.vec.plat == 'linux' && matrix.vec.xdp == '-UseXdp') doesn't work for some reason + run: | + sudo chmod -R 777 artifacts - name: Upload on Failure - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a if: failure() with: - name: Stress-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }} + name: stress-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }} path: artifacts recvfuzz: @@ -153,12 +160,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 if: matrix.vec.plat == 'windows' with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os == 'WinServerPrerelease' && 'windows-2022' || matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 if: matrix.vec.plat == 'linux' || matrix.vec.plat == 'macos' with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} @@ -181,9 +188,9 @@ jobs: shell: pwsh run: scripts/recvfuzz.ps1 -AZP -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -timeout ${{ env.main-timeout }} ${{ matrix.vec.xdp }} - name: Upload on Failure - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a if: failure() with: - name: Stress-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }} + name: recvfuzz-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.sanitize }} path: artifacts diff --git a/.github/workflows/test-down-level.yml b/.github/workflows/test-down-level.yml index bbe9bce875..5fc3249476 100644 --- a/.github/workflows/test-down-level.yml +++ b/.github/workflows/test-down-level.yml @@ -48,7 +48,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Install Perl if: runner.os == 'Windows' - uses: shogo82148/actions-setup-perl@28eae78d12c2bba1163aec45d123f6d9228bc307 + uses: shogo82148/actions-setup-perl@f551dafcc94572adc179bbddbb409b3ada8f8ff5 with: perl-version: '5.34' - name: Install NASM diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0be7737e4..2a6aa60052 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,11 @@ name: BVT on: workflow_dispatch: + inputs: + ref: + required: false + default: '' + type: string push: branches: - main @@ -37,6 +42,7 @@ jobs: arch: ${{ matrix.vec.arch }} tls: ${{ matrix.vec.tls }} build: ${{ matrix.vec.build }} + ref: ${{ inputs.ref || '' }} build-windows: name: Build WinUser @@ -59,6 +65,7 @@ jobs: tls: ${{ matrix.vec.tls }} sanitize: ${{ matrix.vec.sanitize }} build: ${{ matrix.vec.build }} + ref: ${{ inputs.ref || '' }} build-unix: name: Build Unix @@ -71,8 +78,9 @@ jobs: { config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, - { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" }, { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", build: "-Test", xdp: "-UseXdp" }, ] uses: ./.github/workflows/build-reuse-unix.yml with: @@ -85,6 +93,7 @@ jobs: sanitize: ${{ matrix.vec.sanitize }} build: ${{ matrix.vec.build }} xdp: ${{ matrix.vec.xdp }} + ref: ${{ inputs.ref || '' }} bvt: name: BVT @@ -98,8 +107,9 @@ jobs: { config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" }, - { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp", build: "-Test" }, { config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", sanitize: "-Sanitize", build: "-Test" }, + { config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", systemcrypto: "-UseSystemOpenSSLCrypto", build: "-Test", xdp: "-UseXdp" }, { config: "Debug", plat: "windows", os: "windows-2019", arch: "x64", tls: "openssl", build: "-Test" }, { config: "Debug", plat: "windows", os: "windows-2019", arch: "x64", tls: "openssl3", build: "-Test" }, { config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", sanitize: "-Sanitize", build: "-Test" }, @@ -118,14 +128,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + with: + ref: ${{ inputs.ref || '' }} - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 if: matrix.vec.plat == 'windows' with: # note we always use binaries built on windows-2022. name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 if: matrix.vec.plat == 'linux' with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }}${{ matrix.vec.xdp }}${{ matrix.vec.build }} @@ -135,7 +147,7 @@ jobs: run: | sudo chmod -R 777 artifacts - name: Prepare Machine - run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }} + run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }} shell: pwsh - name: Install ETW Manifest if: matrix.vec.plat == 'windows' @@ -155,8 +167,12 @@ jobs: 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 Full.Light -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} + - name: Fix log permissions for Linux XDP + if: failure() && matrix.vec.plat == 'linux' # (matrix.vec.plat == 'linux' && matrix.vec.xdp == '-UseXdp') doesn't work for some reason + run: | + sudo chmod -R 777 artifacts - name: Upload on Failure - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a if: failure() with: name: BVT-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }}${{ matrix.vec.qtip }}${{ matrix.vec.systemcrypto }}${{ matrix.vec.sanitize }} @@ -178,13 +194,15 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + with: + ref: ${{ inputs.ref || '' }} - name: Download Build Artifacts - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: # note we always use binaries built on windows-2022. name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.build }} path: artifacts - name: Download Build Artifacts for Testing From WinUser - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: # note we always use binaries built on windows-2022. name: ${{ matrix.vec.config }}-windows-windows-2022-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.build }} path: artifacts @@ -203,7 +221,7 @@ jobs: timeout-minutes: 90 run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -GHA -LogProfile Full.Light -GenerateXmlResults -Kernel -Filter -*ValidateConfiguration:*ValidAlpnLengths:*ResumeRejection*:*ClientCertificate*:*LoadBalanced* - name: Upload on Failure - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a if: failure() with: name: BVT-Kernel-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }} @@ -227,18 +245,19 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 with: fetch-depth: 0 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + ref: ${{ inputs.ref || '' }} + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }} path: artifacts - name: Prepare Machine - run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }} + run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }} shell: pwsh - name: Interop shell: pwsh run: scripts/interop.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -GHA -GenerateXmlResults - name: Upload results - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: InteropWinlatest-${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.xdp }} path: artifacts diff --git a/.github/workflows/wan-perf.yml b/.github/workflows/wan-perf.yml index f4f4984eff..70e1fe8973 100644 --- a/.github/workflows/wan-perf.yml +++ b/.github/workflows/wan-perf.yml @@ -42,7 +42,7 @@ jobs: - name: Prepare Machine shell: pwsh run: scripts/build.ps1 -Config Release -DisableTest -DisableTools - - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: bin path: | @@ -87,7 +87,7 @@ jobs: - name: Prepare Machine shell: pwsh run: scripts/prepare-machine.ps1 -ForTest -InstallDuoNic - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: bin path: artifacts/bin @@ -100,12 +100,12 @@ jobs: shell: pwsh run: scripts/emulated-performance.ps1 -Debug -Protocol ('QUIC','TCPTLS') -LogProfile Performance.Light -NoDateLogDir -NumIterations ${{ env.iterations }} -DurationMs ${{ env.duration }} -Pacing ${{ env.pacing }} -BottleneckMbps ${{ matrix.rate }} -RttMs ${{ matrix.rtt }} -BottleneckQueueRatio ${{ matrix.queueRatio }} -RandomLossDenominator ${{ env.loss }} -RandomReorderDenominator ${{ env.reorder }} -ReorderDelayDeltaMs ${{ env.delay }} -BaseRandomSeed ${{ env.seed }} -CongestionControl ${{ env.congestionControl }} - name: Upload Results - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: data path: artifacts/PerfDataResults/windows/x64_Release_schannel/WAN/*.json - name: Upload Logs - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: ${{ format('logs.{0}mbps.{1}ms', matrix.rate, matrix.rtt) }} path: artifacts/logs/wanperf/*.etl @@ -119,7 +119,7 @@ jobs: uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 with: fetch-depth: 0 - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: data path: artifacts/PerfDataResults/windows/x64_Release_schannel/WAN @@ -127,7 +127,7 @@ jobs: shell: pwsh run: scripts/emulated-performance.ps1 -MergeDataFiles - name: Upload CSV - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: csv path: artifacts\PerfDataResults\windows\x64_Release_schannel\WAN\wan_data.csv diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f8f4d58fe..16b925db39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ message(STATUS "Platform version: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") set(QUIC_MAJOR_VERSION 2) -set(QUIC_FULL_VERSION 2.4.0) +set(QUIC_FULL_VERSION 2.5.0) if (WIN32) set(CX_PLATFORM "windows") @@ -311,6 +311,9 @@ else() list(APPEND QUIC_WARNING_FLAGS -Wno-strict-aliasing) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") list(APPEND QUIC_WARNING_FLAGS -Wno-missing-braces -Wno-microsoft-anon-tag) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) + list(APPEND QUIC_WARNING_FLAGS -Wno-invalid-unevaluated-string) + endif() endif() endif() @@ -687,38 +690,50 @@ if(QUIC_CODE_CHECK) -android-cloexec-fopen -android-cloexec-socket -bugprone-assignment-in-if-condition + -bugprone-casting-through-void -bugprone-easily-swappable-parameters -bugprone-implicit-widening-of-multiplication-result -bugprone-macro-parentheses + -bugprone-multi-level-implicit-pointer-conversion -bugprone-narrowing-conversions -bugprone-reserved-identifier -bugprone-sizeof-expression + -bugprone-switch-missing-default-case -cert-dcl37-c -cert-dcl51-cpp -cert-err33-c + -clang-analyzer-optin.core.EnumCastOutOfRange -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling + -clang-diagnostic-invalid-unevaluated-string -clang-diagnostic-microsoft-anon-tag -concurrency-mt-unsafe -cppcoreguidelines-avoid-magic-numbers -cppcoreguidelines-avoid-non-const-global-variables -cppcoreguidelines-init-variables + -cppcoreguidelines-macro-to-enum -cppcoreguidelines-narrowing-conversions + -google-readability-casting -google-readability-function-size -google-readability-todo -hicpp-function-size -hicpp-no-assembler -hicpp-signed-bitwise -llvmlibc-restrict-system-libc-headers + -misc-include-cleaner -misc-no-recursion # do you really need recursion? + -misc-header-include-cycle -modernize-macro-to-enum -readability-avoid-const-params-in-decls + -readability-avoid-nested-conditional-operator -readability-duplicate-include -readability-function-cognitive-complexity -readability-function-size -readability-identifier-length + -readability-identifier-naming -readability-isolate-declaration -readability-magic-numbers -readability-non-const-parameter + -readability-redundant-casting ) string(REPLACE ";" "," CLANG_TIDY_CHECKS "${CLANG_TIDY_CHECKS}") set(CMAKE_C_CLANG_TIDY_AVAILABLE ${CLANGTIDY} -checks=${CLANG_TIDY_CHECKS} diff --git a/Cargo.toml b/Cargo.toml index 6522252972..6784a4cc4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "msquic" -version = "2.4.0-beta" +version = "2.5.0-beta" edition = "2018" authors = ["Microsoft"] description = "Microsoft implementation of the IETF QUIC protocol" @@ -48,7 +48,7 @@ include = [ cmake = "0.1" [dependencies] -bitfield = "0.15.0" +bitfield = "0.16.1" libc = "0.2.0" -c-types = "3.0.0" +c-types = "4.0.0" serde = { version = "1.0.117", features = ["derive"] } diff --git a/docs/BUILD.md b/docs/BUILD.md index 47c417bbde..6caa5164d1 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -200,7 +200,7 @@ $ pwsh ./scripts/build.ps1 -UseXdp `./scripts/prepare-machine.ps1` internally does the below commands. This might break your environment. ```sh -# for libxdp v1.4.2 +# for libxdp v1.4.2 on Ubuntu 22.04. Ubuntu 24.04 doesn't need this step sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y # install runtime dependencies diff --git a/docs/Diagnostics.md b/docs/Diagnostics.md index 832f83a197..d1061e21f8 100644 --- a/docs/Diagnostics.md +++ b/docs/Diagnostics.md @@ -302,6 +302,50 @@ On the latest version of Windows, these counters are also exposed via PerfMon.ex Counters are also captured at the beginning of MsQuic ETW traces, and unlike PerfMon, includes all MsQuic instances running on the system, both user and kernel mode. +# Network Troubleshooting + +To see what is being transmited on the wire you might use an open-source tool like [Wireshark](https://www.wireshark.org). The packets captured by such tool will be encrypted due to TLS, therefore we must provide the secrets to enable Wireshark to decrypt the packets. + +To enable this we must generate a [SSLKEYLOGFILE](https://www.ietf.org/archive/id/draft-thomson-tls-keylogfile-00.html#name-introduction-10) with information about the secrets used in the TLS connection. With such file we will be able to decrypt the packets. + +For some browsers all you have to do is to set an environment variable `SSLKEYLOGFILE` with the absolute path of the log file to be generated and then you can load it into Wireshark for troubleshooting. For MsQuic applications we need to generate such file. A good practice is to check if the `SSLKEYLOGFILE` env variable is set and if so you write the file. The steps are: + +1. Set the `QUIC_PARAM_CONN_TLS_SECRETS` connection param with a struct to be populated with the TLS secrets by MsQuic. +```c +// Define empty struct for the TLS Secrets +QUIC_TLS_SECRETS ClientSecrets{}; +... + +// Get the value of the env variable to log the secrets +const char* SslKeyLogFile = getenv("SSLKEYLOGFILE"); +... + +// If the variable is set then we have a file to write the TLS secrets thus we +// pass the struct to be filled +if (SslKeyLogFile != NULL) { + MsQuic->SetParam(Connection, QUIC_PARAM_CONN_TLS_SECRETS, sizeof(ClientSecrets), &ClientSecrets); + // Check for errors... +} +``` +2. Write the file when the connection succeeds (event `QUIC_CONNECTION_EVENT_CONNECTED`). +```c +// On your connection callback function +... +if (Event->Type == QUIC_CONNECTION_EVENT_CONNECTED) { + if (SslKeyLogFile != NULL) { + WriteSslKeyLogFile(SslKeyLogFile, ClientSecrets); + } +} +``` +3. Write the `WriteSslKeyLogFile` function. You can just copy the function from [src/inc/msquichelper.h#WriteSslKeyLogFile](https://github.com/microsoft/msquic/blob/main/src/inc/msquichelper.h#L564) if it serves your needs or write your own. +4. Set the `SSLKEYLOGFILE` env variable set to the path of the log file and run the program. Then check the file with the secets. + +5. Load the key log into Wireshark and start capturing to decrypt the packets. To learn how to load such file inside Wireshark refer to this documentation: [Using the (Pre)-Master-Secret](https://wiki.wireshark.org/TLS#using-the-pre-master-secret). + +Using a Wireshark version that supports QUIC is not mandatory but could help when troubleshooting. To know which version supports QUIC refer to https://github.com/quicwg/base-drafts/wiki/Tools#wireshark. + +If you need a working example on how to generate the key log file please refer to the Sample at src/tools/sample/sample.c. + # Detailed Troubleshooting For detailed trouble shooting steps please see the MsQuic [Trouble Shooting Guide](TSG.md). diff --git a/docs/Release.md b/docs/Release.md index 152735ea13..a438df4d1b 100644 --- a/docs/Release.md +++ b/docs/Release.md @@ -99,6 +99,13 @@ This table describes all officially supported MsQuic releases. - Run `cargo publish` from the `release/X.Y` branch. 9. Update (via PR) `main` branch's `test-down-level.yml` to point the newly uploaded `*_test.zip` release binaries. +## Publishing Linux packages to packages.microsoft.com (PMC) +1. The publishing [pipeline](https://mscodehub.visualstudio.com/msquic/_build?definitionId=2068) automatically uploads packages into PMC when a tag is created. + +Sometimes the pipeline fails due to PMC infra issues (e.g. the PMC HTTP endpoint returning errors). The publishing pipeline can be run manually to retry. When running manually, please ensure that the right tag is chosen and the right resources (under "Advanced options") are chosen. By default, the pipeline picks up the latest resources from the official build pipeline which are not always the right ones. + +When testing the pipeline, please make sure to comment out the PMC cli commands in [upload-linux-packages.sh](https://github.com/microsoft/msquic/blob/main/scripts/upload-linux-packages.sh) to avoid accidentally publishing packages into prod. + ## Synchronizing with Windows 1. Once the release branch is created, set the pipeline [here](https://mscodehub.visualstudio.com/msquic/_build?definitionId=1868) to ingest the release branch into Windows, and run it. diff --git a/docs/Sample.md b/docs/Sample.md index 1dc5ca7b5a..e3cfe4b07e 100644 --- a/docs/Sample.md +++ b/docs/Sample.md @@ -33,6 +33,10 @@ Start the client providing the IP address for the server. Here 127.0.0.1 is used quicsample.exe -client -unsecure -target:{127.0.0.1} ``` +## Troubleshooting with Wireshark + +When running the client you can set the environment variable `SSLKEYLOGFILE` to the absolute path of the file that will receive the TLS secrets. Learn how to load such file inside Wireshark and see what is being transmitted on the wire: [Using the (Pre)-Master-Secret](https://wiki.wireshark.org/TLS#using-the-pre-master-secret) + ## Console Output Here is what the console output looks like on the server and client sides after connection is established and data flows: diff --git a/docs/Settings.md b/docs/Settings.md index 8662316bff..f6fc75038a 100644 --- a/docs/Settings.md +++ b/docs/Settings.md @@ -64,6 +64,7 @@ The following settings are available via registry as well as via [QUIC_SETTINGS] | Stateless Operation Expiration | uint16_t | StatelessOperationExpirationMs | 100 | The time limit between operations for the same endpoint, in milliseconds. | | Congestion Control Algorithm | uint16_t | CongestionControlAlgorithm | 0 (Cubic) | The congestion control algorithm used for the connection. | | ECN | uint8_t | EcnEnabled | 0 (FALSE) | Enable sender-side ECN support. | +| Stream Multi Receive | uint8_t | StreamMultiReceiveEnabled | 0 (FALSE) | Enable multi receive support | The types map to registry types as follows: - `uint64_t` is a `REG_QWORD`. diff --git a/docs/Streams.md b/docs/Streams.md index 4f22c4f1e1..0a13520942 100644 --- a/docs/Streams.md +++ b/docs/Streams.md @@ -78,7 +78,7 @@ Typically, the buffer count is one, which means that most events will include a When the buffer count is 0, it signifies the reception of a QUIC frame with empty data, which also indicates the end of stream data. -Currently, the maximum buffer count is 2 in the case of partial receive, where only a portion of the buffer data is consumed (as explained below). However, it is strongly advised not to assume in application code that the upper limit is always 2. This caution is important because future releases may incorporate multiple circular buffers to enhance performance, leading to potential changes in the buffer count limit. +Currently, the maximum buffer count is 3 in the case of partial receive, where only a portion of the buffer data is consumed (as explained below). However, it is strongly advised not to assume in application code that the upper limit is always 3. This caution is important because future releases may change internal algorithm, leading to potential changes in the buffer count limit. The app then may respond to the event in a number of ways: @@ -100,4 +100,12 @@ Any value less than or equal to the initial **TotalBufferLength** value is allow Whenever a receive isn't fully accepted by the app, additional receive events are immediately disabled. The app is assumed to be at capacity and not able to consume more until further indication. To re-enable receive callbacks, the app must call [StreamReceiveSetEnabled](api/StreamReceiveSetEnabled.md). -There are cases where an app may want to partially accept the current data, but still immediately get a callback with the rest of the data. To do this (only works in the synchronous flow) the app must return `QUIC_STATUS_CONTINUE`. \ No newline at end of file +There are cases where an app may want to partially accept the current data, but still immediately get a callback with the rest of the data. To do this (only works in the synchronous flow) the app must return `QUIC_STATUS_CONTINUE`. + +## Multi Receive mode + +Setting [`StreamMultiReceiveEnabled`](./Settings.md) an app can continue getting indicated by `QUIC_STREAM_EVENT_RECEIVE` without returning `QUIC_STATUS_SUCCESS` nor calling [StreamReceiveComplete](api/StreamReceiveComplete.md). + +This changes internal receive buffer more efficient for continuous receiving. + +The app need to keep track of total `TotalBufferLength` to later call [StreamReceiveComplete](api/StreamReceiveComplete.md) appropriately. \ No newline at end of file diff --git a/docs/api/QUIC_SETTINGS.md b/docs/api/QUIC_SETTINGS.md index 9dd7cb4abd..a7f3b2fb09 100644 --- a/docs/api/QUIC_SETTINGS.md +++ b/docs/api/QUIC_SETTINGS.md @@ -54,7 +54,8 @@ typedef struct QUIC_SETTINGS { uint64_t ReliableResetEnabled : 1; uint64_t OneWayDelayEnabled : 1; uint64_t NetStatsEventEnabled : 1; - uint64_t RESERVED : 22; + uint64_t StreamMultiReceiveEnabled : 1; + uint64_t RESERVED : 21; #else uint64_t RESERVED : 26; #endif @@ -104,7 +105,8 @@ typedef struct QUIC_SETTINGS { uint64_t ReliableResetEnabled : 1; uint64_t OneWayDelayEnabled : 1; uint64_t NetStatsEventEnabled : 1; - uint64_t ReservedFlags : 59; + uint64_t StreamMultiReceiveEnabled : 1; + uint64_t ReservedFlags : 58; #else uint64_t ReservedFlags : 63; #endif @@ -351,6 +353,12 @@ Initial stream receive flow control window size for remotely initiated unidirect **Default value:** 0 (no overwrite) +`StreamMultiReceiveEnabled` + +Enable multi receive mode. An app can continue receiving stream data without calling `StreamReceiveComplete` for each `QUIC_STREAM_EVENT_RECEIVE` indication. + +**Default value:** 0 (`FALSE`) + # Remarks When setting new values for the settings, the app must set the corresponding `.IsSet.*` parameter for each actual parameter that is being set or updated. For example: diff --git a/docs/api/StreamReceiveComplete.md b/docs/api/StreamReceiveComplete.md index ed9e57a504..6fd4d71fcf 100644 --- a/docs/api/StreamReceiveComplete.md +++ b/docs/api/StreamReceiveComplete.md @@ -22,8 +22,9 @@ void # Remarks This is an asynchronous API but can run inline if called in a callback. -The application must ensure that one `StreamReceiveComplete` call corresponds to one `QUIC_STREAM_EVENT_RECEIVE` event. +The application, without setting `StreamMultiReceiveEnabled`, must ensure that one `StreamReceiveComplete` call corresponds to one `QUIC_STREAM_EVENT_RECEIVE` event. Duplicate `StreamReceiveComplete` calls after one `QUIC_STREAM_EVENT_RECEIVE` event are ignored silently even with different `BufferLength`. +The `StreamMultiReceiveEnabled` mode doesn't follow this rule. Multiple `QUIC_STREAM_EVENT_RECEIVE` events can be indicated at once by `StreamReceiveComplete`. The application needs to keep track of accumulated `TotalBufferLength` with this mode. # See Also diff --git a/scripts/FullRunRPS.json b/scripts/FullRunRPS.json deleted file mode 100644 index 949b2e1448..0000000000 --- a/scripts/FullRunRPS.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "Remote": { - "Exe": "secnetperf", - "Arguments": "" - }, - "FullMatrix": true, - "Tests": [ - { - "TestName": "RPS", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-test:RPS -target:$RemoteAddress" - }, - "Variables": [ - { - "Name": "ConnectionCount", - "Local": { - "50": "-conns:50 -requests:1500", - "100": "-conns:100 -requests:3000", - "250": "-conns:250 -requests:7500", - "500": "-conns:500 -requests:15000", - "1000": "-conns:1000 -requests:30000" - }, - "Default": "250" - }, - { - "Name": "RequestSize", - "Local": { - "0": "-request:0", - "512": "-request:512", - "4096": "-request:4096", - "16384": "-request:16384" - }, - "Default": "0" - }, - { - "Name": "ResponseSize", - "Local": { - "0": "-response:0", - "512": "-response:512", - "4096": "-response:4096", - "16384": "-response:16384" - }, - "Default": "4096" - } - ], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) RPS, Min: (.*), Max: (.*), 50th: (.*), 90th: (.*), 99th: (.*), 99.9th: (.*), 99.99th: (.*), 99.999th: (.*), 99.9999th: (.*), StdErr: (.*)", - "Formats": ["{0} RPS", "Minimum: {0}", "Maximum: {0}", "Percentiles: 50th: {0}", "90th: {0}", "99th: {0}", "99.9th: {0}", "99.99th: {0}", "99.999th: {0}", "99.9999th: {0}", "Standard Error: {0}"], - "RegressionThreshold": "-50.0" - } - ] -} diff --git a/scripts/RemoteTests.json b/scripts/RemoteTests.json deleted file mode 100644 index 0f13fc7806..0000000000 --- a/scripts/RemoteTests.json +++ /dev/null @@ -1,453 +0,0 @@ -{ - "Remote": { - "Exe": "secnetperf", - "Arguments": "" - }, - "FullMatrix": false, - "Tests": [ - { - "TestName": "ThroughputUp", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -up:12s -ptput:1 -tcp:0" - }, - "Variables": [ - { - "Name": "Encryption", - "Local": { - "On": "", - "Off": "-encrypt:0" - }, - "Default": "On" - }, - { - "Name": "SendBuffering", - "Local": { - "On": "-sendbuf:1", - "Off": "" - }, - "Default": "Off" - } - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-10.0" - }, - { - "TestName": "TcpThroughputUp", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -up:12s -ptput:1 -tcp:1" - }, - "Variables": [ - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "FailureDefault": "Result: 0 bytes @ 0 kbps (0.0 ms).", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-50.0" - }, - { - "TestName": "ThroughputUp", - "Local" : { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -up:12s -ptput:1 -tcp:0" - }, - "Variables": [ - { - "Name": "Encryption", - "Local": { - "On": "", - "Off": "-encrypt:0" - }, - "Default": "On" - }, - { - "Name": "SendBuffering", - "Local": { - "On": "-sendbuf:1", - "Off": "" - }, - "Default": "Off" - } - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-60.0" - }, - { - "TestName": "TcpThroughputUp", - "Local" : { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -up:12s -ptput:1 -tcp:1" - }, - "Variables": [ - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "FailureDefault": "Result: 0 bytes @ 0 kbps (0.0 ms).", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-60.0" - }, - { - "TestName": "ThroughputDown", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -down:12s -ptput:1 -pconn:1 -tcp:0" - }, - "Variables": [ - { - "Name": "Encryption", - "Local": { - "On": "", - "Off": "-encrypt:0" - }, - "Default": "On" - } - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-10.0" - }, - { - "TestName": "TcpThroughputDown", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -down:12s -ptput:1 -pconn:1 -tcp:1" - }, - "Variables": [ - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "FailureDefault": "Result: 0 bytes @ 0 kbps (0.0 ms).", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-50.0" - }, - { - "TestName": "ThroughputDown", - "Local" : { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -down:12s -ptput:1 -pconn:1 -tcp:0" - }, - "Variables": [ - { - "Name": "Encryption", - "Local": { - "On": "", - "Off": "-encrypt:0" - }, - "Default": "On" - } - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-60.0" - }, - { - "TestName": "TcpThroughputDown", - "Local" : { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -down:12s -ptput:1 -pconn:1 -tcp:1" - }, - "Variables": [ - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "FailureDefault": "Result: 0 bytes @ 0 kbps (0.0 ms).", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-60.0" - }, - { - "TestName": "RPS", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:lowlat -target:$RemoteAddress -rstream:1 -plat:1 -tcp:0" - }, - "Variables": [ - { - "Name": "ConnectionCount", - "Local": { - "1": "-conns:1 -requests:1 -run:30s", - "40": "-conns:40 -requests:1 -run:10s", - "250": "-conns:250 -requests:30 -run:10s", - "1000": "-conns:1 -requests:1000 -run:10s" - }, - "Default": "250" - }, - { - "Name": "RequestSize", - "Local": { - "0": "-request:0" - }, - "Default": "0" - }, - { - "Name": "ResponseSize", - "Local": { - "0": "-response:0", - "512": "-response:512", - "4096": "-response:4096", - "16384": "-response:16384" - }, - "Default": "4096" - } - ], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) RPS, Latency,us 0th: (.*), 50th: (.*), 90th: (.*), 99th: (.*), 99.9th: (.*), 99.99th: (.*), 99.999th: (.*), 99.9999th: (.*), Max: (.*)", - "Formats": ["{0} RPS", "Minimum: {0}", "50th: {0}", "90th: {0}", "99th: {0}", "99.9th: {0}", "99.99th: {0}", "99.999th: {0}", "99.9999th: {0}", "Maximum: {0}"], - "RegressionThreshold": "-50.0" - }, - { - "TestName": "TcpRPS", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:lowlat -target:$RemoteAddress -rstream:1 -plat:1 -tcp:1" - }, - "Variables": [ - { - "Name": "ConnectionCount", - "Local": { - "1": "-conns:1 -requests:1 -run:30s", - "40": "-conns:40 -requests:1 -run:10s", - "250": "-conns:250 -requests:30 -run:10s", - "1000": "-conns:1 -requests:1000 -run:10s" - }, - "Default": "250" - }, - { - "Name": "RequestSize", - "Local": { - "0": "-request:0" - }, - "Default": "0" - }, - { - "Name": "ResponseSize", - "Local": { - "0": "-response:0", - "512": "-response:512", - "4096": "-response:4096", - "16384": "-response:16384" - }, - "Default": "4096" - } - ], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) RPS, Latency,us 0th: (.*), 50th: (.*), 90th: (.*), 99th: (.*), 99.9th: (.*), 99.99th: (.*), 99.999th: (.*), 99.9999th: (.*), Max: (.*)", - "Formats": ["{0} RPS", "Minimum: {0}", "50th: {0}", "90th: {0}", "99th: {0}", "99.9th: {0}", "99.99th: {0}", "99.999th: {0}", "99.9999th: {0}", "Maximum: {0}"], - "RegressionThreshold": "-50.0" - }, - { - "TestName": "RPS", - "Local": { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:lowlat -target:$RemoteAddress -rstream:1 -plat:1 -tcp:0" - }, - "Variables": [ - { - "Name": "ConnectionCount", - "Local": { - "1": "-conns:1 -requests:1 -run:30s", - "40": "-conns:40 -requests:1 -run:10s", - "250": "-conns:250 -requests:30 -run:10s", - "1000": "-conns:1 -requests:1000 -run:10s" - }, - "Default": "250" - }, - { - "Name": "RequestSize", - "Local": { - "0": "-request:0" - }, - "Default": "0" - }, - { - "Name": "ResponseSize", - "Local": { - "0": "-response:0", - "512": "-response:512", - "4096": "-response:4096", - "16384": "-response:16384" - }, - "Default": "4096" - } - ], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) RPS, Latency,us 0th: (.*), 50th: (.*), 90th: (.*), 99th: (.*), 99.9th: (.*), 99.99th: (.*), 99.999th: (.*), 99.9999th: (.*), Max: (.*)", - "Formats": ["{0} RPS", "Minimum: {0}", "50th: {0}", "90th: {0}", "99th: {0}", "99.9th: {0}", "99.99th: {0}", "99.999th: {0}", "99.9999th: {0}", "Maximum: {0}"], - "RegressionThreshold": "-75.0" - }, - { - "TestName": "TcpRPS", - "Local": { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:lowlat -target:$RemoteAddress -rstream:1 -plat:1 -tcp:1" - }, - "Variables": [ - { - "Name": "ConnectionCount", - "Local": { - "1": "-conns:1 -requests:1 -run:30s", - "40": "-conns:40 -requests:1 -run:10s", - "250": "-conns:250 -requests:30 -run:10s", - "1000": "-conns:1 -requests:1000 -run:10s" - }, - "Default": "250" - }, - { - "Name": "RequestSize", - "Local": { - "0": "-request:0" - }, - "Default": "0" - }, - { - "Name": "ResponseSize", - "Local": { - "0": "-response:0", - "512": "-response:512", - "4096": "-response:4096", - "16384": "-response:16384" - }, - "Default": "4096" - } - ], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) RPS, Latency,us 0th: (.*), 50th: (.*), 90th: (.*), 99th: (.*), 99.9th: (.*), 99.99th: (.*), 99.999th: (.*), 99.9999th: (.*), Max: (.*)", - "Formats": ["{0} RPS", "Minimum: {0}", "50th: {0}", "90th: {0}", "99th: {0}", "99.9th: {0}", "99.99th: {0}", "99.999th: {0}", "99.9999th: {0}", "Maximum: {0}"], - "RegressionThreshold": "-75.0" - }, - { - "TestName": "HPS", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -affinitize:1 -rconn:1 -conns:800 -share:1 -run:10s -tcp:0 -prate:1" - }, - "Variables": [], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) HPS.*", - "Formats": ["{0} HPS"], - "RegressionThreshold": "-40.0" - }, - { - "TestName": "TcpHPS", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl", "openssl3"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -affinitize:1 -rconn:1 -conns:800 -share:1 -run:10s -tcp:1 -prate:1" - }, - "Variables": [], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) HPS.*", - "Formats": ["{0} HPS"], - "RegressionThreshold": "-40.0" - }, - { - "TestName": "HPS", - "Local": { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -affinitize:1 -rconn:1 -conns:800 -share:1 -run:10s -tcp:0 -prate:1" - }, - "Variables": [], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) HPS.*", - "Formats": ["{0} HPS"], - "RegressionThreshold": "-75.0" - }, - { - "TestName": "TcpHPS", - "Local": { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-exec:maxtput -target:$RemoteAddress -affinitize:1 -rconn:1 -conns:800 -share:1 -run:10s -tcp:1 -prate:1" - }, - "Variables": [], - "AllowLoopback": false, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": "Result: (.*) HPS.*", - "Formats": ["{0} HPS"], - "RegressionThreshold": "-75.0" - } - ] -} diff --git a/scripts/TcpTests.json b/scripts/TcpTests.json deleted file mode 100644 index 527c4ce7d0..0000000000 --- a/scripts/TcpTests.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "Remote": { - "Exe": "secnetperf", - "Arguments": "" - }, - "FullMatrix": false, - "Tests": [ - { - "TestName": "TcpThroughputUp", - "Local": { - "Platform": "Windows", - "Tls": ["schannel", "openssl"], - "Arch": ["x64", "x86", "arm", "arm64"], - "Exe": "secnetperf", - "Arguments": "-test:Throughput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -uni:1 -upload:2000000000 -tcp:1" - }, - "Variables": [ - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-8.0" - }, - { - "TestName": "TcpThroughputUp", - "Local" : { - "Platform": "linux", - "Tls": ["openssl", "openssl3"], - "Arch": ["x64", "arm"], - "Exe": "secnetperf", - "Arguments": "-test:Throughput -target:$RemoteAddress -bind:$LocalAddress:4434 -ip:4 -uni:1 -upload:2000000000 -tcp:1" - }, - "Variables": [ - ], - "AllowLoopback": true, - "Iterations": 5, - "RemoteReadyMatcher": "Started!", - "ResultsMatcher": ".*@ (.*) kbps.*", - "FailureDefault": "Result: 0 bytes @ 0 kbps (0.0 ms).", - "Formats": ["{0} kbps"], - "RegressionThreshold": "-60.0" - } - ] -} diff --git a/scripts/cancel-performance.ps1 b/scripts/cancel-performance.ps1 deleted file mode 100644 index 80b9f40bc5..0000000000 --- a/scripts/cancel-performance.ps1 +++ /dev/null @@ -1,110 +0,0 @@ -<# - -.SYNOPSIS -This script cleans up after a perf run - -.PARAMETER Remote - The remote to connect to. Must have ssh remoting enabled, and public key auth. username@ip - -#> - -param ( - [Parameter(Mandatory = $false)] - [string]$Remote = "", - - [Parameter(Mandatory = $false)] - [string]$ComputerName = "quic-server", - - [Parameter(Mandatory = $false)] - [string]$WinRMUser = "", - - [switch]$SkipRemote = $false -) - -Set-StrictMode -Version 'Latest' -$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' -$ProgressPreference = 'SilentlyContinue' - -if (!$IsWindows -and [string]::IsNullOrWhiteSpace($Remote)) { - $Remote = "quic-server" -} - -# Remove any previous remote PowerShell sessions -Get-PSSession | Remove-PSSession - -$Session = $null - -if (!$SkipRemote) { - if ($Remote -eq "") { - if ($WinRMUser -ne "") { - $Session = New-PSSession -ComputerName $ComputerName -Credential $WinRMUser -ConfigurationName PowerShell.7 - } else { - $Session = New-PSSession -ComputerName $ComputerName -ConfigurationName PowerShell.7 - } - } else { - $Session = New-PSSession -HostName "$Remote" - } -} - -if ($null -eq $Session) { - Write-Host "Failed to create remote session" -} else { - $RemoteAddress = $Session.ComputerName - Write-Output "Connected to: $RemoteAddress" -} - -try { - - if ($IsWindows) { - if ($null -ne (Get-Process -Name "secnetperf" -ErrorAction Ignore)) { - try { - Stop-Process -Name "secnetperf" -Force | Out-Null - } - catch {} - } - if ($null -ne (Get-Service -Name "secnetperfdrvpriv" -ErrorAction Ignore)) { - try { - net.exe stop secnetperfdrvpriv /y | Out-Null - } - catch {} - sc.exe delete secnetperfdrvpriv /y | Out-Null - } - if ($null -ne (Get-Service -Name "msquicpriv" -ErrorAction Ignore)) { - try { - net.exe stop msquicpriv /y | Out-Null - } - catch {} - sc.exe delete msquicpriv /y | Out-Null - } - - if ($null -ne $Session) { - Invoke-Command -Session $Session -ScriptBlock { - if ($null -ne (Get-Process -Name "secnetperf" -ErrorAction Ignore)) { - try { - Stop-Process -Name "secnetperf" -Force | Out-Null - } - catch {} - } - if ($null -ne (Get-Service -Name "secnetperfdrvpriv" -ErrorAction Ignore)) { - try { - net.exe stop secnetperfdrvpriv /y | Out-Null - } - catch {} - sc.exe delete secnetperfdrvpriv /y | Out-Null - } - if ($null -ne (Get-Service -Name "msquicpriv" -ErrorAction Ignore)) { - try { - net.exe stop msquicpriv /y | Out-Null - } - catch {} - sc.exe delete msquicpriv /y | Out-Null - } - } - } - } - -} finally { - if ($null -ne $Session) { - Remove-PSSession -Session $Session - } -} diff --git a/scripts/generatevpackpat/Program.cs b/scripts/generatevpackpat/Program.cs deleted file mode 100644 index 402a9a973e..0000000000 --- a/scripts/generatevpackpat/Program.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Linq; -using System.Net.Http; -using System.Text.Json; -using System.Threading.Tasks; - -using Microsoft.VisualStudio.Services.Client; -using Microsoft.VisualStudio.Services.Common; -using Microsoft.VisualStudio.Services.DelegatedAuthorization; -using Microsoft.VisualStudio.Services.DelegatedAuthorization.WebApi; -using Microsoft.VisualStudio.Services.WebApi; - -namespace GenerateVpackPat -{ - public class Accounts - { - public string AccountName { get; set; } - public Guid AccountId { get; set; } - } - - public class Program - { - public static async Task Main() - { - var credentials = new VssClientCredentials(); - - var scopes = "vso.build vso.code_write vso.drop_manage vso.identity vso.packaging"; - var tokenAccounts = new[] { "mscodehub", "microsoft" }; - - var accountsUrl = "https://app.vssps.visualstudio.com"; - var connection = new VssConnection(new Uri(accountsUrl), credentials); - var client = new HttpClient(connection.InnerHandler); - string result = await client.GetStringAsync($"{accountsUrl}/_apis/accounts"); - var accounts = JsonSerializer.Deserialize(result); - var accountIds = accounts.Where(x => tokenAccounts.Contains(x.AccountName)).Select(x => x.AccountId).ToList(); - if (accountIds.Count != tokenAccounts.Length) - { - Console.WriteLine("Did not find all necessary accounts"); - return; - } - - var tokenClient = await connection.GetClientAsync(); - - var now = DateTime.UtcNow; - - var session = new SessionToken() - { - DisplayName = $"MsQuic Vpack Ingest Token {now.ToShortDateString()}", - Scope = scopes, - TargetAccounts = accountIds, - ValidFrom = now, - ValidTo = now + TimeSpan.FromDays(180) - }; - - var Pat = await tokenClient.CreateSessionTokenAsync(session, SessionTokenType.Compact, isPublic: false); - - Console.WriteLine($"Your PAT is: {Pat.Token}"); - } - } -} diff --git a/scripts/generatevpackpat/generatevpackpat.csproj b/scripts/generatevpackpat/generatevpackpat.csproj index ba10a63540..88f2261304 100644 --- a/scripts/generatevpackpat/generatevpackpat.csproj +++ b/scripts/generatevpackpat/generatevpackpat.csproj @@ -7,7 +7,7 @@ - + diff --git a/scripts/make-packages.sh b/scripts/make-packages.sh index efdea526c5..c60375221a 100755 --- a/scripts/make-packages.sh +++ b/scripts/make-packages.sh @@ -14,6 +14,8 @@ CONFIG=Release NAME=libmsquic TLS=openssl TLSVERSION=1.1 +TIME64DISTRO="False" +XDP="False" CONFLICTS= DESCRIPTION="Microsoft implementation of the IETF QUIC protocol" VENDOR="Microsoft" @@ -85,6 +87,14 @@ while :; do shift OUTPUT=$1 ;; + -x|-xdp|--xdp) + shift + XDP=$1 + ;; + -time64|--time64) + shift + TIME64DISTRO=$1 + ;; -t|-tls|--tls) shift TLS=$1 @@ -133,30 +143,57 @@ if [ "$OS" == "linux" ]; then FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}" if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then - FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" + FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" fi if [ "$PKGARCH" == 'aarch64' ] || [ "$PKGARCH" == 'x86_64' ]; then - BITS='64bit' + BITS='64bit' + fi + # XDP is only validated on Ubuntu 24.04 and x64 + if [ "$XDP" == "True" ] && [[ "$ARCH" == x* ]]; then + echo "Building rpm package (XDP)" + fpm \ + --force \ + --input-type dir \ + --output-type rpm \ + --architecture ${PKGARCH} \ + --name ${NAME} \ + --provides ${NAME} \ + --depends "libcrypto.so.${TLSVERSION}()(${BITS})" \ + --depends "libnuma.so.1()(${BITS})" \ + --depends "libxdp >= 1.4.0" \ + --depends "libnl3 >= 3.0" \ + --conflicts ${CONFLICTS} \ + --version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \ + --description "${DESCRIPTION}" \ + --vendor "${VENDOR}" \ + --maintainer "${MAINTAINER}" \ + --package "${OUTPUT}" \ + --license MIT \ + --url https://github.com/microsoft/msquic \ + --log error \ + ${FILES} ${ARTIFACTS}/datapath_raw_xdp_kern.o=/usr/${LIBDIR}/datapath_raw_xdp_kern.o + else + echo "Building rpm package" + fpm \ + --force \ + --input-type dir \ + --output-type rpm \ + --architecture ${PKGARCH} \ + --name ${NAME} \ + --provides ${NAME} \ + --depends "libcrypto.so.${TLSVERSION}()(${BITS})" \ + --depends "libnuma.so.1()(${BITS})" \ + --conflicts ${CONFLICTS} \ + --version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \ + --description "${DESCRIPTION}" \ + --vendor "${VENDOR}" \ + --maintainer "${MAINTAINER}" \ + --package "${OUTPUT}" \ + --license MIT \ + --url https://github.com/microsoft/msquic \ + --log error \ + ${FILES} fi - fpm \ - --force \ - --input-type dir \ - --output-type rpm \ - --architecture ${PKGARCH} \ - --name ${NAME} \ - --provides ${NAME} \ - --depends "libcrypto.so.${TLSVERSION}()(${BITS})" \ - --depends "libnuma.so.1()(${BITS})" \ - --conflicts ${CONFLICTS} \ - --version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \ - --description "${DESCRIPTION}" \ - --vendor "${VENDOR}" \ - --maintainer "${MAINTAINER}" \ - --package "${OUTPUT}" \ - --license MIT \ - --url https://github.com/microsoft/msquic \ - --log error \ - ${FILES} # Debian/Ubuntu if [ "$ARCH" == 'x64' ]; then @@ -174,25 +211,57 @@ if [ "$OS" == "linux" ]; then if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" fi - fpm \ - --force \ - --input-type dir \ - --output-type deb \ - --architecture ${PKGARCH} \ - --name ${NAME} \ - --provides ${NAME} \ - --conflicts ${CONFLICTS} \ - --depends "libssl${TLSVERSION}" \ - --depends "libnuma1" \ - --version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \ - --description "${DESCRIPTION}" \ - --vendor "${VENDOR}" \ - --maintainer "${MAINTAINER}" \ - --package "${OUTPUT}" \ - --license MIT \ - --url https://github.com/microsoft/msquic \ - --log error \ - ${FILES} + + BITS='' + if [ "$TIME64DISTRO" == "True" ]; then + BITS='t64' + fi + + if [ "$XDP" == "True" ] && [[ "$ARCH" == x* ]]; then + echo "Building deb package (XDP)" + fpm \ + --force \ + --input-type dir \ + --output-type deb \ + --architecture ${PKGARCH} \ + --name ${NAME} \ + --provides ${NAME} \ + --conflicts ${CONFLICTS} \ + --depends "libssl${TLSVERSION}${BITS}" \ + --depends "libnuma1" \ + --depends "libxdp1" \ + --depends "libnl-route-3-200" \ + --version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \ + --description "${DESCRIPTION}" \ + --vendor "${VENDOR}" \ + --maintainer "${MAINTAINER}" \ + --package "${OUTPUT}" \ + --license MIT \ + --url https://github.com/microsoft/msquic \ + --log error \ + ${FILES} ${ARTIFACTS}/datapath_raw_xdp_kern.o=/usr/${LIBDIR}/datapath_raw_xdp_kern.o + else + echo "Building deb package" + fpm \ + --force \ + --input-type dir \ + --output-type deb \ + --architecture ${PKGARCH} \ + --name ${NAME} \ + --provides ${NAME} \ + --conflicts ${CONFLICTS} \ + --depends "libssl${TLSVERSION}${BITS}" \ + --depends "libnuma1" \ + --version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \ + --description "${DESCRIPTION}" \ + --vendor "${VENDOR}" \ + --maintainer "${MAINTAINER}" \ + --package "${OUTPUT}" \ + --license MIT \ + --url https://github.com/microsoft/msquic \ + --log error \ + ${FILES} + fi fi # macOS diff --git a/scripts/package-distribution.ps1 b/scripts/package-distribution.ps1 index 3d4ba80e39..842650a4de 100644 --- a/scripts/package-distribution.ps1 +++ b/scripts/package-distribution.ps1 @@ -6,6 +6,11 @@ #> +param ( + [Parameter(Mandatory = $false)] + [switch]$Time64Distro = $false +) + Set-StrictMode -Version 'Latest' $PSDefaultParameterValues['*:ErrorAction'] = 'Stop' @@ -19,7 +24,7 @@ $ArtifactsBinDir = Join-Path $BaseArtifactsDir "bin" # All direct subfolders are OS's $Platforms = Get-ChildItem -Path $ArtifactsBinDir -$Version = "2.4.0" +$Version = "2.5.0" $WindowsBuilds = @() $AllBuilds = @() @@ -115,6 +120,15 @@ foreach ($Build in $AllBuilds) { $Libraries += Join-Path $ArtifactsDir "msquic.lib" } + # if datapath_raw_xdp_kern.o exists under $ArtifactsDir, $UseXdp to be true + $UseXdp = $false + if ($Platform -eq "linux") { + $XdpBin = Join-Path $ArtifactsDir "datapath_raw_xdp_kern.o" + if (Test-Path $XdpBin) { + $UseXdp = $true + } + } + # Copy items into temp folder that can be zipped in 1 command $IncludeDir = Join-Path $TempDir "include" @@ -167,12 +181,13 @@ foreach ($Build in $AllBuilds) { if ($BuildBaseName -like "*openssl3*") { $Tls = "openssl3" } + if ($BuildBaseName -like "*arm64_*") { - & $RootDir/scripts/make-packages.sh --output $DistDir --arch arm64 --tls $Tls + & $RootDir/scripts/make-packages.sh --output $DistDir --arch arm64 --tls $Tls --xdp $UseXdp --time64 $Time64Distro } elseif ($BuildBaseName -like "*arm_*") { - & $RootDir/scripts/make-packages.sh --output $DistDir --arch arm --tls $Tls + & $RootDir/scripts/make-packages.sh --output $DistDir --arch arm --tls $Tls --xdp $UseXdp --time64 $Time64Distro } else { - & $RootDir/scripts/make-packages.sh --output $DistDir --tls $Tls # x64 + & $RootDir/scripts/make-packages.sh --output $DistDir --tls $Tls --xdp $UseXdp --time64 $Time64Distro # x64 } Set-Location $OldLoc } diff --git a/scripts/package-nuget.ps1 b/scripts/package-nuget.ps1 index 8d03ea809c..610ad92830 100644 --- a/scripts/package-nuget.ps1 +++ b/scripts/package-nuget.ps1 @@ -153,7 +153,7 @@ $DistDir = Join-Path $BaseArtifactsDir "dist" $CurrentCommitHash = Get-GitHash -RepoDir $RootDir $RepoRemote = Get-GitRemote -RepoDir $RootDir -$Version = "2.4.0" +$Version = "2.5.0" $BuildId = $env:BUILD_BUILDID if ($null -ne $BuildId) { diff --git a/scripts/performance-helper.psm1 b/scripts/performance-helper.psm1 deleted file mode 100644 index b3022ee3e3..0000000000 --- a/scripts/performance-helper.psm1 +++ /dev/null @@ -1,1589 +0,0 @@ -# Helper functions for msquic performance testing. As this is a module, this cannot be called directly. - -Set-StrictMode -Version 'Latest' -$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' -$ProgressPreference = 'SilentlyContinue' - -function Set-ScriptVariables { - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] - param ($Local, $LocalTls, $LocalArch, $RemoteTls, $RemoteArch, $XDP, $QTIP, $Config, $Publish, $Record, $LogProfile, $RemoteAddress, $Session, $Kernel, $FailOnRegression, $PGO) - $script:Local = $Local - $script:LocalTls = $LocalTls - $script:LocalArch = $LocalArch - $script:RemoteTls = $RemoteTls - $script:RemoteArch = $RemoteArch - $script:XDP = $XDP - $script:QTIP = $QTIP - $script:PGO = $PGO - $script:Config = $Config - $script:Publish = $Publish - $script:Record = $Record - $script:LogProfile = $LogProfile - $script:RemoteAddress = $RemoteAddress - $script:Session = $Session - $script:Kernel = $Kernel - $script:FailOnRegression = $FailOnRegression - $script:OsBuildNumber = [System.Environment]::OSVersion.Version.Build - if ($null -ne $Session) { - Invoke-Command -Session $Session -ScriptBlock { - $ErrorActionPreference = "Stop" - } - } -} - -function Set-DebugLogFile { - param ($DebugLogFile) - $script:DebugLogFile = $DebugLogFile -} - -function Write-LogAndDebug { - param([AllowNull()]$Data) - if ($null -eq $Data) { - return - } - Write-Debug $Data - $Data | Out-File $script:DebugLogFile -Append -} - -function Set-Session { - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] - param ($Session) - -} - -function Convert-HostToNetworkOrder { - param ($Address) - $Bytes = $Address.GetAddressBytes() - [Array]::Reverse($Bytes) | Out-Null - return [System.BitConverter]::ToUInt32($Bytes, 0) -} - -class IpData { - [Int64]$PrefixLength; - [System.Net.IPAddress]$IPv4Address; - - IpData([Int64]$PrefixLength, [System.Net.IPAddress]$Address) { - $this.PrefixLength = $PrefixLength; - $this.IPv4Address = $Address; - } -} - -function Get-Ipv4Addresses { - $LocalIps = [System.Collections.Generic.List[IpData]]::new(); - $Nics = [System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces(); - foreach ($Nic in $Nics) { - if ($Nic.OperationalStatus -ne [System.Net.NetworkInformation.OperationalStatus]::Up) { - continue; - } - - $UniAddresses = $Nic.GetIPProperties().UnicastAddresses; - if ($null -eq $UniAddresses) { - continue; - } - - foreach ($UniAddress in $UniAddresses) { - $Addr = $UniAddress.Address; - if ($Addr.AddressFamily -ne [System.Net.Sockets.AddressFamily]::InterNetwork) { - continue; - } - $LocalIps.Add([IpData]::new($UniAddress.PrefixLength, $Addr)) - } - } - return $LocalIps; -} - -function Get-LocalAddress { - param ($RemoteAddress) - $PossibleRemoteIPs = [System.Net.Dns]::GetHostAddresses($RemoteAddress) | Select-Object -Property IPAddressToString - $PossibleLocalIPs = Get-Ipv4Addresses - $MatchedIPs = @() - $PossibleLocalIPs | ForEach-Object { - - [IPAddress]$LocalIpAddr = $_.IPv4Address - - $ToMaskLocalAddress = Convert-HostToNetworkOrder -Address $LocalIpAddr - - $Mask = (1ul -shl $_.PrefixLength) - 1 - $Mask = $Mask -shl (32 - $_.PrefixLength) - $LocalSubnet = $ToMaskLocalAddress -band $Mask - - $PossibleRemoteIPs | ForEach-Object { - [ipaddress]$RemoteIpAddr = $_.IPAddressToString - $ToMaskRemoteAddress = Convert-HostToNetworkOrder($RemoteIpAddr) - $RemoteMasked = $ToMaskRemoteAddress -band $Mask - - if ($RemoteMasked -eq $LocalSubnet) { - $MatchedIPs += $LocalIpAddr.IPAddressToString - } - } - } - - if ($MatchedIPs.Length -ne 1) { - Write-Error "Failed to parse local address matching remote" - } - - return $MatchedIPs[0] -} - -function Invoke-TestCommand { - param ($Session, $ScriptBlock, [Object[]]$ArgumentList = @(), [switch]$AsJob = $false) - if ($Local) { - if ($AsJob) { - return Start-Job -ScriptBlock $ScriptBlock -ArgumentList $ArgumentList - } - return Invoke-Command -ScriptBlock $ScriptBlock -ArgumentList $ArgumentList - } else { - if ($AsJob) { - return Invoke-Command -Session $Session -ScriptBlock $ScriptBlock -AsJob -ArgumentList $ArgumentList - } - return Invoke-Command -Session $Session -ScriptBlock $ScriptBlock -ArgumentList $ArgumentList - } -} - -function Wait-ForRemoteReady { - param ($Job, $Matcher) - $StopWatch = [system.diagnostics.stopwatch]::StartNew() - while ($StopWatch.ElapsedMilliseconds -lt 20000) { - $CurrentResults = Receive-Job -Job $Job -Keep -ErrorAction Continue - if (![string]::IsNullOrWhiteSpace($CurrentResults)) { - $DidMatch = $CurrentResults -match $Matcher - if ($DidMatch) { - return $true - } - } - Start-Sleep -Seconds 0.1 | Out-Null - } - return $false -} - -function Wait-ForRemote { - param ($Job, $ErrorAction = "Stop") - # Ping sidechannel socket on 9999 to tell the app to die - $Socket = New-Object System.Net.Sockets.UDPClient - $BytesToSend = @( - 0x57, 0xe6, 0x15, 0xff, 0x26, 0x4f, 0x0e, 0x57, - 0x88, 0xab, 0x07, 0x96, 0xb2, 0x58, 0xd1, 0x1c - ) - for ($i = 0; $i -lt 120; $i++) { - $Socket.Send($BytesToSend, $BytesToSend.Length, $RemoteAddress, 9999) | Out-Null - $Completed = Wait-Job -Job $Job -Timeout 1 - if ($null -ne $Completed) { - break; - } - } - - Stop-Job -Job $Job | Out-Null - $RetVal = Receive-Job -Job $Job -ErrorAction $ErrorAction - return $RetVal -join "`n" -} - -function Copy-Artifacts { - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingEmptyCatchBlock', '')] - param ([string]$From, [string]$To, [string]$SmbDir) - if (![string]::IsNullOrWhiteSpace($SmbDir)) { - try { - Remove-Item -Path "$SmbDir/*" -Recurse -Force - } catch [System.Management.Automation.ItemNotFoundException] { - # Ignore Not Found for when the directory does not exist - # This will still throw if a file cannot successfuly be deleted - } - robocopy $From $SmbDir /e /IS /IT /IM | Out-Null - if ($LASTEXITCODE -ne 1) { - Write-Error "Robocopy failed: $LASTEXITCODE" - } else { - $global:LASTEXITCODE = 0 - } - } else { - Invoke-TestCommand $Session -ScriptBlock { - param ($To) - try { - Remove-Item -Path "$To/*" -Recurse -Force - } catch [System.Management.Automation.ItemNotFoundException] { - # Ignore Not Found for when the directory does not exist - # This will still throw if a file cannot successfuly be deleted - } - } -ArgumentList $To - Copy-Item -Path "$From\*" -Destination $To -ToSession $Session -Recurse -Force - } -} - -function Get-GitHash { - param ($RepoDir) - $CurrentLoc = Get-Location - Set-Location -Path $RepoDir | Out-Null - $env:GIT_REDIRECT_STDERR = '2>&1' - $CurrentCommitHash = $null - try { - $CurrentCommitHash = git rev-parse HEAD - } catch { - Write-LogAndDebug "Failed to get commit hash from git" - } - Set-Location -Path $CurrentLoc | Out-Null - return $CurrentCommitHash -} - -function Get-CommitDate { - param($RepoDir) - $CurrentLoc = Get-Location - Set-Location -Path $RepoDir | Out-Null - $env:GIT_REDIRECT_STDERR = '2>&1' - $CurrentCommitDate = $null - try { - $CurrentCommitDate = git show -s --format=%ct - $CurrentCommitDate = [DateTimeOffset]::FromUnixTimeSeconds($CurrentCommitDate).ToUnixTimeMilliseconds() - } catch { - Write-LogAndDebug "Failed to get commit date from git" - } - Set-Location -Path $CurrentLoc | Out-Null - return $CurrentCommitDate -} - -function Get-CurrentBranch { - param($RepoDir) - $CurrentLoc = Get-Location - Set-Location -Path $RepoDir | Out-Null - $env:GIT_REDIRECT_STDERR = '2>&1' - $CurrentBranch = $null - try { - $CurrentBranch = git branch --show-current - } catch { - Write-LogAndDebug "Failed to get commit date from git" - } - Set-Location -Path $CurrentLoc | Out-Null - return $CurrentBranch -} - -function Get-ExePath { - param ($PathRoot, $Platform, $IsRemote, $ExtraArtifactDir) - if ($IsRemote) { - $ConfigStr = "$($RemoteArch)_$($Config)_$($RemoteTls)$($ExtraArtifactDir)" - return Invoke-TestCommand -Session $Session -ScriptBlock { - param ($PathRoot, $Platform, $ConfigStr) - Join-Path $PathRoot $Platform $ConfigStr - } -ArgumentList $PathRoot, $Platform, $ConfigStr - } else { - $ConfigStr = "$($LocalArch)_$($Config)_$($LocalTls)$($ExtraArtifactDir)" - return Join-Path $PathRoot $Platform $ConfigStr - } -} - -function Get-ExeName { - param ($PathRoot, $Platform, $IsRemote, $TestPlat, $ExtraArtifactDir) - $ExeName = $TestPlat.Exe - if ($Platform -eq "windows") { - $ExeName += ".exe" - } - - if ($IsRemote) { - $ConfigStr = "$($RemoteArch)_$($Config)_$($RemoteTls)$($ExtraArtifactDir)" - return Invoke-TestCommand -Session $Session -ScriptBlock { - param ($PathRoot, $Platform, $ConfigStr, $ExeName) - Join-Path $PathRoot $Platform $ConfigStr $ExeName - } -ArgumentList $PathRoot, $Platform, $ConfigStr, $ExeName - } else { - $ConfigStr = "$($LocalArch)_$($Config)_$($LocalTls)$($ExtraArtifactDir)" - return Join-Path $PathRoot $Platform $ConfigStr $ExeName - } -} - -function Remove-PerfServices { - if ($IsWindows) { - if ($null -ne (Get-Process -Name "secnetperf" -ErrorAction Ignore)) { - try { - Stop-Process -Name "secnetperf" -Force | Out-Null - } - catch {} - } - if ($null -ne (Get-Service -Name "secnetperfdrvpriv" -ErrorAction Ignore)) { - try { - net.exe stop secnetperfdrvpriv /y | Out-Null - } - catch {} - sc.exe delete secnetperfdrvpriv /y | Out-Null - } - if ($null -ne (Get-Service -Name "msquicpriv" -ErrorAction Ignore)) { - try { - net.exe stop msquicpriv /y | Out-Null - } - catch {} - sc.exe delete msquicpriv /y | Out-Null - } - - Invoke-TestCommand -Session $Session -ScriptBlock { - if ($null -ne (Get-Process -Name "secnetperf" -ErrorAction Ignore)) { - try { - Stop-Process -Name "secnetperf" -Force | Out-Null - } - catch {} - } - if ($null -ne (Get-Service -Name "secnetperfdrvpriv" -ErrorAction Ignore)) { - try { - net.exe stop secnetperfdrvpriv /y | Out-Null - } - catch {} - sc.exe delete secnetperfdrvpriv /y | Out-Null - } - if ($null -ne (Get-Service -Name "msquicpriv" -ErrorAction Ignore)) { - try { - net.exe stop msquicpriv /y | Out-Null - } - catch {} - sc.exe delete msquicpriv /y | Out-Null - } - } - } -} - -function Invoke-RemoteExe { - param ($Exe, $RunArgs, $RemoteDirectory) - - # Command to run chmod if necessary, and get base path - $BasePath = Invoke-TestCommand -Session $Session -ScriptBlock { - param ($Exe) - if (!$IsWindows) { - chmod +x $Exe - return Split-Path $Exe -Parent - } - return $null - } -ArgumentList $Exe - - if ($Kernel) { - $RunArgs = "-driverNamePriv:secnetperfdrvpriv $RunArgs" - } - - Write-LogAndDebug "Running Remote: $Exe $RunArgs" - - return Invoke-TestCommand -Session $Session -ScriptBlock { - param ($Exe, $RunArgs, $BasePath, $Record, $LogProfile, $Kernel, $RemoteDirectory) - if ($null -ne $BasePath) { - $env:LD_LIBRARY_PATH = $BasePath - } - - $LogScript = Join-Path $RemoteDirectory log.ps1 - - if ($Record) { - & $LogScript -Start -Profile $LogProfile -ProfileInScriptDirectory -InstanceName msquicperf | Out-Null - } - - $Arch = Split-Path (Split-Path $Exe -Parent) -Leaf - $RootBinPath = Split-Path (Split-Path (Split-Path $Exe -Parent) -Parent) -Parent - $KernelDir = Join-Path $RootBinPath "winkernel" $Arch - - if ($Kernel) { - Copy-Item (Join-Path $KernelDir "secnetperfdrvpriv.sys") (Split-Path $Exe -Parent) - Copy-Item (Join-Path $KernelDir "msquicpriv.sys") (Split-Path $Exe -Parent) - sc.exe create "msquicpriv" type= kernel binpath= (Join-Path (Split-Path $Exe -Parent) "msquicpriv.sys") start= demand | Out-Null - net.exe start msquicpriv - } - - try { - if ($IsLinux -and $Record) { - & $LogScript -PerfRun -Command "$Exe $RunArgs" -Remote - } else { - & $Exe ($RunArgs).Split(" ") - } - } finally { - # Uninstall the kernel mode test drivers. - if ($Kernel) { - net.exe stop secnetperfdrvpriv /y | Out-Null - net.exe stop msquicpriv /y | Out-Null - sc.exe delete secnetperfdrvpriv | Out-Null - sc.exe delete msquicpriv | Out-Null - } - } - } -AsJob -ArgumentList $Exe, $RunArgs, $BasePath, $Record, $LogProfile, $Kernel, $RemoteDirectory -} - -function Cancel-RemoteLogs { - param ($RemoteDirectory) - Invoke-TestCommand -Session $Session -ScriptBlock { - param ($RemoteDirectory) - - $LogScript = Join-Path $RemoteDirectory log.ps1 - - & $LogScript -Cancel -ProfileInScriptDirectory -InstanceName msquicperf | Out-Null - } -ArgumentList $RemoteDirectory -} - -function Stop-RemoteLogs { - param ($RemoteDirectory) - return Invoke-TestCommand -AsJob -Session $Session -ScriptBlock { - param ($Record, $RemoteDirectory) - - $LogScript = Join-Path $RemoteDirectory log.ps1 - - if ($Record) { - & $LogScript -Stop -OutputPath (Join-Path $RemoteDirectory serverlogs server) -RawLogOnly -ProfileInScriptDirectory -InstanceName msquicperf | Out-Null - if ($IsLinux) { - & $LogScript -PerfGraph -OutputPath (Join-Path $RemoteDirectory serverlogs) -Remote | Write-Debug - } - } - } -ArgumentList $Record, $RemoteDirectory -} - -function Get-RemoteLogDirectory { - param ([string]$Local, [string]$Remote, [string]$SmbDir, [switch]$Cleanup) - - New-Item -Path $Local -ItemType Directory -Force | Out-Null - if (![string]::IsNullOrWhiteSpace($SmbDir)) { - Write-Host $SmbDir - Write-Host $Local - robocopy $SmbDir $Local /e /IS /IT /IM /COMPRESS | Out-Null - if ($LASTEXITCODE -ne 3) { - Write-Error "Robocopy failed: $LASTEXITCODE" - } else { - $global:LASTEXITCODE = 0 - } - if ($Cleanup) { - try { - Remove-Item -Path "$SmbDir/*" -Recurse -Force - } catch [System.Management.Automation.ItemNotFoundException] { - # Ignore Not Found for when the directory does not exist - # This will still throw if a file cannot successfuly be deleted - } - } - } else { - Copy-Item -Path "$Remote\*" -Destination $Local -FromSession $Session -Recurse -Force - if ($Cleanup) { - Invoke-TestCommand $Session -ScriptBlock { - param ($Remote) - try { - Remove-Item -Path "$Remote/*" -Recurse -Force - } catch [System.Management.Automation.ItemNotFoundException] { - # Ignore Not Found for when the directory does not exist - # This will still throw if a file cannot successfuly be deleted - } - } -ArgumentList $Remote - } - } -} - -function Get-RemoteFile { - param ($From, $To) - - if ($Local) { - Copy-Item -Path $From -Destination $To - } else { - Copy-Item -Path $From -Destination $To -FromSession $Session - } -} - -function Remove-RemoteFile { - param ($Path) - if ($Local) { - Remove-Item -Path $Path -Force - } else { - Invoke-Command -Session $Session -ScriptBlock { Remove-Item -Path $using:Path -Force } - } -} - -function Start-Tracing { - param($LocalDirectory) - if ($Record -and !$Local) { - $LogScript = Join-Path $LocalDirectory log.ps1 - & $LogScript -Start -Profile $LogProfile -ProfileInScriptDirectory -InstanceName msquicperf | Out-Null - } -} - -function Cancel-LocalTracing { - param($LocalDirectory) - $LogScript = Join-Path $LocalDirectory log.ps1 - & $LogScript -Cancel -ProfileInScriptDirectory -InstanceName msquicperf | Out-Null -} - -function Stop-Tracing { - param($LocalDirectory, $OutputDir, $Test, $NumIterations) - $LogScript = Join-Path $LocalDirectory log.ps1 - if ($Record) { - if (!$Local) { - & $LogScript -Stop -OutputPath (Join-Path $OutputDir $Test.ToString() client) -RawLogOnly -ProfileInScriptDirectory -InstanceName msquicperf | Out-Null - } - if ($IsLinux) { - & $LogScript -PerfGraph -OutputPath (Join-Path $OutputDir $Test.ToString()) -NumIterations $NumIterations | Write-Debug - } - } -} - -function Merge-PGOCounts { - param ($Path, $OutputDir) - $Command = "$Path\pgomgr.exe /merge $Path $Path\msquic.pgd" - Invoke-Expression $Command | Write-LogAndDebug - Remove-Item "$Path\*.pgc" | Out-Null -} - -# Uses CDB.exe to print the crashing callstack in the dump file. -function PrintDumpCallStack($DumpFile, $ExePath) { - $env:_NT_SYMBOL_PATH = Split-Path $ExePath - try { - if ($null -ne $env:BUILD_BUILDNUMBER) { - $env:PATH += ";c:\Program Files (x86)\Windows Kits\10\Debuggers\x64" - } - $Output = cdb.exe -z $File -c "kn;q" | Join-String -Separator "`n" - $Output = ($Output | Select-String -Pattern " # Child-SP(?s).*quit:").Matches[0].Groups[0].Value - Write-Host "==================================================================================" - Write-Host " $(Split-Path $DumpFile -Leaf)" - Write-Host "==================================================================================" - $Output -replace "quit:", "==================================================================================" - } catch { - # Silently fail - } -} -function Log($msg) { - Write-Host "[$(Get-Date)] $msg" -} - -function Invoke-LocalExe { - [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingInvokeExpression', '')] - param ($Exe, $RunArgs, $Timeout, $OutputDir, $HistogramFileName, $Iteration) - $BasePath = Split-Path $Exe -Parent - if (!$IsWindows) { - $env:LD_LIBRARY_PATH = $BasePath - chmod +x $Exe | Out-Null - } - $HistogramDir = Join-Path $OutputDir "histogram" - if (!(Test-Path $HistogramDir)) { - mkdir $HistogramDir | Out-Null - } - $HistogramFilePath = Join-Path $HistogramDir $HistogramFileName - $RunArgs = "-extraOutputFile:$HistogramFilePath $RunArgs" - if ($IsLinux -and $Record) { - # `perf record -F max` generates too big data to finish within default Timeout (120s) - $Timeout = 2000 - } - $TimeoutMs = ($Timeout - 5) * 1000; - $RunArgs = "-watchdog:$TimeoutMs $RunArgs" - - $FullCommand = "$Exe $RunArgs" - Write-LogAndDebug "Running Locally: $FullCommand" - - $ExeName = Split-Path $Exe -Leaf - # Path to the WER registry key used for collecting dumps. - $WerDumpRegPath = "HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\$ExeName" - # Root directory of the project. - $LogDir = Join-Path $OutputDir "logs" $ExeName (Get-Date -UFormat "%m.%d.%Y.%T").Replace(':','.') - - if ($IsWindows) { - if ($IsWindows -and !(Test-Path $WerDumpRegPath)) { - New-Item -Path $WerDumpRegPath -Force | Out-Null - } - - New-Item -Path $LogDir -ItemType Directory -Force | Out-Null - New-ItemProperty -Path $WerDumpRegPath -Name DumpType -PropertyType DWord -Value 2 -Force | Out-Null - New-ItemProperty -Path $WerDumpRegPath -Name DumpFolder -PropertyType ExpandString -Value $LogDir -Force | Out-Null - } - - $Stopwatch = [system.diagnostics.stopwatch]::StartNew() - - $LocalJob = $null - - try { - if ($IsLinux -and $Record) { - $LogScript = Join-Path $LocalDirectory log.ps1 - $LocalJob = Start-Job -ScriptBlock { & $Using:LogScript -PerfRun -Command $Using:FullCommand -Iteration $Using:Iteration } - } else { - $LocalJob = Start-Job -ScriptBlock { & $Using:Exe ($Using:RunArgs).Split(" ") } - } - } finally { - if ($null -ne $LocalJob) { - # Wait for the job to finish - Wait-Job -Job $LocalJob -Timeout $Timeout | Out-Null - Stop-Job -Job $LocalJob | Out-Null - } - } - - # -ErrorAction Continue for "perf" to return error when stop - $RetVal = Receive-Job -Job $LocalJob -ErrorAction Continue - $Stopwatch.Stop() - - if ($IsWindows) { - $DumpFiles = (Get-ChildItem $LogDir) | Where-Object { $_.Extension -eq ".dmp" } - if ($DumpFiles) { - Log "Dump file(s) generated" - foreach ($File in $DumpFiles) { - PrintDumpCallStack($File, $Exe) - } - } - - # Cleanup the WER registry. - Remove-Item -Path $WerDumpRegPath -Force | Out-Null - } - - Write-Host ("Test Run Took " + $Stopwatch.Elapsed) - - return $RetVal -join "`n" -} - -function Get-TestResultAtIndex($FullResults, $Index) { - $RetResults = @() - foreach ($Result in $FullResults) { - $RetResults += $Result[$Index] - } - return $RetResults -} - -function Get-MedianTestResults($FullResults) { - $sorted = $FullResults | Sort-Object {[int]$_} - if ($sorted.Length -eq 1) { - return $sorted[0] - } else { - return $sorted[[int](($sorted.Length - 1) / 2)] - } -} - -function Get-TestResult($Results, $Matcher, $FailureDefault) { - $Found = $Results -match $Matcher - if ($Found) { - return $Matches - } else { - if([string]::IsNullOrWhiteSpace($FailureDefault)) { - Write-Error "Error Processing Results:`n`n$Results" - } else { - $Found = $FailureDefault -match $Matcher - return $Matches - } - } -} - -$NumberOfCommitsToAverage = 5 - -function Get-LatestCommitHashes([string]$Branch) { - $Uri = "https://raw.githubusercontent.com/microsoft/msquic/performance/data/$Branch/commits.json" - Write-LogAndDebug "Requesting: $Uri" - try { - $AllCommits = Invoke-RestMethod -SkipHttpErrorCheck -Uri $Uri -Method 'GET' -ContentType "application/json" - Write-LogAndDebug "Result: $AllCommits" - if ($AllCommits.Count -eq 0) { - return "" - } - $SortedList = $AllCommits | Sort-Object -Property Date -Descending - if ($SortedList.Count -lt $NumberOfCommitsToAverage) { - $LatestResult = $SortedList - } else { - $LatestResult = $SortedList | Select-Object -First $NumberOfCommitsToAverage - } - Write-LogAndDebug "Latest Commits: $LatestResult" - return $LatestResult - } catch { - return "" - } -} - -function Get-LatestCpuTestResults([string]$Branch, $CommitHashes) { - $Items = [System.Collections.Generic.List[object]]::new() - foreach ($Result in $CommitHashes) { - try { - $CommitHash = $Result.CommitHash - $Uri = "https://raw.githubusercontent.com/microsoft/msquic/performance/data/$Branch/$CommitHash/cpu_data.json" - Write-LogAndDebug "Requesting: $Uri" - $LatestResult = Invoke-RestMethod -SkipHttpErrorCheck -Uri $Uri -Method 'GET' -ContentType "application/json" - Write-LogAndDebug "Result: $LatestResult" - $Items.Add($LatestResult) - } catch { - } - } - return $Items -} - -$global:HasRegression = $false - -function Log-Regression([string]$Msg) { - Write-Host "##vso[task.LogIssue type=error;]$Msg" - $global:HasRegression = $true -} - -function Check-Regressions() { - if ($global:HasRegression) { - Write-Error "Performance test regressions occurred!" - } -} - -# Fail loopback tests if < 80% -$LocalRegressionThreshold = -80.0 - -#region Throughput Publish - -class ThroughputConfiguration { - [boolean]$Loopback; - [boolean]$Encryption; - [boolean]$SendBuffering; - [int]$NumberOfStreams; - [boolean]$ServerToClient; - - [int] GetHashCode() { - return [HashCode]::Combine($this.Loopback, $this.Encryption, $this.SendBuffering, $this.NumberOfStreams, $this.ServerToClient) - } - - [boolean] Equals([Object]$other) { - return $this.Encryption -eq $other.Encryption -and - $this.Loopback -eq $other.Loopback -and - $this.NumberOfStreams -eq $other.NumberOfStreams -and - $this.SendBuffering -eq $other.SendBuffering -and - $this.ServerToClient -eq $other.ServerToClient - } -} - -class ThroughputRequest { - [string]$PlatformName; - [string]$TestName; - [boolean]$Loopback; - [boolean]$Encryption; - [boolean]$SendBuffering; - [int]$NumberOfStreams; - [boolean]$ServerToClient; - - ThroughputRequest ( - [TestRunDefinition]$Test, - [boolean]$ServerToClient, - [string]$TestName - ) { - $this.PlatformName = $Test.ToTestPlatformString(); - $this.TestName = $TestName - $this.Loopback = $Test.Loopback; - $this.Encryption = $Test.VariableValues["Encryption"] -eq "On"; - $this.SendBuffering = $Test.VariableValues["SendBuffering"] -eq "On"; - $this.NumberOfStreams = 1; - $this.ServerToClient = $ServerToClient; - } - - [ThroughputConfiguration] GetConfiguration() { - $TputConfig = [ThroughputConfiguration]::new(); - $TputConfig.Encryption = $this.Encryption; - $TputConfig.Loopback = $this.Loopback; - $TputConfig.NumberOfStreams = $this.NumberOfStreams; - $TputConfig.SendBuffering = $this.SendBuffering; - $TputConfig.ServerToClient = $this.ServerToClient; - return $TputConfig; - } -} - -function Get-LatestThroughputRemoteTestResults($CpuData, [ThroughputRequest]$Request) { - try { - $Values = [System.Collections.Generic.List[int]]::new() - $TestConfig = $Request.GetConfiguration() - foreach ($Result in $CpuData) { - foreach ($Test in $Result.Tests) { - if ($null -eq $Test.TputConfig) { - continue; - } - - if ($Test.TestName -eq $Request.TestName -and $TestConfig -eq $Test.TputConfig -and $Request.PlatformName -eq $Test.PlatformName) { - $Values.Add((Get-MedianTestResults -FullResults $Test.Results)) - break; - } - } - } - if ($Values.Count -eq 0) { - return $null - } - return ($Values | Measure-Object -Average).Average - } catch { - } - return $null -} - -class ThroughputTestPublishResult { - [string]$MachineName; - [string]$PlatformName; - [string]$TestName; - [string]$CommitHash; - [string]$AuthKey; - [double[]]$IndividualRunResults; - [boolean]$Loopback; - [boolean]$Encryption; - [boolean]$SendBuffering; - [int]$NumberOfStreams; - [boolean]$ServerToClient; - - ThroughputTestPublishResult ( - [ThroughputRequest]$Request, - [double[]]$RunResults, - [string]$MachineName, - [string]$CommitHash, - [boolean]$Tcp - ) { - $this.TestName = $Tcp ? "TcpThroughput" : "Throughput" - $this.MachineName = $MachineName - $this.PlatformName = $Request.PlatformName - $this.CommitHash = $CommitHash - $this.AuthKey = "empty" - $this.IndividualRunResults = $RunResults - $this.Loopback = $Request.Loopback - $this.Encryption = $Request.Encryption - $this.SendBuffering = $Request.SendBuffering - $this.NumberOfStreams = $Request.NumberOfStreams - $this.ServerToClient = $Request.ServerToClient - } -} - -function Publish-ThroughputTestResults { - param ([TestRunDefinition]$Test, $AllRunsFullResults, $CurrentCommitHash, $CurrentCommitDate, $PreviousResults, $OutputDir, $ServerToClient, $ExePath, $Tcp) - - $Request = [ThroughputRequest]::new($Test, $ServerToClient, $Tcp ? "TcpThroughput" : "Throughput") - - $AllRunsResults = Get-TestResultAtIndex -FullResults $AllRunsFullResults -Index 1 - $MedianCurrentResult = Get-MedianTestResults -FullResults $AllRunsResults - $FullLastResult = Get-LatestThroughputRemoteTestResults -CpuData $PreviousResults -Request $Request - $CurrentFormatted = [string]::Format($Test.Formats[0], $MedianCurrentResult) - - if ($null -ne $FullLastResult) { - $MedianLastResult = $FullLastResult - if ($MedianLastResult -eq 0) { - Write-Error "Cannot have a last result median of 0" - } - $PercentDiff = 100 * (($MedianCurrentResult - $MedianLastResult) / $MedianLastResult) - $PercentDiffStr = $PercentDiff.ToString("#.##") - if ($PercentDiff -ge 0) { - $PercentDiffStr = "+$PercentDiffStr" - } - $LastFormatted = [string]::Format($Test.Formats[0], $MedianLastResult) - Write-Output "Median: $CurrentFormatted ($PercentDiffStr%)" - Write-Output "Remote: $LastFormatted" - if ($FailOnRegression -and !$Local -and $PercentDiff -lt $Test.RegressionThreshold) { - #Skip no encrypt - if ($Test.VariableName -ne "Encryption") { - Log-Regression "Performance regression in $Test. $PercentDiffStr% < $($Test.RegressionThreshold)" - } - } elseif ($FailOnRegression -and $PercentDiff -lt $LocalRegressionThreshold) { - Log-Regression "Performance regression in $Test. $PercentDiffStr% < $LocalRegressionThreshold" - } - } else { - Write-Output "Median: $CurrentFormatted" - } - - if ($Publish -and ($null -ne $CurrentCommitHash)) { - Write-Output "Saving results_$Test.json out for publishing." - $MachineName = ($script:OsBuildNumber).ToString() - if (Test-Path 'env:AGENT_MACHINENAME') { - $MachineName = $MachineName + ":" + $env:AGENT_MACHINENAME - } - $Results = [ThroughputTestPublishResult]::new($Request, $AllRunsResults, $MachineName, $CurrentCommitHash.Substring(0, 7), $Tcp) - $Results.AuthKey = $CurrentCommitDate; - - $ResultFile = Join-Path $OutputDir "results_$Test.json" - $Results | ConvertTo-Json | Out-File $ResultFile - } elseif (!$Publish) { - Write-LogAndDebug "Failed to publish because of missing commit hash" - } -} - -#endregion - -#region RPS Publish - -class RpsConfiguration { - [int]$ConnectionCount; - [int]$RequestSize; - [int]$ResponseSize; - [int]$ParallelRequests; - - [int] GetHashCode() { - return [HashCode]::Combine($this.ConnectionCount, $this.RequestSize, $this.ResponseSize, $this.ParallelRequests) - } - - [boolean] Equals([Object]$other) { - return $this.ConnectionCount -eq $other.ConnectionCount -and - $this.RequestSize -eq $other.RequestSize -and - $this.ResponseSize -eq $other.ResponseSize -and - $this.ParallelRequests -eq $other.ParallelRequests - } -} - -class RPSRequest { - [string]$PlatformName; - [string]$TestName; - [int]$ConnectionCount; - [int]$RequestSize; - [int]$ResponseSize; - [int]$ParallelRequests; - - RPSRequest ( - [TestRunDefinition]$Test, - [string]$TestName - ) { - $this.PlatformName = $Test.ToTestPlatformString(); - $this.TestName = $TestName - $this.ConnectionCount = $Test.VariableValues["ConnectionCount"]; - $this.RequestSize = $Test.VariableValues["RequestSize"]; - $this.ResponseSize = $Test.VariableValues["ResponseSize"]; - $this.ParallelRequests = 30; - } - - [RpsConfiguration] GetConfiguration() { - $RpsConfig = [RpsConfiguration]::new(); - $RpsConfig.ConnectionCount = $this.ConnectionCount; - $RpsConfig.RequestSize = $this.RequestSize; - $RpsConfig.ResponseSize = $this.ResponseSize; - $RpsConfig.ParallelRequests = $this.ParallelRequests; - return $RpsConfig; - } -} - -function Get-LatestRPSRemoteTestResults($CpuData, [RpsRequest]$Request) { - try { - $Values = [System.Collections.Generic.List[int]]::new() - $TestConfig = $Request.GetConfiguration() - foreach ($Result in $CpuData) { - foreach ($Test in $Result.Tests) { - if ($null -eq $Test.RpsConfig) { - continue; - } - - if ($Test.TestName -eq $Request.TestName -and $TestConfig -eq $Test.RpsConfig -and $Request.PlatformName -eq $Test.PlatformName) { - $Values.Add((Get-MedianTestResults -FullResults $Test.Results)) - break; - } - } - } - if ($Values.Count -eq 0) { - return $null - } - return ($Values | Measure-Object -Average).Average - } catch { - } - return $null -} - -class RPSTestPublishResult { - [string]$MachineName; - [string]$PlatformName; - [string]$TestName; - [string]$CommitHash; - [string]$AuthKey; - [double[]]$IndividualRunResults; - [int]$ConnectionCount; - [int]$RequestSize; - [int]$ResponseSize; - [int]$ParallelRequests; - - RPSTestPublishResult ( - [RPSRequest]$Request, - [double[]]$RunResults, - [string]$MachineName, - [string]$CommitHash, - [boolean]$Tcp - ) { - $this.TestName = $Tcp ? "TcpRPS" : "RPS" - $this.MachineName = $MachineName - $this.PlatformName = $Request.PlatformName - $this.CommitHash = $CommitHash - $this.AuthKey = "empty" - $this.IndividualRunResults = $RunResults - $this.ConnectionCount = $Request.ConnectionCount - $this.RequestSize = $Request.RequestSize - $this.ResponseSize = $Request.ResponseSize - $this.ParallelRequests = $Request.ParallelRequests - } -} - -function Publish-RPSTestResults { - param ([TestRunDefinition]$Test, $AllRunsFullResults, $CurrentCommitHash, $CurrentCommitDate, $PreviousResults, $OutputDir, $ExePath, $Tcp) - - $Request = [RPSRequest]::new($Test, $Tcp ? "TcpRPS" : "RPS") - - $AllRunsResults = Get-TestResultAtIndex -FullResults $AllRunsFullResults -Index 1 - $MedianCurrentResult = Get-MedianTestResults -FullResults $AllRunsResults - $FullLastResult = Get-LatestRPSRemoteTestResults -CpuData $PreviousResults -Request $Request - $CurrentFormatted = [string]::Format($Test.Formats[0], $MedianCurrentResult) - - if ($null -ne $FullLastResult) { - $MedianLastResult = $FullLastResult - if ($MedianLastResult -eq 0) { - Write-Error "Cannot have a last result median of 0" - } - $PercentDiff = 100 * (($MedianCurrentResult - $MedianLastResult) / $MedianLastResult) - $PercentDiffStr = $PercentDiff.ToString("#.##") - if ($PercentDiff -ge 0) { - $PercentDiffStr = "+$PercentDiffStr" - } - $LastFormatted = [string]::Format($Test.Formats[0], $MedianLastResult) - Write-Output "Median: $CurrentFormatted ($PercentDiffStr%)" - Write-Output "Remote: $LastFormatted" - if ($FailOnRegression -and !$Local -and $PercentDiff -lt $Test.RegressionThreshold) { - Log-Regression "Performance regression in $Test. $PercentDiffStr% < $($Test.RegressionThreshold)" - } elseif ($FailOnRegression -and $PercentDiff -lt $LocalRegressionThreshold) { - Log-Regression "Performance regression in $Test. $PercentDiffStr% < $LocalRegressionThreshold" - } - } else { - Write-Output "Median: $CurrentFormatted" - } - - if ($Publish -and ($null -ne $CurrentCommitHash)) { - Write-Output "Saving results_$Test.json out for publishing." - $MachineName = ($script:OsBuildNumber).ToString() - if (Test-Path 'env:AGENT_MACHINENAME') { - $MachineName = $MachineName + ":" + $env:AGENT_MACHINENAME - } - $Results = [RPSTestPublishResult]::new($Request, $AllRunsResults, $MachineName, $CurrentCommitHash.Substring(0, 7), $Tcp) - $Results.AuthKey = $CurrentCommitDate; - - $ResultFile = Join-Path $OutputDir "results_$Test.json" - $Results | ConvertTo-Json | Out-File $ResultFile - } elseif (!$Publish) { - Write-LogAndDebug "Failed to publish because of missing commit hash" - } -} - -#endregion - -#region HPS Publish - -class HpsConfiguration { - [int] GetHashCode() { - return 7; - } - - [boolean] Equals([Object]$other) { - return $true - } -} - -class HPSRequest { - [string]$PlatformName; - [string]$TestName; - - HPSRequest ( - [TestRunDefinition]$Test, - [string]$TestName - ) { - $this.PlatformName = $Test.ToTestPlatformString(); - $this.TestName = $TestName - } - - [HpsConfiguration] GetConfiguration() { - $Config = [HpsConfiguration]::new(); - return $Config; - } -} - -function Get-LatestHPSRemoteTestResults($CpuData, [HpsRequest]$Request) { - try { - $Values = [System.Collections.Generic.List[int]]::new() - $TestConfig = $Request.GetConfiguration() - foreach ($Result in $CpuData) { - foreach ($Test in $Result.Tests) { - if ($null -eq $Test.HpsConfig) { - continue; - } - - if ($Test.TestName -eq $Request.TestName -and $TestConfig -eq $Test.HpsConfig -and $Request.PlatformName -eq $Test.PlatformName) { - $Values.Add((Get-MedianTestResults -FullResults $Test.Results)) - break; - } - } - } - if ($Values.Count -eq 0) { - return $null - } - return ($Values | Measure-Object -Average).Average - } catch { - } - return $null -} - -class HPSTestPublishResult { - [string]$MachineName; - [string]$PlatformName; - [string]$TestName; - [string]$CommitHash; - [string]$AuthKey; - [double[]]$IndividualRunResults; - - HPSTestPublishResult ( - [HPSRequest]$Request, - [double[]]$RunResults, - [string]$MachineName, - [string]$CommitHash, - [boolean]$Tcp - ) { - $this.TestName = $Tcp ? "TcpHPS" : "HPS" - $this.MachineName = $MachineName - $this.PlatformName = $Request.PlatformName - $this.CommitHash = $CommitHash - $this.AuthKey = "empty" - $this.IndividualRunResults = $RunResults - } -} - -function Publish-HPSTestResults { - param ([TestRunDefinition]$Test, $AllRunsFullResults, $CurrentCommitHash, $CurrentCommitDate, $PreviousResults, $OutputDir, $ExePath, $Tcp) - - $Request = [HPSRequest]::new($Test, $Tcp ? "TcpHPS" : "HPS") - - $AllRunsResults = Get-TestResultAtIndex -FullResults $AllRunsFullResults -Index 1 - $MedianCurrentResult = Get-MedianTestResults -FullResults $AllRunsResults - $FullLastResult = Get-LatestHPSRemoteTestResults -CpuData $PreviousResults -Request $Request - $CurrentFormatted = [string]::Format($Test.Formats[0], $MedianCurrentResult) - - if ($null -ne $FullLastResult) { - $MedianLastResult = $FullLastResult - if ($MedianLastResult -eq 0) { - Write-Error "Cannot have a last result median of 0" - } - $PercentDiff = 100 * (($MedianCurrentResult - $MedianLastResult) / $MedianLastResult) - $PercentDiffStr = $PercentDiff.ToString("#.##") - if ($PercentDiff -ge 0) { - $PercentDiffStr = "+$PercentDiffStr" - } - $LastFormatted = [string]::Format($Test.Formats[0], $MedianLastResult) - Write-Output "Median: $CurrentFormatted ($PercentDiffStr%)" - Write-Output "Remote: $LastFormatted" - if ($FailOnRegression -and !$Local -and $PercentDiff -lt $Test.RegressionThreshold) { - Log-Regression "Performance regression in $Test. $PercentDiffStr% < $($Test.RegressionThreshold)" - } elseif ($FailOnRegression -and $PercentDiff -lt $LocalRegressionThreshold) { - Log-Regression "Performance regression in $Test. $PercentDiffStr% < $LocalRegressionThreshold" - } - } else { - Write-Output "Median: $CurrentFormatted" - } - - if ($Publish -and ($null -ne $CurrentCommitHash)) { - Write-Output "Saving results_$Test.json out for publishing." - $MachineName = ($script:OsBuildNumber).ToString() - if (Test-Path 'env:AGENT_MACHINENAME') { - $MachineName = $MachineName + ":" + $env:AGENT_MACHINENAME - } - $Results = [HPSTestPublishResult]::new($Request, $AllRunsResults, $MachineName, $CurrentCommitHash.Substring(0, 7), $Tcp) - $Results.AuthKey = $CurrentCommitDate; - - $ResultFile = Join-Path $OutputDir "results_$Test.json" - $Results | ConvertTo-Json | Out-File $ResultFile - } elseif (!$Publish) { - Write-LogAndDebug "Failed to publish because of missing commit hash" - } -} - -#endregion - -function Publish-TestResults { - param ([TestRunDefinition]$Test, $AllRunsResults, $CurrentCommitHash, $CurrentCommitDate, $PreviousResults, $OutputDir, $ExePath) - - if ($Test.TestName -eq "ThroughputUp") { - Publish-ThroughputTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ServerToClient $false -ExePath $ExePath -Tcp $false - } elseif ($Test.TestName -eq "ThroughputDown") { - Publish-ThroughputTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ServerToClient $true -ExePath $ExePath -Tcp $false - } elseif ($Test.TestName -eq "TcpThroughputUp") { - Publish-ThroughputTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ServerToClient $false -ExePath $ExePath -Tcp $true - } elseif ($Test.TestName -eq "TcpThroughputDown") { - Publish-ThroughputTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ServerToClient $true -ExePath $ExePath -Tcp $true - } elseif ($Test.TestName -eq "RPS") { - Publish-RPSTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ExePath $ExePath - } elseif ($Test.TestName -eq "TcpRPS") { - Publish-RPSTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ExePath $ExePath -Tcp $true - } elseif ($Test.TestName -eq "HPS") { - Publish-HPSTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ExePath $ExePath - } elseif ($Test.TestName -eq "TcpHPS") { - Publish-HPSTestResults -Test $Test -AllRunsFullResults $AllRunsResults -CurrentCommitHash $CurrentCommitHash -CurrentCommitDate $CurrentCommitDate -PreviousResults $PreviousResults -OutputDir $OutputDir -ExePath $ExePath -Tcp $true - } else { - Write-Host "Unknown Test Type" - } -} - -#region Test Parsing - -class ExecutableRunSpec { - [string]$Platform; - [string]$Exe; - [string[]]$Tls; - [string[]]$Arch; - [string]$Arguments; - - ExecutableRunSpec ( - [ExecutableSpec]$existingDef, - [string]$arguments - ) { - $this.Platform = $existingDef.Platform - $this.Exe = $existingDef.Exe - $this.Tls = $existingDef.Tls - $this.Arch = $existingDef.Arch - $this.Arguments = $arguments - } -} - -class TestRunDefinition { - [string]$TestName; - [string]$VariableName; - [string]$VariableValue; - [ExecutableRunSpec]$Local; - [int]$Iterations; - [string]$RemoteReadyMatcher; - [string]$ResultsMatcher; - [hashtable]$VariableValues; - [boolean]$Loopback; - [boolean]$AllowLoopback; - [string]$FailureDefault; - [boolean]$XDP; - [string[]]$Formats; - [double]$RegressionThreshold; - - TestRunDefinition ( - [TestDefinition]$existingDef, - [string]$variableName, - [string]$variableValue, - [string]$localArgs, - [hashtable]$variableValues - ) { - $this.TestName = $existingDef.TestName - $this.VariableName = $variableName - $this.VariableValue = $variableValue - $this.Local = [ExecutableRunSpec]::new($existingDef.Local, $localArgs) - $this.Iterations = $existingDef.Iterations - $this.RemoteReadyMatcher = $existingDef.RemoteReadyMatcher - $this.ResultsMatcher = $existingDef.ResultsMatcher - $this.VariableValues = $variableValues - $this.Loopback = $script:Local - $this.AllowLoopback = $existingDef.AllowLoopback - $this.Formats = $existingDef.Formats - $this.RegressionThreshold = $existingDef.RegressionThreshold - $this.XDP = $script:XDP - $this.FailureDefault = $existingDef.FailureDefault - } - - TestRunDefinition ( - [TestDefinition]$existingDef, - [Collections.Generic.List[FullVariableSpec]]$variables - ) { - $this.TestName = $existingDef.TestName - $this.Iterations = $existingDef.Iterations - $this.RemoteReadyMatcher = $existingDef.RemoteReadyMatcher - $this.ResultsMatcher = $existingDef.ResultsMatcher - $this.Loopback = $script:Local - $this.AllowLoopback = $existingDef.AllowLoopback - $this.Formats = $existingDef.Formats - $this.RegressionThreshold = $existingDef.RegressionThreshold - $this.FailureDefault = $existingDef.FailureDefault - $this.VariableValue = "" - $this.VariableName = "" - - $this.VariableValues = @{} - $BaseArgs = $existingDef.Local.Arguments - foreach ($Var in $variables) { - $this.VariableValues.Add($Var.Name, $Var.Value) - $BaseArgs += (" " + $Var.Argument) - $this.VariableName += ("_" + $Var.Name + "_" + $Var.Value) - } - $this.Local = [ExecutableRunSpec]::new($existingDef.Local, $BaseArgs) - $this.XDP = $script:XDP - } - - TestRunDefinition ( - [TestDefinition]$existingDef, - [string]$localArgs, - [hashtable]$variableValues - ) { - $this.TestName = $existingDef.TestName - $this.VariableName = "Default" - $this.VariableValue = "" - $this.Local = [ExecutableRunSpec]::new($existingDef.Local, $localArgs) - $this.Iterations = $existingDef.Iterations - $this.RemoteReadyMatcher = $existingDef.RemoteReadyMatcher - $this.ResultsMatcher = $existingDef.ResultsMatcher - $this.VariableValues = $variableValues - $this.Loopback = $script:Local - $this.AllowLoopback = $existingDef.AllowLoopback - $this.Formats = $existingDef.Formats - $this.RegressionThreshold = $existingDef.RegressionThreshold - $this.XDP = $script:XDP - $this.FailureDefault = $existingDef.FailureDefault - } - - [string]ToString() { - $VarVal = "_$($this.VariableValue)" - if ($this.VariableName -eq "Default") { - $VarVal = "" - } - - $RetString = "$($this.TestName)_$($this.ToTestPlatformString())_$($this.VariableName)$VarVal" - if ($this.Loopback) { - $RetString += "_Loopback" - } - return $RetString - } - - [string]ToTestPlatformString() { - $Platform = $this.Local.Platform - if ($script:Kernel -and $this.Local.Platform -eq "Windows") { - $Platform = 'Winkernel' - } - if ($script:XDP -and $this.Local.Platform -eq "Windows") { - $Platform = 'WinXDP' - } - $RetString = "$($Platform)_$($script:RemoteArch)_$($script:RemoteTls)" - return $RetString - } -} - -class TestRunConfig { - [RemoteConfig]$Remote; - [TestRunDefinition[]]$Tests; -} - -class Defaults { - [string]$LocalValue; - [string]$DefaultKey; - - Defaults ( - [string]$local, - [string]$defaultKey - ) { - $this.LocalValue = $local - $this.DefaultKey = $defaultKey - } -} - -class FullVariableSpec { - [string]$Name; - [string]$Value; - [string]$Argument; - - FullVariableSpec($Name, $Value, $Argument) { - $this.Name = $Name - $this.Value = $Value - $this.Argument = $Argument - } -} - -function Get-FullTestMatrix { - param ([TestConfig]$Tests, $RemotePlatform, $LocalPlatform) - - [TestRunDefinition[]]$ToRunTests = @() - - foreach ($Test in $Tests.Tests) { - - if (!(Test-CanRunTest -Test $Test -RemotePlatform $RemotePlatform -LocalPlatform $LocalPlatform)) { - Write-Host "Skipping $($Test.ToString())" - continue - } - - [Hashtable]$Variables = @{} - - # Loop throught each variable - foreach ($Var in $Test.Variables) { - # Loop through each inner variable - foreach ($InnerVar in $Var.Local.Keys) { - if ($Variables.ContainsKey($Var.Name)) { - $Variables[$Var.Name] += [FullVariableSpec]::new($Var.Name, $InnerVar, $Var.Local[$InnerVar]); - } else { - $NewVar = @() - $NewVar += [FullVariableSpec]::new($Var.Name, $InnerVar, $Var.Local[$InnerVar]); - $Variables[$Var.Name] = $NewVar - } - } - } - - if ($Variables.Count -eq 0) { - Write-Error "Full Matrix with an empty variable set not supported" - } - - $First = $true - $Finished = [Collections.Generic.List[Collections.Generic.List[FullVariableSpec]]]::new() - - foreach ($Variable in $Variables.Keys) { - if ($First) { - $First = $false - foreach ($InnerVar in $Variables[$Variable]) { - $TmpList = [Collections.Generic.List[FullVariableSpec]]::new() - $TmpList.Add($InnerVar) - $Finished.Add($TmpList) - } - } else { - $NewList = [Collections.Generic.List[Collections.Generic.List[FullVariableSpec]]]::new() - foreach($ExistingList in $Finished) { - foreach($InnerVar in $Variables[$Variable]) { - $TmpList = [Collections.Generic.List[FullVariableSpec]]::new() - $TmpList.AddRange($ExistingList) - $TmpList.Add($InnerVar) - $NewList.Add($TmpList) - } - } - $Finished = $NewList - } - } - - foreach ($TestToRun in $Finished) { - $ToRunTests += [TestRunDefinition]::new($Test, $TestToRun) - } - } - - $RunConfig = [TestRunConfig]::new() - $RunConfig.Remote = $Tests.Remote; - $RunConfig.Tests = $ToRunTests; - - return $RunConfig -} - -function Get-TestMatrix { - param ([TestConfig]$Tests, $RemotePlatform, $LocalPlatform) - - if ($Tests.FullMatrix) { - return Get-FullTestMatrix -Tests $Tests -RemotePlatform $RemotePlatform -LocalPlatform $LocalPlatform - } - - [TestRunDefinition[]]$ToRunTests = @() - - foreach ($Test in $Tests.Tests) { - - if (!(Test-CanRunTest -Test $Test -RemotePlatform $RemotePlatform -LocalPlatform $LocalPlatform)) { - Write-Host "Skipping $($Test.ToString())" - continue - } - - [hashtable]$DefaultVals = @{} - # Get all default variables - foreach ($Var in $Test.Variables) { - $DefaultVals.Add($Var.Name, [Defaults]::new($Var.Local[$Var.Default], $Var.Default)) - } - - $LocalArgs = $Test.Local.Arguments - - $DefaultLocalArgs = $LocalArgs - - $VariableValues = @{} - foreach ($VarKey in $DefaultVals.Keys) { - $VariableValues.Add($VarKey, $DefaultVals[$VarKey].DefaultKey) - $DefaultLocalArgs += (" " + $DefaultVals[$VarKey].LocalValue) - } - - # Create the default test - $TestRunDef = [TestRunDefinition]::new($Test, $DefaultLocalArgs, $VariableValues) - $ToRunTests += $TestRunDef - - foreach ($Var in $Test.Variables) { - $LocalVarArgs = @{} - - $StateKeyList = @() - - foreach ($Key in $Var.Local.Keys) { - $LocalVarArgs.Add($Key, $LocalArgs + " " + $Var.Local[$Key]) - $StateKeyList += $Key - } - - # Enumerate each variable, getting its value and the default - foreach ($Key in $DefaultVals.Keys) { - if ($Key -ne $Var.Name) { - foreach ($TestKey in $StateKeyList) { - $KeyVal =$DefaultVals[$Key] - $LocalVarArgs[$TestKey] += " $($KeyVal.LocalValue)" - } - } - } - - foreach ($Key in $StateKeyList) { - $VariableValues = @{} - foreach ($VarKey in $DefaultVals.Keys) { - $VariableValues.Add($VarKey, $DefaultVals[$VarKey].DefaultKey) - } - if ($VariableValues[$Var.Name] -eq $Key) { - continue - } - $VariableValues[$Var.Name] = $Key - $TestRunDef = [TestRunDefinition]::new($Test, $Var.Name, $Key, $LocalVarArgs[$Key], $VariableValues) - $ToRunTests += $TestRunDef - } - } - } - - $RunConfig = [TestRunConfig]::new() - $RunConfig.Remote = $Tests.Remote; - $RunConfig.Tests = $ToRunTests; - - return $RunConfig -} - -class VariableSpec { - [string]$Name; - [Hashtable]$Local; - [string]$Default; -} - -class ExecutableSpec { - [string]$Platform; - [string[]]$Tls; - [string[]]$Arch; - [string]$Exe; - [string]$Arguments; -} - -class TestDefinition { - [string]$TestName; - [string]$FailureDefault; - [ExecutableSpec]$Local; - [VariableSpec[]]$Variables; - [int]$Iterations; - [string]$RemoteReadyMatcher; - [string]$ResultsMatcher; - [boolean]$AllowLoopback; - [string[]]$Formats; - [double]$RegressionThreshold; - - [string]ToString() { - $Platform = $this.Local.Platform - if ($script:Kernel -and $this.Local.Platform -eq "Windows") { - $Platform = 'Winkernel' - } - $RetString = "$($this.TestName)_$($Platform) [$($this.Local.Arch)] [$($this.Local.Tls)]" - return $RetString - } -} - -class RemoteConfig { - [string]$Exe; - [string]$Arguments; -} - -class TestConfig { - [RemoteConfig]$Remote; - [TestDefinition[]]$Tests; - [boolean]$FullMatrix; -} - -function Get-Tests { - param ($Path, $RemotePlatform, $LocalPlatform) - $Tests = [TestConfig](Get-Content -Path $Path | ConvertFrom-Json -AsHashtable) - $MatrixTests = Get-TestMatrix -Tests $Tests -RemotePlatform $RemotePlatform -LocalPlatform $LocalPlatform - if (Test-AllTestsValid -Tests $MatrixTests) { - return $MatrixTests - } else { - Write-Host "Error" - return $null - } -} - -function Test-AllTestsValid { - param ([TestRunConfig]$Tests) - $TestSet = New-Object System.Collections.Generic.HashSet[string] - foreach ($T in $Tests.Tests) { - if (!$TestSet.Add($T)) { - return $false - } - } - - return $true -} - -function Test-CanRunTest { - param ([TestDefinition]$Test, $RemotePlatform, $LocalPlatform) - $PlatformCorrect = ($Test.Local.Platform -eq $LocalPlatform) - if (!$PlatformCorrect) { - return $false - } - if (!$Test.Local.Tls.Contains($LocalTls)) { - return $false - } - if ($Local -and !$Test.AllowLoopback) { - return $false - } - if ($script:Kernel -and $Test.TestName.Contains("Tcp")) { - return $false - } - if ($script:XDP -and $Test.TestName.Contains("Tcp")) { - return $false - } - if ($script:PGO -and $Test.TestName.Contains("Tcp")) { - return $false - } - return $true -} - -#endregion - -Export-ModuleMember -Function * -Alias * diff --git a/scripts/performance.ps1 b/scripts/performance.ps1 deleted file mode 100644 index a202ba4074..0000000000 --- a/scripts/performance.ps1 +++ /dev/null @@ -1,673 +0,0 @@ -<# - -.SYNOPSIS -This script runs performance tests locally for a period of time. - -.PARAMETER Config - Specifies the build configuration to use. - -.PARAMETER LocalArch - Specifies what the local arch is - -.PARAMETER RemoteArch - Specifies what the remote arch is - -.PARAMETER Kernel - Run the remote in kernel mode - -.PARAMETER LocalTls - Specifies what local TLS provider to use - -.PARAMETER RemoteTls - Specifies what remote TLS provider to use - -.PARAMETER TestsFile - Explcitly specifes a test file to run - -.PARAMETER Remote - The remote to connect to. Must have ssh remoting enabled, and public key auth. username@ip - -.PARAMETER Local - Use the local system as the remote - -.PARAMETER PGO - Uses pgomgr to merge the resulting .pgc files back to the .pgd. - -.PARAMETER SkipDeploy - Set flag to skip deploying test files - -.PARAMETER Publish - Publishes the results to the artifacts directory. - -.PARAMETER RecordStack - Records ETW stack traces - -.PARAMETER Timeout - Timeout in seconds for each individual client test invocation. - -.PARAMETER RecordQUIC - Record QUIC specific trace events - -.PARAMETER TestToRun - Run a specific test name - -.PARAMETER FailOnRegression - Fail tests on perf regression (Currently only throughput up) - -.PARAMETER Protocol - Which Protocol to use (QUIC or TCP) - -#> - -Using module .\performance-helper.psm1 - -param ( - [Parameter(Mandatory = $false)] - [ValidateSet("Debug", "Release")] - [string]$Config = "Release", - - [Parameter(Mandatory = $false)] - [string]$TestsFile = "", - - [Parameter(Mandatory = $false)] - [string]$Remote = "", - - [Parameter(Mandatory = $false)] - [ValidateSet("x86", "x64", "arm", "arm64")] - [string]$LocalArch = "x64", - - [Parameter(Mandatory = $false)] - [ValidateSet("schannel", "openssl", "openssl3")] - [string]$LocalTls = "", - - [Parameter(Mandatory = $false)] - [ValidateSet("x86", "x64", "arm", "arm64")] - [string]$RemoteArch = "x64", - - [Parameter(Mandatory = $false)] - [string]$ExtraArtifactDir = "", - - [Parameter(Mandatory = $false)] - [ValidateSet("schannel", "openssl", "openssl3")] - [string]$RemoteTls = "", - - [Parameter(Mandatory = $false)] - [string]$ComputerName = "quic-server", - - [Parameter(Mandatory = $false)] - [ValidateSet("Basic.Light", "Datapath.Light", "Datapath.Verbose", "Stacks.Light", "Stacks.Verbose", "RPS.Light", "RPS.Verbose", "Performance.Light", "Basic.Verbose", "Performance.Light", "Performance.Verbose", "Full.Light", "Full.Verbose", "SpinQuic.Light", "None")] - [string]$LogProfile = "None", - - [Parameter(Mandatory = $false)] - [string]$WinRMUser = "", - - [Parameter(Mandatory = $false)] - [switch]$Kernel = $false, - - [Parameter(Mandatory = $false)] - [switch]$SkipDeploy = $false, - - [Parameter(Mandatory = $false)] - [switch]$Publish = $false, - - [Parameter(Mandatory = $false)] - [switch]$Local = $false, - - [Parameter(Mandatory = $false)] - [switch]$PGO = $false, - - [Parameter(Mandatory = $false)] - [switch]$XDP = $false, - - [Parameter(Mandatory = $false)] - [switch]$QTIP = $false, - - [Parameter(Mandatory = $false)] - [int]$Timeout = 120, - - [Parameter(Mandatory = $false)] - [string]$TestToRun = "", - - [Parameter(Mandatory = $false)] - [boolean]$FailOnRegression = $false, - - [Parameter(Mandatory = $false)] - [string]$ForceBranchName = $null, - - [Parameter(Mandatory = $false)] - [ValidateSet("QUIC", "TCPTLS")] - [string]$Protocol = "QUIC", - - [Parameter(Mandatory = $false)] - [int]$ForceIterations = 0 -) - -Set-StrictMode -Version 'Latest' -$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' -$ProgressPreference = 'SilentlyContinue' - -# Validate the the switches. -if ($Kernel) { - if (!$IsWindows) { - Write-Error "'-Kernel' is not supported on this platform" - } - if ($PGO) { - Write-Error "'-PGO' is not supported in kernel mode!" - } - if ($XDP) { - Write-Error "'-XDP' is not supported in kernel mode!" - } - if ($QTIP) { - Write-Error "'-QTIP' is not supported in kernel mode!" - } -} -if (!$IsWindows) { - if ($PGO) { - Write-Error "'-PGO' is not supported on this platform!" - } - if ($XDP) { - Write-Error "'-XDP' is not supported on this platform!" - } - if ($QTIP) { - Write-Error "'-QTIP' is not supported on this platform!" - } -} - -if (!$IsWindows -and [string]::IsNullOrWhiteSpace($Remote)) { - $Remote = "quic-server" -} - -if ($PGO) { - # PGO makes things slower, so increase the timeout accordingly. - $Timeout = $Timeout * 5 -} - -# Root directory of the project. -$RootDir = Split-Path $PSScriptRoot -Parent - -$Record = "None" -ne $LogProfile - -# Remove any previous remote PowerShell sessions -Get-PSSession | Remove-PSSession - -$LocalPlatform = $null -if ($IsWindows) { - $LocalPlatform = "windows" -} else { - $LocalPlatform = "linux" -} - -# Set Tls -if (($LocalTls -eq "") -and ($RemoteTls -eq "")) { - if ($IsWindows) { - $LocalTls = "schannel" - $RemoteTls = $LocalTls - } else { - $LocalTls = "openssl" - $RemoteTls = $LocalTls - } -} elseif (($LocalTls -ne "") -xor ($RemoteTls -ne "")) { - Write-Error "Both TLS arguments must be set if a manual setting is done" -} - -$TestFileName = ($Protocol -eq "QUIC") ? "RemoteTests.json" : "TcpTests.json" - -if ($TestsFile -eq "") { - $TestsFile = Join-Path $PSScriptRoot $TestFileName -} elseif (-not (Test-Path $TestsFile)) { - $TestsFile = Join-Path $PSScriptRoot $TestsFile -} - -if (-not (Test-Path $TestsFile)) { - Write-Error "Test file to run not found" -} - -if ($Local) { - $RemoteAddress = "localhost" - $Session = $null - $LocalAddress = "127.0.0.1" -} else { - if ($Remote -eq "") { - if ($WinRMUser -ne "") { - $Session = New-PSSession -ComputerName $ComputerName -Credential $WinRMUser -ConfigurationName PowerShell.7 - } else { - $Session = New-PSSession -ComputerName $ComputerName -ConfigurationName PowerShell.7 - } - } else { - $Session = New-PSSession -HostName "$Remote" - } - - $RemoteAddress = $Session.ComputerName - - if ($null -eq $Session) { - Write-Error "Failed to create remote session" - exit - } - - $LocalAddress = Get-LocalAddress -RemoteAddress $RemoteAddress - - Write-Output "Connected to: $RemoteAddress" - Write-Output "Local IP Connection $LocalAddress" -} - -Set-ScriptVariables -Local $Local ` - -LocalTls $LocalTls ` - -LocalArch $LocalArch ` - -RemoteTls $RemoteTls ` - -RemoteArch $RemoteArch ` - -XDP $XDP ` - -QTIP $QTIP ` - -Config $Config ` - -Publish $Publish ` - -Record $Record ` - -LogProfile $LogProfile ` - -RemoteAddress $RemoteAddress ` - -Session $Session ` - -Kernel $Kernel ` - -FailOnRegression $FailOnRegression ` - -PGO $PGO - -$RemotePlatform = Invoke-TestCommand -Session $Session -ScriptBlock { - if ($IsWindows) { - return "windows" - } else { - return "linux" - } -} - -$OutputDir = Join-Path $RootDir "artifacts/PerfDataResults/$RemotePlatform/$($RemoteArch)_$($Config)_$($RemoteTls)$($ExtraArtifactDir)" -New-Item -Path $OutputDir -ItemType Directory -Force | Out-Null - -$DebugFileName = $Local ? "DebugLogLocal.txt" : "DebugLog.txt" -if ($Kernel) { - $DebugFileName = "Kernel$DebugFileName" -} -$DebugLogFile = Join-Path $OutputDir $DebugFileName -"" | Out-File $DebugLogFile - -Set-DebugLogFile -DebugLogFile $DebugLogFile - -$OsBuildNumber = [System.Environment]::OSVersion.Version.Build -Write-LogAndDebug "Running on $OsBuildNumber" - -$LocalDirectory = Join-Path $RootDir "artifacts/bin" -$RemoteDirectorySMB = $null - -# Copy manifest and log script to local directory -Copy-Item -Path (Join-Path $RootDir scripts get-buildconfig.ps1) -Destination $LocalDirectory -Copy-Item -Path (Join-Path $RootDir scripts log.ps1) -Destination $LocalDirectory -Copy-Item -Path (Join-Path $RootDir scripts xdp.json) -Destination $LocalDirectory -Copy-Item -Path (Join-Path $RootDir scripts prepare-machine.ps1) -Destination $LocalDirectory -Copy-Item -Path (Join-Path $RootDir src manifest MsQuic.wprp) -Destination $LocalDirectory - -if ($Local) { - $RemoteDirectory = $LocalDirectory -} else { - # See if remote SMB path exists - if (Test-Path "\\$ComputerName\Tests") { - $RemoteDirectorySMB = "\\$ComputerName\Tests" - $RemoteDirectory = Invoke-TestCommand -Session $Session -ScriptBlock { - (Get-SmbShare -Name Tests).Path - } - } else { - # Join path in script to ensure right platform separator - $RemoteDirectory = Invoke-TestCommand -Session $Session -ScriptBlock { - Join-Path (Get-Location) "Tests" - } - } -} - -$CurrentCommitHash = Get-GitHash -RepoDir $RootDir -$CurrentCommitDate = Get-CommitDate -RepoDir $RootDir - -if ($PGO -and $Local) { - # PGO needs the server and client executing out of separate directories. - $RemoteDirectoryOld = $RemoteDirectory - $RemoteDirectory = "$($RemoteDirectoryOld)_server" - try { - Remove-Item -Path "$RemoteDirectory/*" -Recurse -Force - } catch { - # Ignore failure, which occurs when directory does not exist - } - New-Item -Path $RemoteDirectory -ItemType Directory -Force | Out-Null - Copy-Item "$RemoteDirectoryOld\*" $RemoteDirectory -Recurse -} - -function LocalSetup { - $RetObj = New-Object -TypeName psobject - $RetObj | Add-Member -MemberType NoteProperty -Name apipaInterfaces -Value $null - try { - if ($IsWindows -and $Local) { - $apipaAddr = Get-NetIPAddress 169.254.* - if ($null -ne $apipaAddr) { - # Disable all the APIPA interfaces for URO perf. - Write-LogAndDebug "Temporarily disabling APIPA interfaces" - $RetObj.apipaInterfaces = (Get-NetAdapter -InterfaceIndex $apipaAddr.InterfaceIndex) | Where-Object {$_.AdminStatus -eq "Up"} - $RetObj.apipaInterfaces | Disable-NetAdapter -Confirm:$false - } - } - } catch { - $RetObj.apipaInterfaces = $null - } - - return $RetObj -} - -function LocalTeardown { - param ($LocalCache) - if ($null -ne $LocalCache.apipaInterfaces) { - # Re-enable the interfaces we disabled earlier. - Write-LogAndDebug "Re-enabling APIPA interfaces" - $LocalCache.apipaInterfaces | Enable-NetAdapter - } -} - -$RemoteExePath = Get-ExePath -PathRoot $RemoteDirectory -Platform $RemotePlatform -IsRemote $true -$LocalExePath = Get-ExePath -PathRoot $LocalDirectory -Platform $LocalPlatform -IsRemote $false - -# See if we are an AZP PR -$PrBranchName = $env:SYSTEM_PULLREQUEST_TARGETBRANCH -if ([string]::IsNullOrWhiteSpace($PrBranchName)) { - # Mainline build, just get branch name - $AzpBranchName = $env:BUILD_SOURCEBRANCH - if ([string]::IsNullOrWhiteSpace($AzpBranchName)) { - # Non azure build - $BranchName = Get-CurrentBranch -RepoDir $RootDir - } else { - # Azure Build - $BuildReason = $env:BUILD_REASON - if ("Manual" -eq $BuildReason) { - $BranchName = "main" - } else { - $BranchName = $AzpBranchName.Substring(11); - } - } -} else { - # PR Build - $BranchName = $PrBranchName -} - -if (![string]::IsNullOrWhiteSpace($ForceBranchName)) { - $BranchName = $ForceBranchName -} - -$LastCommitHashes = Get-LatestCommitHashes -Branch $BranchName -$PreviousResults = Get-LatestCpuTestResults -Branch $BranchName -CommitHashes $LastCommitHashes - -function Invoke-Test { - param ([TestRunDefinition]$Test, [RemoteConfig]$RemoteConfig) - - Write-Output "Running Test $Test" - - $RemoteExe = Get-ExeName -PathRoot $RemoteDirectory -Platform $RemotePlatform -IsRemote $true -TestPlat $RemoteConfig - $LocalExe = Get-ExeName -PathRoot $LocalDirectory -Platform $LocalPlatform -IsRemote $false -TestPlat $Test.Local - - # Check both Exes - $RemoteExeExists = Invoke-TestCommand -Session $Session -ScriptBlock { - param ($RemoteExe) - Test-Path $RemoteExe - } -ArgumentList $RemoteExe - - $LocalExeExists = Test-Path $LocalExe - - if (!$RemoteExeExists -or !$LocalExeExists) { - if (!$RemoteExeExists) { - Write-Output "Missing Remote Exe $RemoteExe" - } - if (!$LocalExeExists) { - Write-Output "Missing Local Exe $LocalExe" - } - Write-Error "Failed to Run $Test because of missing exe" - } - - $LocalArguments = $Test.Local.Arguments.Replace('$RemoteAddress', $RemoteAddress) - $LocalArguments = $LocalArguments.Replace('$LocalAddress', $LocalAddress) - - $RemoteArguments = $RemoteConfig.Arguments - - if ($LocalArguments.Contains("-stats:1")) { - $RemoteArguments += " -stats:1" - } - - if ($LocalArguments.Contains("-sstats:1")) { - $RemoteArguments += " -sstats:1" - } - - if ($LocalArguments.Contains("-exec:maxtput")) { - $RemoteArguments += " -exec:maxtput" - } - - if ($LocalArguments.Contains("-exec:lowlat")) { - $RemoteArguments += " -exec:lowlat" - } - - if ($XDP) { - $RemoteArguments += " -pollidle:10000" - $LocalArguments += " -pollidle:10000" - } - - if ($QTIP) { - $RemoteArguments += " -qtip:1" - $LocalArguments += " -qtip:1" - } - - if ($Kernel) { - $Arch = Split-Path (Split-Path $LocalExe -Parent) -Leaf - $RootBinPath = Split-Path (Split-Path (Split-Path $LocalExe -Parent) -Parent) -Parent - $KernelDir = Join-Path $RootBinPath "winkernel" $Arch - - Copy-Item (Join-Path $KernelDir "secnetperfdrvpriv.sys") (Split-Path $LocalExe -Parent) - Copy-Item (Join-Path $KernelDir "msquicpriv.sys") (Split-Path $LocalExe -Parent) - - $LocalArguments = "-driverNamePriv:secnetperfdrvpriv $LocalArguments" - } - - if ($IsWindows) { - # Copy to tmp folder - $CopyToDirectory = "C:\RunningTests" - New-Item -Path $CopyToDirectory -ItemType Directory -Force | Out-Null - $ExeFolder = Split-Path $LocalExe -Parent - Copy-Item -Path "$ExeFolder\*" -Destination $CopyToDirectory -Recurse -Force - $LocalExe = Join-Path $CopyToDirectory (Split-Path $LocalExe -Leaf) - } - - Write-LogAndDebug "Running Remote: $RemoteExe Args: $RemoteArguments" - - # Starting the server - $RemoteJob = Invoke-RemoteExe -Exe $RemoteExe -RunArgs $RemoteArguments -RemoteDirectory $RemoteDirectory - $ReadyToStart = Wait-ForRemoteReady -Job $RemoteJob -Matcher $Test.RemoteReadyMatcher - - if (!$ReadyToStart) { - Stop-Job -Job $RemoteJob - $RetVal = Receive-Job -Job $RemoteJob - $RetVal = $RetVal -join "`n" - Cancel-RemoteLogs -RemoteDirectory $RemoteDirectory - Write-Error "Test Remote for $Test failed to start: $RetVal" - } - - $AllRunsResults = @() - - Start-Tracing -LocalDirectory $LocalDirectory - - $NumIterations = $Test.Iterations - if ($ForceIterations -gt 0) { - $NumIterations = $ForceIterations - } - - try { - 1..$NumIterations | ForEach-Object { - Write-LogAndDebug "Running Local: $LocalExe Args: $LocalArguments" - $LocalResults = Invoke-LocalExe -Exe $LocalExe -RunArgs $LocalArguments -Timeout $Timeout -OutputDir $OutputDir -HistogramFileName "$($Test)_run$($_).txt" -Iteration $_ - Write-LogAndDebug $LocalResults - $AllLocalParsedResults = Get-TestResult -Results $LocalResults -Matcher $Test.ResultsMatcher -FailureDefault $Test.FailureDefault - $AllRunsResults += $AllLocalParsedResults - if ($PGO) { - # Merge client PGO Counts - Merge-PGOCounts -Path $LocalExePath - } - - $FormattedStrings = @() - - for ($i = 1; $i -lt $AllLocalParsedResults.Count; $i++) { - $Formatted = [string]::Format($Test.Formats[$i - 1], $AllLocalParsedResults[$i]) - $FormattedStrings += $Formatted - } - - $Joined = [string]::Join(", ", $FormattedStrings) - - $OutputString = "Run $($_): $Joined" - - Write-Output $OutputString - $LocalResults | Write-LogAndDebug - } - } finally { - # -ErrorAction Continue for "perf" to return error when stop - $RemoteResults = Wait-ForRemote -Job $RemoteJob -ErrorAction Continue - Write-LogAndDebug $RemoteResults.ToString() - - # parallelize post processing with client - $StoppingRemoteJob = Stop-RemoteLogs -RemoteDirectory $RemoteDirectory - - if ($Kernel) { - net.exe stop secnetperfdrvpriv /y | Out-Null - net.exe stop msquicpriv /y | Out-Null - sc.exe delete secnetperfdrvpriv | Out-Null - sc.exe delete msquicpriv | Out-Null - } - - # FIXME: Using Start-Job in this func cause program hang for some reason - Stop-Tracing -LocalDirectory $LocalDirectory -OutputDir $OutputDir -Test $Test -NumIterations $NumIterations - $StoppingRemoteJob | Wait-Job | Receive-Job -ErrorAction Continue - - if ($Record) { - if ($Local) { - $LocalLogPath = (Join-Path $RemoteDirectory serverlogs) - Copy-Item -Path $LocalLogPath -Destination (Join-Path $OutputDir $Test.ToString()) -Recurse -Force - try { - Remove-Item -Path "$LocalLogPath/*" -Recurse -Force - } catch [System.Management.Automation.ItemNotFoundException] { - # Ignore Not Found for when the directory does not exist - # This will still throw if a file cannot successfuly be deleted - } - } else { - try { - $SmbDir = "" - if ($IsWindows) { - $SmbDir = (Join-Path $RemoteDirectorySMB serverlogs) - } - Get-RemoteLogDirectory -Local (Join-Path $OutputDir $Test.ToString()) -Remote (Join-Path $RemoteDirectory serverlogs) -SmbDir $SmbDir -Cleanup - } catch { - Write-Host "Failed to get remote logs" - } - } - } - } - - if ($PGO) { - # Merge server PGO Counts - Get-RemoteFile -From (Join-Path $RemoteExePath *.pgc) -To $LocalExePath - Remove-RemoteFile -Path (Join-Path $RemoteExePath *.pgc) - Merge-PGOCounts -Path $LocalExePath - } - - Publish-TestResults -Test $Test ` - -AllRunsResults $AllRunsResults ` - -CurrentCommitHash $CurrentCommitHash ` - -CurrentCommitDate $CurrentCommitDate ` - -PreviousResults $PreviousResults ` - -OutputDir $OutputDir ` - -ExePath $LocalExe -} - -$LocalDataCache = LocalSetup - -if ($Record -and $IsWindows) { - try { wpr.exe -cancel -instancename msquicperf 2> $null } catch { } - Invoke-TestCommand -Session $Session -ScriptBlock { - try { wpr.exe -cancel -instancename msquicperf 2> $null } catch { } - } -} - -try { - [TestRunConfig]$Tests = Get-Tests -Path $TestsFile -RemotePlatform $RemotePlatform -LocalPlatform $LocalPlatform - - if ($null -eq $Tests) { - Write-Error "Tests are not valid" - } - - Remove-PerfServices - - if ($IsWindows) { - # Best effort, try to cancel any outstanding logs - try { Cancel-RemoteLogs -RemoteDirectory $RemoteDirectory } catch { } - - try { - $CopyToDirectory = "C:\RunningTests" - Remove-Item -Path "$CopyToDirectory/*" -Recurse -Force - } catch [System.Management.Automation.ItemNotFoundException] { - # Ignore Not Found for when the directory does not exist - # This will still throw if a file cannot successfuly be deleted - } - } - - # Find All Remote processes, and kill them - if (!$Local) { - $ExeName = $Tests.Remote.Exe - Invoke-TestCommand -Session $Session -ScriptBlock { - param ($ExeName) - try { - Stop-Process -Name $ExeName -Force - } catch { - } - } -ArgumentList $ExeName - } - - if (!$SkipDeploy -and !$Local) { - Copy-Artifacts -From $LocalDirectory -To $RemoteDirectory -SmbDir $RemoteDirectorySMB - } - - Cancel-LocalTracing -LocalDirectory $LocalDirectory - Cancel-RemoteLogs -RemoteDirectory $RemoteDirectory - - Invoke-Expression "$(Join-Path $LocalDirectory prepare-machine.ps1) -UninstallXdp" - if (!$Local) { - Invoke-TestCommand -Session $Session -ScriptBlock { - param ($RemoteDirectory) - Invoke-Expression "$(Join-Path $RemoteDirectory prepare-machine.ps1) -UninstallXdp" - } -ArgumentList $RemoteDirectory - } - - if ($XDP) { - Invoke-Expression "$(Join-Path $LocalDirectory prepare-machine.ps1) -InstallXdpDriver -Force" - Invoke-TestCommand -Session $Session -ScriptBlock { - param ($RemoteDirectory) - Invoke-Expression "$(Join-Path $RemoteDirectory prepare-machine.ps1) -InstallXdpDriver -Force" - } -ArgumentList $RemoteDirectory - } - - foreach ($Test in $Tests.Tests) { - if ($TestToRun -ne "" -and $Test.TestName -ne $TestToRun) { - continue - } - Invoke-Test -Test $Test -RemoteConfig $Tests.Remote - } - - if ($PGO) { - Write-Host "Saving msquic.pgd out for publishing." - Copy-Item "$LocalExePath\msquic.pgd" $OutputDir - } - - Check-Regressions -} finally { - if ($XDP) { - Invoke-Expression "$(Join-Path $LocalDirectory prepare-machine.ps1) -UninstallXdp" - Invoke-TestCommand -Session $Session -ScriptBlock { - param ($RemoteDirectory) - Invoke-Expression "$(Join-Path $RemoteDirectory prepare-machine.ps1) -UninstallXdp" - } -ArgumentList $RemoteDirectory - } - if ($null -ne $Session) { - Remove-PSSession -Session $Session - } - LocalTeardown($LocalDataCache) -} diff --git a/scripts/prepare-machine.ps1 b/scripts/prepare-machine.ps1 index 738cf476c8..318648076d 100644 --- a/scripts/prepare-machine.ps1 +++ b/scripts/prepare-machine.ps1 @@ -103,9 +103,10 @@ Set-StrictMode -Version 'Latest' $PSDefaultParameterValues['*:ErrorAction'] = 'Stop' $ProgressPreference = 'SilentlyContinue' -if ($IsLinux -and $UseXdp) { +$IsUbuntu2404 = $false +if ($IsLinux) { $IsUbuntu2404 = (Get-Content -Path /etc/os-release | Select-String -Pattern "24.04") -ne $null - if (!$IsUbuntu2404 -and !$ForceXdpInstall) { + if ($UseXdp -and !$IsUbuntu2404 -and !$ForceXdpInstall) { Write-Host "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" Write-Host "Linux XDP installs dependencies from Ubuntu 24.04 packages, which should affect your environment" Write-Host "You need to understand the impact of this on your environment before proceeding" @@ -541,8 +542,10 @@ if ($IsLinux) { # XDP dependencies if ($UseXdp) { sudo apt-get -y install --no-install-recommends libc6-dev-i386 # for building xdp programs - sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y - sudo apt-get update -y + if (!$IsUbuntu2404) { + sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y + sudo apt-get update -y + } sudo apt-get -y install libxdp-dev libbpf-dev sudo apt-get -y install libnl-3-dev libnl-genl-3-dev libnl-route-3-dev zlib1g-dev zlib1g pkg-config m4 clang libpcap-dev libelf-dev } @@ -555,8 +558,10 @@ if ($IsLinux) { sudo apt-get install -y liblttng-ust-dev sudo apt-get install -y gdb if ($UseXdp) { - sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y - sudo apt-get update -y + if (!$IsUbuntu2404) { + sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y + sudo apt-get update -y + } sudo apt-get install -y libxdp1 libbpf1 sudo apt-get install -y libnl-3-200 libnl-route-3-200 libnl-genl-3-200 sudo apt-get install -y iproute2 iptables diff --git a/scripts/run-gtest.ps1 b/scripts/run-gtest.ps1 index 4cc7740d1f..9fa2c9c4d7 100644 --- a/scripts/run-gtest.ps1 +++ b/scripts/run-gtest.ps1 @@ -381,6 +381,10 @@ function Start-TestCase([String]$Name, [int]$Trial = 1) { # Get a string of invalid chars for filenames $InvalidChars = [System.IO.Path]::GetInvalidFileNameChars() -join '' + if (!$IsWindows) { + # Add characters that Azure disallows in filenames, but aren't invalid on POSIX + $InvalidChars = $InvalidChars,'"', ":", "<", ">", "|", "*", "?", "`r", "`n" -join '' + } # Escape those chars for use in a regex and put them inside a regex set (the square brackets) $InvalidCharsToReplace = "[{0}]" -f [RegEx]::Escape($InvalidChars) $InstanceName = $Name -replace $InvalidCharsToReplace, "_" diff --git a/scripts/secnetperf-helpers.psm1 b/scripts/secnetperf-helpers.psm1 index b8782a806f..486d487cae 100644 --- a/scripts/secnetperf-helpers.psm1 +++ b/scripts/secnetperf-helpers.psm1 @@ -6,6 +6,13 @@ Set-StrictMode -Version "Latest" $PSDefaultParameterValues["*:ErrorAction"] = "Stop" + +$psVersion = $PSVersionTable.PSVersion +if ($psVersion.Major -lt 7) { + $isWindows = $true +} + + # Path to the WER registry key used for collecting dumps on Windows. $WerDumpRegPath = "HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\secnetperf.exe" @@ -131,11 +138,21 @@ function Install-XDP { $installerUri = (Get-Content (Join-Path $PSScriptRoot "xdp.json") | ConvertFrom-Json).installer $msiPath = Repo-Path "artifacts/xdp.msi" Write-Host "Downloading XDP installer" - Invoke-WebRequest -Uri $installerUri -OutFile $msiPath + whoami + Invoke-WebRequest -Uri $installerUri -OutFile $msiPath -UseBasicParsing Write-Host "Installing XDP driver locally" msiexec.exe /i $msiPath /quiet | Out-Null + $Size = Get-FileHash $msiPath + Write-Host "MSI file hash: $Size" Wait-DriverStarted "xdp" 10000 Write-Host "Installing XDP driver on peer" + + if ($Session -eq "NOT_SUPPORTED") { + NetperfSendCommand "Install_XDP;$installerUri" + NetperfWaitServerFinishExecution + return + } + $remoteMsiPath = Join-Path $RemoteDir "artifacts/xdp.msi" Copy-Item -ToSession $Session $msiPath -Destination $remoteMsiPath $WaitDriverStartedStr = "${function:Wait-DriverStarted}" @@ -169,6 +186,13 @@ function Install-Kernel { sc.exe create "msquicpriv" type= kernel binpath= $localSysPath start= demand | Out-Null net.exe start msquicpriv Write-Host "Installing msquicpriv on peer" + + if ($Session -eq "NOT_SUPPORTED") { + NetperfSendCommand "Install_Kernel" + NetperfWaitServerFinishExecution + return + } + Invoke-Command -Session $Session -ScriptBlock { if (!(Test-Path $Using:remoteSysPath)) { throw "msquicpriv.sys not found!" } sc.exe create "msquicpriv" type= kernel binpath= $Using:remoteSysPath start= demand | Out-Null @@ -209,7 +233,7 @@ function Cleanup-State { Invoke-Command -Session $Session -ScriptBlock { if ($null -ne (Get-Process | Where-Object { $_.Name -eq "secnetperf" })) { throw "secnetperf still running remotely!" } } - if ($IsWindows) { + if ($isWindows) { Uninstall-Kernel $Session | Out-Null Uninstall-XDP $Session $RemoteDir | Out-Null if ($null -ne (Get-Service xdp -ErrorAction Ignore)) { throw "xdp still running!" } @@ -283,6 +307,12 @@ function Start-RemoteServer { throw "Server failed to start!" } +# Passively starts the server on the remote machine by queuing up a new script to execute. +function Start-RemoteServerPassive { + param ($Command) + NetperfSendCommand $Command +} + # Sends a special UDP packet to tell the remote secnetperf to shutdown, and then # waits for the job to complete. Finally, it returns the console output of the # job. @@ -306,11 +336,29 @@ function Stop-RemoteServer { return $RemoteResult -join "`n" } +function Wait-StartRemoteServerPassive { + param ($FullPath, $RemoteName, $OutputDir, $UseSudo) + + for ($i = 0; $i -lt 30; $i++) { + Start-Sleep -Seconds 5 | Out-Null + Write-Host "Attempt $i to start the remote server, command: $FullPath -target:$RemoteName" + $Process = Start-LocalTest $FullPath "-target:$RemoteName" $OutputDir $UseSudo + $ConsoleOutput = Wait-LocalTest $Process $OutputDir $false 30000 $true + Write-Host "Wait-StartRemoteServerPassive: $ConsoleOutput" + $DidMatch = $ConsoleOutput -match "Completed" # Look for the special string to indicate success. + if ($DidMatch) { + return + } + } + + throw "Unable to start the remote server in time!" +} + # Creates a new local process to asynchronously run the test. function Start-LocalTest { param ($FullPath, $FullArgs, $OutputDir, $UseSudo) $pinfo = New-Object System.Diagnostics.ProcessStartInfo - if ($IsWindows) { + if ($isWindows) { $pinfo.FileName = $FullPath $pinfo.Arguments = $FullArgs } else { @@ -337,7 +385,7 @@ function Start-LocalTest { # Waits for a local test process to complete, and then returns the console output. function Wait-LocalTest { - param ($Process, $OutputDir, $testKernel, $TimeoutMs) + param ($Process, $OutputDir, $testKernel, $TimeoutMs, $Silent = $false) $StdOut = $Process.StandardOutput.ReadToEndAsync() $StdError = $Process.StandardError.ReadToEndAsync() # Wait for the process to exit. @@ -351,6 +399,10 @@ function Wait-LocalTest { $Out = $StdOut.Result.Trim() if ($Out.Length -ne 0) { Write-Host $Out } } catch {} + if ($Silent) { + Write-Host "Silently ignoring Client timeout!" + return "" + } throw "secnetperf: Client timed out!" } # Verify the process cleanly exitted. @@ -360,15 +412,27 @@ function Wait-LocalTest { $Out = $StdOut.Result.Trim() if ($Out.Length -ne 0) { Write-Host $Out } } catch {} + if ($Silent) { + Write-Host "Silently ignoring Client exit code: $($Process.ExitCode)" + return "" + } throw "secnetperf: Nonzero exit code: $($Process.ExitCode)" } # Wait for the output streams to flush. [System.Threading.Tasks.Task]::WaitAll(@($StdOut, $StdError)) $consoleTxt = $StdOut.Result.Trim() if ($consoleTxt.Length -eq 0) { + if ($Silent) { + Write-Host "Silently ignoring Client no console output!" + return "" + } throw "secnetperf: No console output (possibly crashed)!" } if ($consoleTxt.Contains("Error")) { + if ($Silent) { + Write-Host "Silently ignoring Client error: $($consoleTxt)" + return "" + } throw "secnetperf: $($consoleTxt.Substring(7))" # Skip over the "Error: " prefix } return $consoleTxt @@ -460,13 +524,17 @@ function Get-LatencyOutput { # Invokes secnetperf with the given arguments for both TCP and QUIC. function Invoke-Secnetperf { - param ($Session, $RemoteName, $RemoteDir, $UserName, $SecNetPerfPath, $LogProfile, $TestId, $ExeArgs, $io, $Filter) + param ($Session, $RemoteName, $RemoteDir, $UserName, $SecNetPerfPath, $LogProfile, $TestId, $ExeArgs, $io, $Filter, $Environment, $RunId, $SyncerSecret) $values = @(@(), @()) $latency = $null $extraOutput = $null $hasFailures = $false - $tcpSupported = ($io -ne "xdp" -and $io -ne "qtip" -and $io -ne "wsk") ? 1 : 0 + if ($io -ne "xdp" -and $io -ne "qtip" -and $io -ne "wsk") { + $tcpSupported = 1 + } else { + $tcpSupported = 0 + } $metric = "throughput" if ($exeArgs.Contains("plat:1")) { $metric = "latency" @@ -485,7 +553,7 @@ function Invoke-Secnetperf { $execMode = $ExeArgs.Substring(0, $ExeArgs.IndexOf(" ")) # First arg is the exec mode $clientPath = Repo-Path $SecNetPerfPath $serverArgs = "$execMode -io:$io" - $clientArgs = "-target:netperf-peer $ExeArgs -tcp:$tcp -trimout -watchdog:25000" + $clientArgs = "-target:$RemoteName $ExeArgs -tcp:$tcp -trimout -watchdog:25000" if ($io -eq "xdp" -or $io -eq "qtip") { $serverArgs += " -pollidle:10000" $clientArgs += " -pollidle:10000" @@ -510,29 +578,29 @@ function Invoke-Secnetperf { continue } - # These scenarios are currently broken! TODO - Figure out why and fix them. - if ($io -eq "wsk" -and $metric -eq "hps") { - Write-Host "> secnetperf $clientArgs BROKEN!" - continue - } - # Linux XDP requires sudo for now - $useSudo = (!$IsWindows -and $io -eq "xdp") + $useSudo = (!$isWindows -and $io -eq "xdp") - $artifactName = $tcp -eq 0 ? "$TestId-quic" : "$TestId-tcp" + if ($tcp -eq 0) { + $artifactName = "$TestId-quic" + } else { + $artifactName = "$TestId-tcp" + } New-Item -ItemType Directory "artifacts/logs/$artifactName" -ErrorAction Ignore | Out-Null $artifactDir = Repo-Path "artifacts/logs/$artifactName" $remoteArtifactDir = "$RemoteDir/artifacts/logs/$artifactName" New-Item -ItemType Directory $artifactDir -ErrorAction Ignore | Out-Null - Invoke-Command -Session $Session -ScriptBlock { - New-Item -ItemType Directory $Using:remoteArtifactDir -ErrorAction Ignore | Out-Null + if (!($Session -eq "NOT_SUPPORTED")) { + Invoke-Command -Session $Session -ScriptBlock { + New-Item -ItemType Directory $Using:remoteArtifactDir -ErrorAction Ignore | Out-Null + } } $clientOut = (Join-Path $artifactDir "client.console.log") $serverOut = (Join-Path $artifactDir "server.console.log") # Start logging on both sides, if configured. - if ($LogProfile -ne "" -and $LogProfile -ne "NULL") { + if ($LogProfile -ne "" -and $LogProfile -ne "NULL" -and !($Session -eq "NOT_SUPPORTED")) { Invoke-Command -Session $Session -ScriptBlock { try { & "$Using:RemoteDir/scripts/log.ps1" -Cancel } catch {} # Cancel any previous logging & "$Using:RemoteDir/scripts/log.ps1" -Start -Profile $Using:LogProfile -ProfileInScriptDirectory @@ -547,7 +615,17 @@ function Invoke-Secnetperf { # Start the server running. "> secnetperf $serverArgs" | Add-Content $serverOut - $job = Start-RemoteServer $Session "$RemoteDir/$SecNetPerfPath" $serverArgs $useSudo + + $StateDir = "C:/_state" + if (!$isWindows) { + $StateDir = "/etc/_state" + } + if ($Session -eq "NOT_SUPPORTED") { + Start-RemoteServerPassive "$RemoteDir/$SecNetPerfPath $serverArgs" + Wait-StartRemoteServerPassive "$clientPath" $RemoteName $artifactDir $useSudo + } else { + $job = Start-RemoteServer $Session "$RemoteDir/$SecNetPerfPath" $serverArgs $useSudo + } # Run the test multiple times, failing (for now) only if all tries fail. # TODO: Once all failures have been fixed, consider all errors fatal. @@ -586,10 +664,22 @@ function Invoke-Secnetperf { $testFailures = $true } finally { # Stop the server. - try { Stop-RemoteServer $job $RemoteName | Add-Content $serverOut } catch { } + if ($Session -eq "NOT_SUPPORTED") { + NetperfWaitServerFinishExecution -UnblockRoutine { + $Socket = New-Object System.Net.Sockets.UDPClient + $BytesToSend = @( + 0x57, 0xe6, 0x15, 0xff, 0x26, 0x4f, 0x0e, 0x57, + 0x88, 0xab, 0x07, 0x96, 0xb2, 0x58, 0xd1, 0x1c + ) + $Socket.Send($BytesToSend, $BytesToSend.Length, $RemoteName, 9999) | Out-Null + Write-Host "Sent special UDP packet to tell the server to die." + } + } else { + try { Stop-RemoteServer $job $RemoteName | Add-Content $serverOut } catch { } + } # Stop any logging and copy the logs to the artifacts folder. - if ($LogProfile -ne "" -and $LogProfile -ne "NULL") { + if ($LogProfile -ne "" -and $LogProfile -ne "NULL" -and $Session -ne "NOT_SUPPORTED") { try { .\scripts\log.ps1 -Stop -OutputPath "$artifactDir/client" -RawLogOnly } catch { Write-Host "Failed to stop logging on client!" } Invoke-Command -Session $Session -ScriptBlock { @@ -601,11 +691,12 @@ function Invoke-Secnetperf { } # Grab any crash dumps that were generated. - if (Collect-LocalDumps $artifactDir) { } - if (Collect-RemoteDumps $Session $artifactDir) { - Write-GHError "Dump file(s) generated by server" + if ($Session -ne "NOT_SUPPORTED") { + if (Collect-LocalDumps $artifactDir) { } + if (Collect-RemoteDumps $Session $artifactDir) { + Write-GHError "Dump file(s) generated by server" + } } - Write-Host "::endgroup::" if ($testFailures) { $hasFailures = $true diff --git a/scripts/secnetperf.ps1 b/scripts/secnetperf.ps1 index 592e96041c..f5c0fb1dc1 100644 --- a/scripts/secnetperf.ps1 +++ b/scripts/secnetperf.ps1 @@ -77,6 +77,19 @@ param ( Set-StrictMode -Version "Latest" $PSDefaultParameterValues["*:ErrorAction"] = "Stop" + +$RemotePowershellSupported = $env:netperf_remote_powershell_supported +$RunId = $env:netperf_run_id +$SyncerSecret = $env:netperf_syncer_secret + +$psVersion = $PSVersionTable.PSVersion +if ($psVersion.Major -lt 7) { + $IsWindows = $true +} + +Write-Host "Running tests with the following parameters:" +Write-Host "$RemotePowershellSupported, $RunId" + # Set up some important paths. $RemoteDir = "C:/_work/quic" if (!$isWindows) { @@ -86,6 +99,7 @@ if (!$isWindows) { $RemoteDir = "/home/$UserName/_work/quic" } } + $SecNetPerfDir = "artifacts/bin/$plat/$($arch)_Release_$tls" $SecNetPerfPath = "$SecNetPerfDir/secnetperf" if ($io -eq "") { @@ -100,35 +114,59 @@ if ($isWindows -and $NoLogs) { # Always collect basic, low volume logs on Windows. $LogProfile = "Basic.Light" } + $useXDP = ($io -eq "xdp" -or $io -eq "qtip") +if ($RemotePowershellSupported -eq $true) { -# Set up the connection to the peer over remote powershell. -Write-Host "Connecting to $RemoteName" -$Attempts = 0 -while ($Attempts -lt 5) { - try { - if ($isWindows) { - $username = (Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon').DefaultUserName - $password = (Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon').DefaultPassword | ConvertTo-SecureString -AsPlainText -Force - $cred = New-Object System.Management.Automation.PSCredential ($username, $password) - $Session = New-PSSession -ComputerName $RemoteName -Credential $cred -ConfigurationName PowerShell.7 - } else { - $Session = New-PSSession -HostName $RemoteName -UserName $UserName -SSHTransport + # Set up the connection to the peer over remote powershell. + Write-Host "Connecting to $RemoteName" + $Attempts = 0 + while ($Attempts -lt 5) { + if ($environment -eq "azure") { + if ($isWindows) { + Write-Host "Attempting to connect..." + $Session = New-PSSession -ComputerName $RemoteName -ConfigurationName PowerShell.7 + break + } else { + # On Azure in 1ES Linux environments, remote powershell is not supported (yet). + $Session = "NOT_SUPPORTED" + Write-Host "Remote PowerShell is not supported in Azure 1ES Linux environments" + break + } + } + try { + if ($isWindows) { + $username = (Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon').DefaultUserName + $password = (Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon').DefaultPassword | ConvertTo-SecureString -AsPlainText -Force + $cred = New-Object System.Management.Automation.PSCredential ($username, $password) + $Session = New-PSSession -ComputerName $RemoteName -Credential $cred -ConfigurationName PowerShell.7 + } else { + $Session = New-PSSession -HostName $RemoteName -UserName $UserName -SSHTransport + } + break + } catch { + Write-Host "Error $_" + $Attempts += 1 + Start-Sleep -Seconds 10 } - break - } catch { - $Attempts += 1 - Start-Sleep -Seconds 10 } -} -if ($null -eq $Session) { - Write-GHError "Failed to create remote session" - exit 1 + if ($null -eq $Session) { + Write-GHError "Failed to create remote session" + exit 1 + } + +} else { + $Session = "NOT_SUPPORTED" + Write-Host "Remote PowerShell is not supported in this environment" } -# Make sure nothing is running from a previous run. -Cleanup-State $Session $RemoteDir +if ($Session -ne "NOT_SUPPORTED") { + # Make sure nothing is running from a previous run. This only applies to non-azure / 1ES environments. + Write-Host "NOT RUNNING ON AZURE AND POWERSHELL SUPPORTED" + Write-Host "Session: $Session, $(!($Session -eq "NOT_SUPPORTED"))" + Cleanup-State $Session $RemoteDir +} # Create intermediary files. New-Item -ItemType File -Name "latency.txt" @@ -145,26 +183,29 @@ if ($io -eq "wsk") { Remove-Item -Force -Recurse $KernelDir | Out-Null } -# Copy the artifacts to the peer. -Write-Host "Copying files to peer" -Invoke-Command -Session $Session -ScriptBlock { - if (Test-Path $Using:RemoteDir) { - Remove-Item -Force -Recurse $Using:RemoteDir | Out-Null + +if (!($Session -eq "NOT_SUPPORTED")) { + # Copy the artifacts to the peer. + Write-Host "Copying files to peer" + Invoke-Command -Session $Session -ScriptBlock { + if (Test-Path $Using:RemoteDir) { + Remove-Item -Force -Recurse $Using:RemoteDir | Out-Null + } + New-Item -ItemType Directory -Path $Using:RemoteDir -Force | Out-Null + } + Copy-Item -ToSession $Session ./artifacts -Destination "$RemoteDir/artifacts" -Recurse + Copy-Item -ToSession $Session ./scripts -Destination "$RemoteDir/scripts" -Recurse + Copy-Item -ToSession $Session ./src/manifest/MsQuic.wprp -Destination "$RemoteDir/scripts" + + # Create the logs directories on both machines. + New-Item -ItemType Directory -Path ./artifacts/logs | Out-Null + Invoke-Command -Session $Session -ScriptBlock { + New-Item -ItemType Directory -Path $Using:RemoteDir/artifacts/logs | Out-Null } - New-Item -ItemType Directory -Path $Using:RemoteDir -Force | Out-Null -} -Copy-Item -ToSession $Session ./artifacts -Destination "$RemoteDir/artifacts" -Recurse -Copy-Item -ToSession $Session ./scripts -Destination "$RemoteDir/scripts" -Recurse -Copy-Item -ToSession $Session ./src/manifest/MsQuic.wprp -Destination "$RemoteDir/scripts" - -# Create the logs directories on both machines. -New-Item -ItemType Directory -Path ./artifacts/logs | Out-Null -Invoke-Command -Session $Session -ScriptBlock { - New-Item -ItemType Directory -Path $Using:RemoteDir/artifacts/logs | Out-Null } # Collect some info about machine state. -if (!$NoLogs -and $isWindows) { +if (!$NoLogs -and $isWindows -and !($Session -eq "NOT_SUPPORTED")) { $Arguments = "-SkipNetsh" if (Get-Help Get-NetView -Parameter SkipWindowsRegistry -ErrorAction Ignore) { $Arguments += " -SkipWindowsRegistry" @@ -224,7 +265,7 @@ $json["run_args"] = $allTests try { # Prepare the machines for the testing. -if ($isWindows) { +if ($isWindows -and !($environment -eq "azure")) { Write-Host "Preparing local machine for testing" ./scripts/prepare-machine.ps1 -ForTest -InstallSigningCertificates @@ -238,8 +279,10 @@ if ($isWindows) { if (!$HasTestSigning) { Write-Host "Test Signing Not Enabled!" } } -# Configure the dump collection. -Configure-DumpCollection $Session +if (!($Session -eq "NOT_SUPPORTED")) { + # Configure the dump collection. + Configure-DumpCollection $Session +} # Install any dependent drivers. if ($useXDP -and $isWindows) { Install-XDP $Session $RemoteDir } @@ -252,11 +295,13 @@ if (!$isWindows) { if ($io -eq "xdp") { $GRO = "off" } - Invoke-Command -Session $Session -ScriptBlock { - $env:LD_LIBRARY_PATH = "${env:LD_LIBRARY_PATH}:$Using:RemoteDir/$Using:SecNetPerfDir" - chmod +x "$Using:RemoteDir/$Using:SecNetPerfPath" - if ($Using:os -eq "ubuntu-22.04") { - sudo sh -c "ethtool -K eth0 generic-receive-offload $Using:GRO" + if (!($Session -eq "NOT_SUPPORTED")) { + Invoke-Command -Session $Session -ScriptBlock { + $env:LD_LIBRARY_PATH = "${env:LD_LIBRARY_PATH}:$Using:RemoteDir/$Using:SecNetPerfDir" + chmod +x "$Using:RemoteDir/$Using:SecNetPerfPath" + if ($Using:os -eq "ubuntu-22.04") { + sudo sh -c "ethtool -K eth0 generic-receive-offload $Using:GRO" + } } } $fullPath = Repo-Path $SecNetPerfDir @@ -292,13 +337,17 @@ $regressionJson = Get-Content -Raw -Path "watermark_regression.json" | ConvertFr Write-Host "Setup complete! Running all tests" foreach ($testId in $allTests.Keys) { $ExeArgs = $allTests[$testId] + " -io:$io" - $Output = Invoke-Secnetperf $Session $RemoteName $RemoteDir $UserName $SecNetPerfPath $LogProfile $testId $ExeArgs $io $filter + $Output = Invoke-Secnetperf $Session $RemoteName $RemoteDir $UserName $SecNetPerfPath $LogProfile $testId $ExeArgs $io $filter $environment $RunId $SyncerSecret $Test = $Output[-1] if ($Test.HasFailures) { $hasFailures = $true } for ($tcp = 0; $tcp -lt $Test.Values.Length; $tcp++) { if ($Test.Values[$tcp].Length -eq 0) { continue } - $transport = $tcp -eq 1 ? "tcp" : "quic" + if ($tcp -eq 1) { + $transport = "tcp" + } else { + $transport = "quic" + } $json["$testId-$transport"] = $Test.Values[$tcp] if ($Test.Metric -eq "latency") { @@ -323,7 +372,12 @@ Write-Host "Tests complete!" } finally { # Perform any necessary cleanup. - try { Cleanup-State $Session $RemoteDir } catch { } + try { + if ($Session -eq "NOT_SUPPORTED") { + throw "Cleanup not needed" + } + Cleanup-State $Session $RemoteDir + } catch { } try { if (Get-ChildItem -Path ./artifacts/logs -File -Recurse) { diff --git a/scripts/write-versions.ps1 b/scripts/write-versions.ps1 index b1e9710134..4329a0b352 100644 --- a/scripts/write-versions.ps1 +++ b/scripts/write-versions.ps1 @@ -26,7 +26,7 @@ $ArtifactsDir = $BuildConfig.ArtifactsDir $SourceVersion = $env:BUILD_SOURCEVERSION; $SourceBranch = $env:BUILD_SOURCEBRANCH; $BuildId = $env:BUILD_BUILDID; -$VersionNumber = "2.4.0"; +$VersionNumber = "2.5.0"; class BuildData { [string]$SourceVersion; diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt index 23768235e8..a88c4ad3dc 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt @@ -250,6 +250,9 @@ elseif (CX_PLATFORM STREQUAL "darwin") PROPERTIES LINK_FLAGS "-exported_symbols_list \"${CMAKE_CURRENT_SOURCE_DIR}/darwin/exports.txt\"") endif() +include(GNUInstallDirs) +set(include_dest ${CMAKE_INSTALL_INCLUDEDIR}) + if(BUILD_SHARED_LIBS) target_include_directories(msquic PUBLIC $ diff --git a/src/core/connection.c b/src/core/connection.c index eec4822b7a..7630a5bc79 100644 --- a/src/core/connection.c +++ b/src/core/connection.c @@ -735,7 +735,7 @@ QuicConnQueuePriorityOper( // The connection needs to be queued on the worker because this was the // first operation in our OperQ. // - QuicWorkerQueueConnection(Connection->Worker, Connection); // TODO - Support priority connections on worker? + QuicWorkerQueuePriorityConnection(Connection->Worker, Connection); } } @@ -751,7 +751,7 @@ QuicConnQueueHighestPriorityOper( // The connection needs to be queued on the worker because this was the // first operation in our OperQ. // - QuicWorkerQueueConnection(Connection->Worker, Connection); + QuicWorkerQueuePriorityConnection(Connection->Worker, Connection); } } @@ -7559,7 +7559,8 @@ QuicConnProcessExpiredTimer( _IRQL_requires_max_(PASSIVE_LEVEL) BOOLEAN QuicConnDrainOperations( - _In_ QUIC_CONNECTION* Connection + _In_ QUIC_CONNECTION* Connection, + _Inout_ BOOLEAN* StillHasPriorityWork ) { QUIC_OPERATION* Oper; @@ -7719,5 +7720,10 @@ QuicConnDrainOperations( QuicConnValidate(Connection); - return HasMoreWorkToDo; + if (HasMoreWorkToDo) { + *StillHasPriorityWork = QuicOperationHasPriority(&Connection->OperQ); + return TRUE; + } + + return FALSE; } diff --git a/src/core/connection.h b/src/core/connection.h index 8441da65ca..bfff21972a 100644 --- a/src/core/connection.h +++ b/src/core/connection.h @@ -426,6 +426,7 @@ typedef struct QUIC_CONNECTION { // BOOLEAN WorkerProcessing : 1; BOOLEAN HasQueuedWork : 1; + BOOLEAN HasPriorityWork : 1; // // Set of current reasons sending more packets is currently blocked. @@ -1143,7 +1144,8 @@ QuicConnIndicateEvent( _IRQL_requires_max_(PASSIVE_LEVEL) BOOLEAN QuicConnDrainOperations( - _In_ QUIC_CONNECTION* Connection + _In_ QUIC_CONNECTION* Connection, + _Inout_ BOOLEAN* StillHasPriorityWork ); // diff --git a/src/core/inline.c b/src/core/inline.c index f73a92ca53..a128550ea7 100644 --- a/src/core/inline.c +++ b/src/core/inline.c @@ -816,3 +816,9 @@ QuicMtuDiscoveryCheckSearchCompleteTimeout( _In_ QUIC_CONNECTION* Connection, _In_ uint64_t TimeNow ); + +_IRQL_requires_max_(DISPATCH_LEVEL) +BOOLEAN +QuicOperationHasPriority( + _In_ QUIC_OPERATION_QUEUE* OperQ + ); diff --git a/src/core/operation.h b/src/core/operation.h index 3242320792..3146588a07 100644 --- a/src/core/operation.h +++ b/src/core/operation.h @@ -338,6 +338,22 @@ QuicOperationFree( _In_ QUIC_OPERATION* Oper ); +// +// Returns TRUE if the operation queue has priority operations queued. +// +_IRQL_requires_max_(DISPATCH_LEVEL) +inline +BOOLEAN +QuicOperationHasPriority( + _In_ QUIC_OPERATION_QUEUE* OperQ + ) +{ + CxPlatDispatchLockAcquire(&OperQ->Lock); + BOOLEAN HasPriorityWork = (&OperQ->List.Flink != OperQ->PriorityTail); + CxPlatDispatchLockRelease(&OperQ->Lock); + return HasPriorityWork; +} + // // Enqueues an operation. Returns TRUE if the queue was previously empty and not // already being processed. @@ -351,7 +367,8 @@ QuicOperationEnqueue( // // Enqueues an operation into the priority part of the queue. Returns TRUE if -// the queue was previously empty and not already being processed. +// the priority queue was previously empty and not already being processed. Note +// that the regular queue might not have been empty. // _IRQL_requires_max_(DISPATCH_LEVEL) BOOLEAN diff --git a/src/core/quicdef.h b/src/core/quicdef.h index feb14d2cc7..219ef33db9 100644 --- a/src/core/quicdef.h +++ b/src/core/quicdef.h @@ -348,7 +348,7 @@ CXPLAT_STATIC_ASSERT( // The minimum number of bytes of send allowance we must have before we will // send another packet. // -#define QUIC_MIN_SEND_ALLOWANCE 75 +#define QUIC_MIN_SEND_ALLOWANCE 76 // Magic number to indicate a threshold of 'enough' allowance to send another packet. // // The minimum buffer space that we require before we will pack another @@ -527,6 +527,11 @@ CXPLAT_STATIC_ASSERT( // #define QUIC_DEFAULT_NET_STATS_EVENT_ENABLED FALSE +// +// The default settings for using multiple parallel receives for streams. +// +#define QUIC_DEFAULT_STREAM_MULTI_RECEIVE_ENABLED FALSE + // // The number of rounds in Cubic Slow Start to sample RTT. // @@ -633,6 +638,7 @@ CXPLAT_STATIC_ASSERT( #define QUIC_SETTING_RELIABLE_RESET_ENABLED "ReliableResetEnabled" #define QUIC_SETTING_ONE_WAY_DELAY_ENABLED "OneWayDelayEnabled" #define QUIC_SETTING_NET_STATS_EVENT_ENABLED "NetStatsEventEnabled" +#define QUIC_SETTING_STREAM_MULTI_RECEIVE_ENABLED "StreamMultiReceiveEnabled" #define QUIC_SETTING_INITIAL_WINDOW_PACKETS "InitialWindowPackets" #define QUIC_SETTING_SEND_IDLE_TIMEOUT_MS "SendIdleTimeoutMs" diff --git a/src/core/recv_buffer.c b/src/core/recv_buffer.c index 4ed8e12c10..87ac43b33c 100644 --- a/src/core/recv_buffer.c +++ b/src/core/recv_buffer.c @@ -90,6 +90,7 @@ QuicRecvBufferInitialize( RecvBuffer->ReadStart = 0; RecvBuffer->ReadPendingLength = 0; RecvBuffer->ReadLength = 0; + RecvBuffer->Capacity = AllocBufferLength; RecvBuffer->VirtualBufferLength = VirtualBufferLength; RecvBuffer->RecvMode = RecvMode; Status = QUIC_STATUS_SUCCESS; @@ -243,6 +244,7 @@ QuicRecvBufferResize( Span - LengthTillWrap); } RecvBuffer->ReadStart = 0; + RecvBuffer->Capacity = TargetBufferLength; } else { // @@ -419,51 +421,91 @@ QuicRecvBufferCopyIntoChunks( RecvBuffer->Chunks.Flink, // First chunk QUIC_RECV_CHUNK, Link); + uint32_t ChunkLength; + BOOLEAN IsFirstChunk = TRUE; + uint64_t RelativeOffset = WriteOffset - RecvBuffer->BaseOffset; uint32_t ChunkOffset = RecvBuffer->ReadStart; - uint64_t BaseOffset = RecvBuffer->BaseOffset; if (Chunk->Link.Flink == &RecvBuffer->Chunks) { CXPLAT_DBG_ASSERT(WriteLength <= Chunk->AllocLength); // Should always fit if we only have one ChunkLength = Chunk->AllocLength; RecvBuffer->ReadLength = (uint32_t)(QuicRangeGet(&RecvBuffer->WrittenRanges, 0)->Count - RecvBuffer->BaseOffset); } else { - ChunkLength = RecvBuffer->ReadLength; - while (BaseOffset + ChunkLength <= WriteOffset) { - BaseOffset += ChunkLength; - Chunk = - CXPLAT_CONTAINING_RECORD( - Chunk->Link.Flink, - QUIC_RECV_CHUNK, - Link); - ChunkOffset = 0; - ChunkLength = Chunk->AllocLength; + // + // In multiple mode, the first chunk may not start at the beginning. + // + ChunkLength = RecvBuffer->Capacity; + + if (RelativeOffset < RecvBuffer->Capacity) { + // + // The write starts from the first chunk. The write spans to the next chunk. + // + RecvBuffer->ReadLength = + (uint32_t)(QuicRangeGet(&RecvBuffer->WrittenRanges, 0)->Count - RecvBuffer->BaseOffset); + if (RecvBuffer->Capacity < RecvBuffer->ReadLength) { + RecvBuffer->ReadLength = RecvBuffer->Capacity; + } + } else { + // + // When the RelativeOffset is larger than the Capacity, the write starts from later chunk. + // Shrink RelativeOffset to represent the offset from beginning of the other chunk. + // + while (ChunkLength <= RelativeOffset) { + RelativeOffset -= ChunkLength; + IsFirstChunk = FALSE; + Chunk = + CXPLAT_CONTAINING_RECORD( + Chunk->Link.Flink, + QUIC_RECV_CHUNK, + Link); + ChunkLength = Chunk->AllocLength; + } } } + BOOLEAN IsFirstLoop = TRUE; do { - uint64_t RelativeOffset = WriteOffset - BaseOffset; uint32_t ChunkWriteOffset = (ChunkOffset + RelativeOffset) % Chunk->AllocLength; - uint32_t ChunkWriteLength = WriteLength; - if (ChunkWriteLength > ChunkLength) { - ChunkWriteLength = ChunkLength; + if (!IsFirstChunk) { + // This RelativeOffset is already shrunk to represent the offset from beginning of the current chunk. + ChunkWriteOffset = (uint32_t)RelativeOffset; + } + if (!IsFirstLoop) { + // We are continue writing from previous chunk. So, start from the beginning of the currnet chunk. + ChunkWriteOffset = 0; } - if (ChunkWriteOffset + WriteLength > Chunk->AllocLength) { - uint32_t Part1Len = ChunkLength - ChunkWriteOffset; - CxPlatCopyMemory(Chunk->Buffer + ChunkWriteOffset, WriteBuffer, Part1Len); - CxPlatCopyMemory(Chunk->Buffer, WriteBuffer + Part1Len, WriteLength - Part1Len); + uint32_t ChunkWriteLength = WriteLength; + if (IsFirstChunk) { + if (RecvBuffer->Capacity < RelativeOffset + ChunkWriteLength) { + // + // Trying to write beyond the capacity of the first chunk. + // Limit the write length to the capacity of the first chunk. + // + ChunkWriteLength = RecvBuffer->Capacity - (uint32_t)RelativeOffset; + } + if (Chunk->AllocLength < ChunkWriteOffset + ChunkWriteLength) { + // Circular buffer wrap around case. + CxPlatCopyMemory(Chunk->Buffer + ChunkWriteOffset, WriteBuffer, Chunk->AllocLength - ChunkWriteOffset); + CxPlatCopyMemory(Chunk->Buffer, WriteBuffer + Chunk->AllocLength - ChunkWriteOffset, ChunkWriteLength - (Chunk->AllocLength - ChunkWriteOffset)); + } else { + CxPlatCopyMemory(Chunk->Buffer + ChunkWriteOffset, WriteBuffer, ChunkWriteLength); + } } else { - CxPlatCopyMemory(Chunk->Buffer + ChunkWriteOffset, WriteBuffer, WriteLength); + if (ChunkWriteOffset + ChunkWriteLength >= ChunkLength) { + ChunkWriteLength = ChunkLength - ChunkWriteOffset; + } + CxPlatCopyMemory(Chunk->Buffer + ChunkWriteOffset, WriteBuffer, ChunkWriteLength); } if (WriteLength == ChunkWriteLength) { + // Run out of data to write. Exit the loop. break; } WriteOffset += ChunkWriteLength; WriteLength -= (uint16_t)ChunkWriteLength; WriteBuffer += ChunkWriteLength; - BaseOffset += ChunkLength; Chunk = CXPLAT_CONTAINING_RECORD( Chunk->Link.Flink, @@ -471,6 +513,8 @@ QuicRecvBufferCopyIntoChunks( Link); ChunkOffset = 0; ChunkLength = Chunk->AllocLength; + IsFirstChunk = FALSE; + IsFirstLoop = FALSE; } while (TRUE); } @@ -542,7 +586,7 @@ QuicRecvBufferWrite( RecvBuffer->Chunks.Blink, QUIC_RECV_CHUNK, Link)->AllocLength << 1; - while (AbsoluteLength > RecvBuffer->BaseOffset + NewBufferLength) { + while (AbsoluteLength > RecvBuffer->BaseOffset + NewBufferLength + RecvBuffer->ReadPendingLength) { NewBufferLength <<= 1; } if (!QuicRecvBufferResize(RecvBuffer, NewBufferLength)) { @@ -670,87 +714,92 @@ QuicRecvBufferRead( } else { CXPLAT_DBG_ASSERT(RecvBuffer->ReadPendingLength < ContiguousLength); // Shouldn't call read if there is nothing new to read - uint64_t WrittenLength = ContiguousLength - RecvBuffer->ReadPendingLength; + uint64_t UnreadLength = ContiguousLength - RecvBuffer->ReadPendingLength; + CXPLAT_DBG_ASSERT(UnreadLength > 0); // // Walk the chunks to find the data after ReadPendingLength, up to - // WrittenLength, to return. + // UnreadLength, to return. // - uint64_t ReadOffset = RecvBuffer->ReadPendingLength; + uint64_t ChunkReadOffset = RecvBuffer->ReadPendingLength; QUIC_RECV_CHUNK* Chunk = CXPLAT_CONTAINING_RECORD( RecvBuffer->Chunks.Flink, QUIC_RECV_CHUNK, Link); BOOLEAN IsFirstChunk = TRUE; - uint32_t ChunkLength = RecvBuffer->ReadLength; - while ((uint64_t)ChunkLength <= ReadOffset) { - CXPLAT_DBG_ASSERT(ChunkLength); + uint32_t ChunkReadLength = RecvBuffer->ReadLength; + while ((uint64_t)ChunkReadLength <= ChunkReadOffset) { + CXPLAT_DBG_ASSERT(ChunkReadLength); CXPLAT_DBG_ASSERT(Chunk->ExternalReference); CXPLAT_DBG_ASSERT(Chunk->Link.Flink != &RecvBuffer->Chunks); - ReadOffset -= ChunkLength; + ChunkReadOffset -= ChunkReadLength; IsFirstChunk = FALSE; Chunk = CXPLAT_CONTAINING_RECORD( Chunk->Link.Flink, QUIC_RECV_CHUNK, Link); - ChunkLength = Chunk->AllocLength; + ChunkReadLength = Chunk->AllocLength; } CXPLAT_DBG_ASSERT(*BufferCount >= 3); - CXPLAT_DBG_ASSERT(ReadOffset <= UINT32_MAX); + CXPLAT_DBG_ASSERT(ChunkReadOffset <= UINT32_MAX); + ChunkReadLength -= (uint32_t)ChunkReadOffset; if (IsFirstChunk) { // // Only the first chunk may be used in a circular buffer fashion and // therefore use the RecvBuffer->ReadStart offset. // - ChunkLength = RecvBuffer->ReadLength - (uint32_t)ReadOffset; - ReadOffset = (RecvBuffer->ReadStart + ReadOffset) % Chunk->AllocLength; - CXPLAT_DBG_ASSERT(ChunkLength <= WrittenLength); - } else { + ChunkReadOffset = (RecvBuffer->ReadStart + ChunkReadOffset) % Chunk->AllocLength; + CXPLAT_DBG_ASSERT(ChunkReadLength <= UnreadLength); + } else if (ChunkReadLength > UnreadLength) { // // Subsequent chunks do not use ReadStart or ReadLength, so we start // with a chunk length up to the entire length of the chunk. // - ChunkLength = Chunk->AllocLength - (uint32_t)ReadOffset; - if (ChunkLength > WrittenLength) { - ChunkLength = (uint32_t)WrittenLength; - } + ChunkReadLength = (uint32_t)UnreadLength; } - CXPLAT_DBG_ASSERT(ChunkLength <= Chunk->AllocLength); - if (ReadOffset + ChunkLength > Chunk->AllocLength) { + CXPLAT_DBG_ASSERT(ChunkReadLength <= Chunk->AllocLength); + if (ChunkReadOffset + ChunkReadLength > Chunk->AllocLength) { *BufferCount = 2; // Circular buffer wrap around case. - Buffers[0].Length = (uint32_t)(Chunk->AllocLength - ReadOffset); - Buffers[0].Buffer = Chunk->Buffer + ReadOffset; - Buffers[1].Length = ChunkLength - Buffers[0].Length; + Buffers[0].Length = (uint32_t)(Chunk->AllocLength - ChunkReadOffset); + Buffers[0].Buffer = Chunk->Buffer + ChunkReadOffset; + Buffers[1].Length = ChunkReadLength - Buffers[0].Length; Buffers[1].Buffer = Chunk->Buffer; - } else { *BufferCount = 1; - Buffers[0].Length = ChunkLength; - Buffers[0].Buffer = Chunk->Buffer + ReadOffset; + Buffers[0].Length = ChunkReadLength; + Buffers[0].Buffer = Chunk->Buffer + ChunkReadOffset; } Chunk->ExternalReference = TRUE; - if (WrittenLength > ChunkLength) { + if (UnreadLength > ChunkReadLength) { CXPLAT_DBG_ASSERT(Chunk->Link.Flink != &RecvBuffer->Chunks); // There must be another chunk to read from - WrittenLength -= ChunkLength; + ChunkReadLength = (uint32_t)UnreadLength - ChunkReadLength; Chunk = CXPLAT_CONTAINING_RECORD( Chunk->Link.Flink, QUIC_RECV_CHUNK, Link); - CXPLAT_DBG_ASSERT(WrittenLength <= Chunk->AllocLength); // Shouldn't be able to read more than the chunk size - Buffers[*BufferCount].Length = (uint32_t)WrittenLength; + CXPLAT_DBG_ASSERT(ChunkReadLength <= Chunk->AllocLength); // Shouldn't be able to read more than the chunk size + Buffers[*BufferCount].Length = ChunkReadLength; Buffers[*BufferCount].Buffer = Chunk->Buffer; *BufferCount = *BufferCount + 1; Chunk->ExternalReference = TRUE; } *BufferOffset = RecvBuffer->BaseOffset + RecvBuffer->ReadPendingLength; - RecvBuffer->ReadPendingLength += WrittenLength; + RecvBuffer->ReadPendingLength += UnreadLength; + +#if DEBUG + uint64_t TotalBuffersLength = 0; + for (uint32_t i = 0; i < *BufferCount; ++i) { + TotalBuffersLength += Buffers[i].Length; + } + CXPLAT_DBG_ASSERT(TotalBuffersLength <= RecvBuffer->ReadPendingLength); +#endif } } @@ -815,8 +864,15 @@ QuicRecvBufferPartialDrain( // RecvBuffer->ReadStart = (uint32_t)((RecvBuffer->ReadStart + DrainLength) % Chunk->AllocLength); + if (Chunk->Link.Flink != &RecvBuffer->Chunks) { + // + // If there is another chunk, then the capacity of first chunk is shrunk. + // + RecvBuffer->Capacity -= (uint32_t)DrainLength; + } } + CXPLAT_DBG_ASSERT(RecvBuffer->ReadLength >= (uint32_t)DrainLength); RecvBuffer->ReadLength -= (uint32_t)DrainLength; } @@ -826,6 +882,13 @@ QuicRecvBufferPartialDrain( // referencing any chunks anymore. // Chunk->ExternalReference = FALSE; + } else { + // + // If all ReadPending data is drained, then we can release the external reference + // + Chunk->ExternalReference = RecvBuffer->ReadPendingLength != DrainLength; + CXPLAT_DBG_ASSERT(DrainLength <= RecvBuffer->ReadPendingLength); + RecvBuffer->ReadPendingLength -= DrainLength; } } @@ -853,6 +916,9 @@ QuicRecvBufferFullDrain( DrainLength -= RecvBuffer->ReadLength; RecvBuffer->ReadStart = 0; RecvBuffer->BaseOffset += RecvBuffer->ReadLength; + if (RecvBuffer->RecvMode == QUIC_RECV_BUF_MODE_MULTIPLE) { + RecvBuffer->ReadPendingLength -= RecvBuffer->ReadLength; + } RecvBuffer->ReadLength = (uint32_t)(QuicRangeGet(&RecvBuffer->WrittenRanges, 0)->Count - RecvBuffer->BaseOffset); @@ -879,12 +945,14 @@ QuicRecvBufferFullDrain( // The rest of the contiguous data might not fit in just the next chunk // so we need to update the ReadLength of the first chunk to be no more // than the next chunk's allocation length. + // Capacity is also updated to reflect the new first chunk's allocation length. // Chunk = CXPLAT_CONTAINING_RECORD( RecvBuffer->Chunks.Flink, QUIC_RECV_CHUNK, Link); + RecvBuffer->Capacity = Chunk->AllocLength; if (Chunk->AllocLength < RecvBuffer->ReadLength) { RecvBuffer->ReadLength = Chunk->AllocLength; } @@ -903,19 +971,20 @@ QuicRecvBufferDrain( CXPLAT_DBG_ASSERT(DrainLength <= RecvBuffer->ReadPendingLength); if (RecvBuffer->RecvMode != QUIC_RECV_BUF_MODE_MULTIPLE) { RecvBuffer->ReadPendingLength = 0; - } else { - RecvBuffer->ReadPendingLength -= DrainLength; } - + QUIC_SUBRANGE* FirstRange = QuicRangeGet(&RecvBuffer->WrittenRanges, 0); + CXPLAT_DBG_ASSERT(FirstRange); + CXPLAT_DBG_ASSERT(FirstRange->Low == 0); do { BOOLEAN PartialDrain = (uint64_t)RecvBuffer->ReadLength > DrainLength; if (PartialDrain || + (QuicRangeSize(&RecvBuffer->WrittenRanges) > 1 && + RecvBuffer->BaseOffset + RecvBuffer->ReadLength == FirstRange->Count)) { // - // If there are 2 or more written ranges, it means that there may be + // If there are 2 or more written ranges in the first chunk, it means that there may be // more data later in the chunk that couldn't be read because there is a gap. // Reuse the partial drain logic to preserve data after the gap. // - QuicRangeSize(&RecvBuffer->WrittenRanges) > 1) { QuicRecvBufferPartialDrain(RecvBuffer, DrainLength); return !PartialDrain; } diff --git a/src/core/recv_buffer.h b/src/core/recv_buffer.h index e52273e1b6..932afc8cc1 100644 --- a/src/core/recv_buffer.h +++ b/src/core/recv_buffer.h @@ -68,6 +68,12 @@ typedef struct QUIC_RECV_BUFFER { // uint32_t VirtualBufferLength; + // + // Basically same as Chunk->AllocLength of first chunk, but start shrinking + // by drain operation after next chunk is allocated. + // + uint32_t Capacity; + // // Controls the behavior of the buffer, which changes the logic for // writing, reading and draining. diff --git a/src/core/settings.c b/src/core/settings.c index 4abdcfe242..a3942f691d 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -165,6 +165,9 @@ QuicSettingsSetDefault( if (!Settings->IsSet.NetStatsEventEnabled) { Settings->NetStatsEventEnabled = QUIC_DEFAULT_NET_STATS_EVENT_ENABLED; } + if (!Settings->IsSet.StreamMultiReceiveEnabled) { + Settings->StreamMultiReceiveEnabled = QUIC_DEFAULT_STREAM_MULTI_RECEIVE_ENABLED; + } } _IRQL_requires_max_(PASSIVE_LEVEL) @@ -330,6 +333,9 @@ QuicSettingsCopy( if (!Destination->IsSet.NetStatsEventEnabled) { Destination->NetStatsEventEnabled = Source->NetStatsEventEnabled; } + if (!Destination->IsSet.StreamMultiReceiveEnabled) { + Destination->StreamMultiReceiveEnabled = Source->StreamMultiReceiveEnabled; + } } _IRQL_requires_max_(PASSIVE_LEVEL) @@ -700,6 +706,11 @@ QuicSettingApply( Destination->NetStatsEventEnabled = Source->NetStatsEventEnabled; Destination->IsSet.NetStatsEventEnabled = TRUE; } + + if (Source->IsSet.StreamMultiReceiveEnabled && (!Destination->IsSet.StreamMultiReceiveEnabled || OverWrite)) { + Destination->StreamMultiReceiveEnabled = Source->StreamMultiReceiveEnabled; + Destination->IsSet.StreamMultiReceiveEnabled = TRUE; + } return TRUE; } @@ -1358,6 +1369,16 @@ QuicSettingsLoad( &ValueLen); Settings->NetStatsEventEnabled = !!Value; } + if (!Settings->IsSet.StreamMultiReceiveEnabled) { + Value = QUIC_DEFAULT_STREAM_MULTI_RECEIVE_ENABLED; + ValueLen = sizeof(Value); + CxPlatStorageReadValue( + Storage, + QUIC_SETTING_STREAM_MULTI_RECEIVE_ENABLED, + (uint8_t*)&Value, + &ValueLen); + Settings->StreamMultiReceiveEnabled = !!Value; + } } _IRQL_requires_max_(PASSIVE_LEVEL) @@ -1426,6 +1447,7 @@ QuicSettingsDump( QuicTraceLogVerbose(SettingReliableResetEnabled, "[sett] ReliableResetEnabled = %hhu", Settings->ReliableResetEnabled); QuicTraceLogVerbose(SettingOneWayDelayEnabled, "[sett] OneWayDelayEnabled = %hhu", Settings->OneWayDelayEnabled); QuicTraceLogVerbose(SettingNetStatsEventEnabled, "[sett] NetStatsEventEnabled = %hhu", Settings->NetStatsEventEnabled); + QuicTraceLogVerbose(SettingsStreamMultiReceiveEnabled, "[sett] StreamMultiReceiveEnabled= %hhu", Settings->StreamMultiReceiveEnabled); } _IRQL_requires_max_(PASSIVE_LEVEL) @@ -1587,6 +1609,9 @@ QuicSettingsDumpNew( if (Settings->IsSet.NetStatsEventEnabled) { QuicTraceLogVerbose(SettingNetStatsEventEnabled, "[sett] NetStatsEventEnabled = %hhu", Settings->NetStatsEventEnabled); } + if (Settings->IsSet.StreamMultiReceiveEnabled) { + QuicTraceLogVerbose(SettingStreamMultiReceiveEnabled, "[sett] StreamMultiReceiveEnabled = %hhu", Settings->StreamMultiReceiveEnabled); + } } #define SETTINGS_SIZE_THRU_FIELD(SettingsType, Field) \ @@ -1843,6 +1868,14 @@ QuicSettingsSettingsToInternal( SettingsSize, InternalSettings); + SETTING_COPY_FLAG_TO_INTERNAL_SIZED( + Flags, + StreamMultiReceiveEnabled, + QUIC_SETTINGS, + Settings, + SettingsSize, + InternalSettings); + return QUIC_STATUS_SUCCESS; } @@ -2004,6 +2037,14 @@ QuicSettingsGetSettings( *SettingsLength, InternalSettings); + SETTING_COPY_FLAG_FROM_INTERNAL_SIZED( + Flags, + StreamMultiReceiveEnabled, + QUIC_SETTINGS, + Settings, + *SettingsLength, + InternalSettings); + *SettingsLength = CXPLAT_MIN(*SettingsLength, sizeof(QUIC_SETTINGS)); return QUIC_STATUS_SUCCESS; diff --git a/src/core/settings.h b/src/core/settings.h index 635e0428f9..9650e119bb 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -61,7 +61,8 @@ typedef struct QUIC_SETTINGS_INTERNAL { uint64_t ReliableResetEnabled : 1; uint64_t OneWayDelayEnabled : 1; uint64_t NetStatsEventEnabled : 1; - uint64_t RESERVED : 17; + uint64_t StreamMultiReceiveEnabled : 1; + uint64_t RESERVED : 16; } IsSet; }; @@ -111,6 +112,7 @@ typedef struct QUIC_SETTINGS_INTERNAL { uint8_t ReliableResetEnabled : 1; uint8_t OneWayDelayEnabled : 1; uint8_t NetStatsEventEnabled : 1; + uint8_t StreamMultiReceiveEnabled : 1; uint8_t MtuDiscoveryMissingProbeCount; } QUIC_SETTINGS_INTERNAL; diff --git a/src/core/stream.c b/src/core/stream.c index 0d5973bb2e..8b849f7ab4 100644 --- a/src/core/stream.c +++ b/src/core/stream.c @@ -66,6 +66,7 @@ QuicStreamInitialize( Stream->Flags.Allocated = TRUE; Stream->Flags.SendEnabled = TRUE; Stream->Flags.ReceiveEnabled = TRUE; + Stream->Flags.ReceiveMultiple = Connection->Settings.StreamMultiReceiveEnabled; Stream->RecvMaxLength = UINT64_MAX; Stream->RefCount = 1; Stream->SendRequestsTail = &Stream->SendRequests; @@ -131,7 +132,8 @@ QuicStreamInitialize( &Stream->RecvBuffer, InitialRecvBufferLength, FlowControlWindowSize, - QUIC_RECV_BUF_MODE_CIRCULAR, + Stream->Flags.ReceiveMultiple ? + QUIC_RECV_BUF_MODE_MULTIPLE : QUIC_RECV_BUF_MODE_CIRCULAR, PreallocatedRecvChunk); if (QUIC_FAILED(Status)) { goto Exit; diff --git a/src/core/stream.h b/src/core/stream.h index 792ba5009d..c210e129fb 100644 --- a/src/core/stream.h +++ b/src/core/stream.h @@ -139,6 +139,7 @@ typedef union QUIC_STREAM_FLAGS { BOOLEAN SendEnabled : 1; // Application is allowed to send data. BOOLEAN ReceiveEnabled : 1; // Application is ready for receive callbacks. + BOOLEAN ReceiveMultiple : 1; // The app supports multiple parallel receive indications. BOOLEAN ReceiveFlushQueued : 1; // The receive flush operation is queued. BOOLEAN ReceiveDataPending : 1; // Data (or FIN) is queued and ready for delivery. BOOLEAN ReceiveCallActive : 1; // There is an active receive to the app. diff --git a/src/core/stream_recv.c b/src/core/stream_recv.c index c3259c6bd2..2550f39924 100644 --- a/src/core/stream_recv.c +++ b/src/core/stream_recv.c @@ -129,10 +129,7 @@ QuicStreamRecvQueueFlush( // The caller has indicated data is ready to be indicated to the // application. Queue a FLUSH_RECV if one isn't already queued. // - - if (Stream->Flags.ReceiveEnabled && - Stream->Flags.ReceiveDataPending && - Stream->RecvPendingLength == 0) { + if (Stream->Flags.ReceiveEnabled && Stream->Flags.ReceiveDataPending) { if (AllowInlineFlush) { QuicStreamRecvFlush(Stream); @@ -541,7 +538,9 @@ QuicStreamProcessStreamFrame( } } - if (ReadyToDeliver) { + if (ReadyToDeliver && + (Stream->RecvBuffer.RecvMode == QUIC_RECV_BUF_MODE_MULTIPLE || + Stream->RecvBuffer.ReadPendingLength == 0)) { Stream->Flags.ReceiveDataPending = TRUE; QuicStreamRecvQueueFlush( Stream, @@ -870,8 +869,6 @@ QuicStreamRecvFlush( return; } - CXPLAT_TEL_ASSERT(!Stream->RecvPendingLength); // N.B. - Will be an invalid assert once we support multiple receives - BOOLEAN FlushRecv = TRUE; while (FlushRecv) { CXPLAT_DBG_ASSERT(!Stream->Flags.SentStopSending); @@ -924,9 +921,10 @@ QuicStreamRecvFlush( Event.RECEIVE.Flags |= QUIC_RECEIVE_FLAG_FIN; // TODO - 0-RTT flag? } - Stream->Flags.ReceiveEnabled = FALSE; + Stream->Flags.ReceiveEnabled = Stream->Flags.ReceiveMultiple; Stream->Flags.ReceiveCallActive = TRUE; Stream->RecvPendingLength += Event.RECEIVE.TotalBufferLength; + CXPLAT_DBG_ASSERT(Stream->RecvPendingLength <= Stream->RecvBuffer.ReadPendingLength); QuicTraceEvent( StreamAppReceive, @@ -1056,7 +1054,7 @@ QuicStreamReceiveComplete( // Stream->Flags.ReceiveEnabled = TRUE; - } else { + } else if (!Stream->Flags.ReceiveMultiple) { // // The app didn't drain all the data, so we will need to wait for them // to request a new receive. @@ -1080,9 +1078,10 @@ QuicStreamReceiveComplete( if (Stream->Flags.ReceiveDataPending) { // // There is still more data for the app to process and it still has - // receive callbacks enabled, so do another recv flush. + // receive callbacks enabled, so do another recv flush (if not already + // doing multi-receive mode). // - return TRUE; + return !Stream->Flags.ReceiveMultiple; } if (Stream->RecvBuffer.BaseOffset == Stream->RecvMaxLength) { @@ -1157,7 +1156,9 @@ QuicStreamRecvSetEnabledState( CXPLAT_DBG_ASSERT(!Stream->Flags.SentStopSending); Stream->Flags.ReceiveEnabled = NewRecvEnabled; - if (Stream->Flags.Started && NewRecvEnabled) { + if (Stream->Flags.Started && NewRecvEnabled && + (Stream->RecvBuffer.RecvMode == QUIC_RECV_BUF_MODE_MULTIPLE || + Stream->RecvBuffer.ReadPendingLength == 0)) { // // The application just resumed receive callbacks. Queue a // flush receive operation to start draining the receive buffer. diff --git a/src/core/unittest/RecvBufferTest.cpp b/src/core/unittest/RecvBufferTest.cpp index 3b4a615a60..bca7767609 100644 --- a/src/core/unittest/RecvBufferTest.cpp +++ b/src/core/unittest/RecvBufferTest.cpp @@ -59,6 +59,7 @@ struct RecvBuffer { _Out_ BOOLEAN* NewDataReady ) { auto BufferToWrite = new (std::nothrow) uint8_t[WriteLength]; + memset(BufferToWrite, 0, WriteLength); // Zero out the buffer (for debugging purposes) CXPLAT_FRE_ASSERT(BufferToWrite); for (uint16_t i = 0; i < WriteLength; ++i) { BufferToWrite[i] = (uint8_t)(WriteOffset + i); @@ -91,6 +92,72 @@ struct RecvBuffer { Dump(); return Result; } + void Check( + _In_ uint32_t ReadStart, + _In_ uint32_t ReadLength, + _In_ uint32_t NumChunks, + _In_ BOOLEAN* ExternalReferences + ) { + ASSERT_EQ(RecvBuf.ReadStart, ReadStart); + ASSERT_EQ(RecvBuf.ReadLength, ReadLength); + int ChunkCount = 1; + QUIC_RECV_CHUNK* Chunk = + CXPLAT_CONTAINING_RECORD( + RecvBuf.Chunks.Flink, + QUIC_RECV_CHUNK, + Link); + ASSERT_EQ(Chunk->ExternalReference, ExternalReferences[0]); + while (Chunk->Link.Flink != &RecvBuf.Chunks) { + ChunkCount++; + Chunk = + CXPLAT_CONTAINING_RECORD( + Chunk->Link.Flink, + QUIC_RECV_CHUNK, + Link); + ASSERT_EQ(Chunk->ExternalReference, ExternalReferences[ChunkCount - 1]); + } + ASSERT_EQ(ChunkCount, NumChunks); + } + void WriteAndCheck( + _In_ uint64_t WriteOffset, + _In_ uint16_t WriteLength, + _In_ uint32_t ReadStart, + _In_ uint32_t ReadLength, + _In_ uint32_t NumChunks, + _In_ BOOLEAN* ExternalReferences + ) { + uint64_t InOutWriteLength = LARGE_TEST_BUFFER_LENGTH; + BOOLEAN NewDataReady = FALSE; + + ASSERT_EQ( + QUIC_STATUS_SUCCESS, + Write( + WriteOffset, + WriteLength, + &InOutWriteLength, + &NewDataReady)); + + Check(ReadStart, ReadLength, NumChunks, ExternalReferences); + } + void ReadAndCheck( + _In_ uint32_t BufferCount, + _In_ uint32_t* LengthList, + _In_ uint32_t ReadStart, + _In_ uint32_t ReadLength, + _In_ uint32_t NumChunks, + _In_ BOOLEAN* ExternalReferences + ) { + uint64_t ReadOffset; + QUIC_BUFFER ReadBuffers[3]; + uint32_t ActualBufferCount = ARRAYSIZE(ReadBuffers); + Read(&ReadOffset, &ActualBufferCount, ReadBuffers); + + ASSERT_EQ(BufferCount, ActualBufferCount); + for (uint32_t i = 0; i < ActualBufferCount; ++i) { + ASSERT_EQ(LengthList[i], ReadBuffers[i].Length); + } + Check(ReadStart, ReadLength, NumChunks, ExternalReferences); + } // Validates the value of the buffer is equal to the offset. static void ValidateBuffer(_In_reads_(BufferLength) const uint8_t* Buffer, _In_ uint32_t BufferLength, _In_ uint64_t BufferOffset) { for (uint32_t i = 0; i < BufferLength; ++i) { @@ -560,8 +627,14 @@ TEST_P(WithMode, ReadPendingMultiWrite) RecvBuf.Read(&ReadOffset, &BufferCount, ReadBuffers); ASSERT_FALSE(RecvBuf.HasUnreadData()); ASSERT_EQ(32ull, ReadOffset); - ASSERT_EQ(1u, BufferCount); - ASSERT_EQ(48u, ReadBuffers[0].Length); + if (Mode == QUIC_RECV_BUF_MODE_MULTIPLE) { + ASSERT_EQ(2u, BufferCount); + ASSERT_EQ(32u, ReadBuffers[0].Length); + ASSERT_EQ(16u, ReadBuffers[1].Length); + } else { + ASSERT_EQ(1u, BufferCount); + ASSERT_EQ(48u, ReadBuffers[0].Length); + } ASSERT_TRUE(RecvBuf.Drain(48)); ASSERT_FALSE(RecvBuf.HasUnreadData()); } @@ -693,6 +766,691 @@ TEST_P(WithMode, DrainFrontChunkWithPendingGap) ASSERT_TRUE(RecvBuf.Drain(1)); } +// Validate the gap can span the edge of a chunk +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 +// |R, R, R, R, 4, 5, 6, x| ReadStart:0, ReadLength:7, Ext:1 +// |R, R, R, R, 4, 5, 6, G] [G,9,10,11,....] ReadStart:0, ReadLength:7, Ext:1 +// |R, R, R, R, 4, 5, 6, 7] [8,9,10,11,....] ReadStart:0, ReadLength:8, Ext:1 +TEST(MultiRecvTest, GapEdge) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, x| ReadStart:0, ReadLength:7, Ext:1 + RecvBuf.WriteAndCheck(4, 3, 0, 7, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, G] [G,9,10,11,....] ReadStart:0, ReadLength:7, Ext:1 + RecvBuf.WriteAndCheck(9, 3, 0, 7, 2, ExternalReferences); + // |R, R, R, R, 4, 5, 6, 7] [8,9,10,11,....] ReadStart:0, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(7, 2, 0, 8, 2, ExternalReferences); + + LengthList[0] = 4; + LengthList[1] = 4; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 0, 8, 2, ExternalReferences); +} + +// Validate the gap can span the edge of a chunk (cycle) +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 +// |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLength:4, Ext:0 +// |D, D, D, D, R, R, R, R] ReadStart:4, ReadLength:4, Ext:1 +// |8, 9,10, D, R, R, R, R] ReadStart:4, ReadLength:7, Ext:1 +// |8, 9,10, G, R, R, R, R] [ G,13,14,15, ...] ReadStart:4, ReadLength:7, Ext:1 +// |8, 9,10,11, R, R, R, R] [12,13,14,15, ...] ReadStart:4, ReadLength:8, Ext:1 +TEST(MultiRecvTest, GapCycleEdge) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + // |D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLength:4, Ext:0 + RecvBuf.Drain(4); + // |D, D, D, D, R, R, R, R] ReadStart:4, ReadLength:4, Ext:1 + RecvBuf.ReadAndCheck(1, LengthList, 4, 4, 1, ExternalReferences); + // |8, 9,10, D, R, R, R, R] ReadStart:4, ReadLength:7, Ext:1 + RecvBuf.WriteAndCheck(8, 3, 4, 7, 1, ExternalReferences); + // |8, 9,10, G, R, R, R, R] [ G,13,14,15, ...] ReadStart:4, ReadLength:7, Ext:1 + RecvBuf.WriteAndCheck(13, 3, 4, 7, 2, ExternalReferences); + // |8, 9,10,11, R, R, R, R] [12,13,14,15, ...] ReadStart:4, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(11, 2, 4, 8, 2, ExternalReferences); + + LengthList[1] = 4; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 4, 8, 2, ExternalReferences); + RecvBuf.Drain(12); +} + +// Validate if resized and copying content to bigger chunk +// |0, 1, 2, 3, x, x, x, x] ReadStart:0, ReadLengt:4, Ext:0 +// |R, R, R, R, x, x, x, x] ReadStart:0, ReadLengt:4, Ext:1 +// |R, R, R, R, 4, 5, 6, 7] ReadStart:0, ReadLengt:8, Ext:1 +// |D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLengt:4, Ext:0 +// [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLengt:12, Ext:0 +TEST(MultiRecvTest, PartialDrainGrow) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x] ReadStart:0, ReadLengt:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x] ReadStart:0, ReadLengt:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, 7] ReadStart:0, ReadLengt:8, Ext:1 + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + // |D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLengt:4, Ext:0 + RecvBuf.Drain(4); + // [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLengt:12, Ext:0 + ExternalReferences[0] = FALSE; + RecvBuf.WriteAndCheck(8, 8, 0, 12, 1, ExternalReferences); + + LengthList[0] = 12; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 12, 1, ExternalReferences); + RecvBuf.Drain(12); +} + +// Validate if resized and copying content to bigger chunk +// [0, 1, 2, 3, x, x, x, x] ReadStart:0, ReadLengt:4, Ext:0 +// |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 +// [R, R, R, R, 4, 5, 6, 7] ReadStart:0, ReadLengt:8, Ext:1 +// [D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLengt:4, Ext:0 +// [8, G, G,11, 4, 5, 6, 7] ReadStart:4, ReadLengt:5, Ext:0 +// [4, 5, 6, 7, 8, G, G,11,12,13,14,15, ...] ReadStart:0, ReadLengt:5, Ext:0 +// [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLengt:12, Ext:0 +TEST(MultiRecvTest, PartialDrainGapGrow) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // [0, 1, 2, 3, x, x, x, x] ReadStart:0, ReadLengt:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // [R, R, R, R, 4, 5, 6, 7] ReadStart:0, ReadLengt:8, Ext:1 + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + // [D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLengt:4, Ext:0 + RecvBuf.Drain(4); + ExternalReferences[0] = FALSE; + // [8, G, G,11, 4, 5, 6, 7] ReadStart:4, ReadLengt:5, Ext:0 + RecvBuf.WriteAndCheck(8, 1, 4, 5, 1, ExternalReferences); + RecvBuf.WriteAndCheck(11, 1, 4, 5, 1, ExternalReferences); + // [4, 5, 6, 7, 8, G, G,11,12,13,14,15, ...] ReadStart:0, ReadLengt:5, Ext:0 + RecvBuf.WriteAndCheck(12, 4, 0, 5, 1, ExternalReferences); + // [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLengt:12, Ext:0 + RecvBuf.WriteAndCheck(9, 2, 0, 12, 1, ExternalReferences); + + LengthList[0] = 12; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 12, 1, ExternalReferences); + RecvBuf.Drain(12); +} + +// Validate if resized and copying content to bigger chunk +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 +// |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 +// |R, R, R, R, 4, 5, 6, x| ReadStart:0, ReadLength:7, Ext:1 +// |D, D, D, D, 4, 5, 6, x] ReadStart:4, ReadLength:3, Ext:0 +// |G, 9,10,11, 4, 5, 6, G] ReadStart:4, ReadLength:3, Ext:0 +// [4, 5, 6, G, G, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLength:3, Ext:0 +// [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLength:12, Ext:0 +TEST(MultiRecvTest, PartialDrainGapEdgeGrow) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, x| ReadStart:0, ReadLength:7, Ext:1 + RecvBuf.WriteAndCheck(4, 3, 0, 7, 1, ExternalReferences); + // |D, D, D, D, 4, 5, 6, x] ReadStart:4, ReadLength:3, Ext:0 + RecvBuf.Drain(4); + ExternalReferences[0] = FALSE; + // |G, 9,10,11, 4, 5, 6, G] ReadStart:4, ReadLength:3, Ext:0 + RecvBuf.WriteAndCheck(9, 3, 4, 3, 1, ExternalReferences); + // [4, 5, 6, G, G, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLength:3, Ext:0 + RecvBuf.WriteAndCheck(12, 4, 0, 3, 1, ExternalReferences); + // [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLength:12, Ext:0 + RecvBuf.WriteAndCheck(7, 2, 0, 12, 1, ExternalReferences); + + LengthList[0] = 12; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 12, 1, ExternalReferences); + RecvBuf.Drain(12); +} + +// Validate if resized and copying content to bigger chunk +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLength:4, Ext:0 +// |8, 9,10, D, 4, 5, 6, 7] ReadStart:4, ReadLength:7, Ext:0 +// [4, 5, 6, 7, 8, 9,10, G, G,13,14,15, ...] ReadStart:0, ReadLength:7, Ext:0 +// [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLength:12, Ext:0 +TEST(MultiRecvTest, PartialDrainGapCycleEdgeGrow) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:8, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + // |D, D, D, D, 4, 5, 6, 7] ReadStart:4, ReadLength:4, Ext:0 + RecvBuf.Drain(4); + ExternalReferences[0] = FALSE; + // |8, 9,10, D, 4, 5, 6, 7] ReadStart:4, ReadLength:7, Ext:0 + RecvBuf.WriteAndCheck(8, 3, 4, 7, 1, ExternalReferences); + // [4, 5, 6, 7, 8, 9,10, G, G,13,14,15, ...] ReadStart:0, ReadLength:7, Ext:0 + RecvBuf.WriteAndCheck(13, 3, 0, 7, 1, ExternalReferences); + // [4, 5, 6, 7, 8, 9,10,11,12,13,14,15, ...] ReadStart:0, ReadLength:12, Ext:0 + RecvBuf.WriteAndCheck(11, 2, 0, 12, 1, ExternalReferences); + + LengthList[0] = 12; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 12, 1, ExternalReferences); + RecvBuf.Drain(12); +} + +// Validate if resized, but appended +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, R, R, 4, 5, 6, 7] ReadStart:2, ReadLength:6, Ext:1 +// |8, 9, R, R, 4, 5, 6, 7] ReadStart:2, ReadLength:8, Ext:1 +// |8, 9, R, R, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:2, ReadLength:8, Ext:1 +// |8, 9, D, D, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:2, ReadLength:6, Ext:0 +// |8, 9, D, D, 4, 5, 6, 7] [10,11,12,13, ...] ReadStart:2, ReadLength:6, Ext:0 +TEST(MultiRecvTest, PartialDrainSmallWriteAppend) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:8, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + // |D, D, R, R, 4, 5, 6, 7] ReadStart:2, ReadLength:6, Ext:1 + RecvBuf.Drain(2); + // |8, 9, R, R, 4, 5, 6, 7] ReadStart:2, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(8, 2, 2, 8, 1, ExternalReferences); + // |8, 9, R, R, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:2, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(10, 2, 2, 8, 2, ExternalReferences); + // |8, 9, D, D, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:2, ReadLength:6, Ext:0 + RecvBuf.Drain(2); + ExternalReferences[0] = FALSE; + // |8, 9, D, D, 4, 5, 6, 7] [10,11,12,13, ...] ReadStart:2, ReadLength:6, Ext:0 + RecvBuf.WriteAndCheck(12, 2, 4, 6, 2, ExternalReferences); + + LengthList[0] = 4; + LengthList[1] = 2; + LengthList[2] = 4; + ExternalReferences[0] = TRUE; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(3, LengthList, 4, 6, 2, ExternalReferences); + RecvBuf.Drain(10); +} + +// Validate if resized, but appended +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, R, R, 4, 5, 6, 7] ReadStart:2, ReadLength:6, Ext:1 +// |8, 9, R, R, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:2, ReadLength:8, Ext:1 +// |8, 9, D, D, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:4, ReadLength:6, Ext:0 +// |8, 9, D, D, 4, 5, 6, 7] [10,11,12,13, ...] ReadStart:4, ReadLength:6, Ext:0 +TEST(MultiRecvTest, PartialDrainBigWriteAppend) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + // |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + // |D, D, R, R, 4, 5, 6, 7] ReadStart:2, ReadLength:6, Ext:1 + RecvBuf.Drain(2); + // |8, 9, R, R, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:2, ReadLength:8, Ext:1 + RecvBuf.WriteAndCheck(8, 4, 2, 8, 2, ExternalReferences); + // |8, 9, D, D, 4, 5, 6, 7] [10,11, x, x, ...] ReadStart:4, ReadLength:6, Ext:0 + RecvBuf.Drain(2); + ExternalReferences[0] = FALSE; + // |8, 9, D, D, 4, 5, 6, 7] [10,11,12,13, ...] ReadStart:4, ReadLength:6, Ext:0 + RecvBuf.WriteAndCheck(12, 2, 4, 6, 2, ExternalReferences); + + LengthList[0] = 4; + LengthList[1] = 2; + LengthList[2] = 4; + ExternalReferences[0] = TRUE; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(3, LengthList, 4, 6, 2, ExternalReferences); + RecvBuf.Drain(10); +} + +// Validate ReadLength with 2 gaps +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:7, Ext:1 +// |R, R, R, R, 4, x, x, x| ReadStart:0, ReadLength:5, Ext:1 +// |R, R, R, R, 4, G, G, 7| [ 8, x, x, x, x, ...] ReadStart:0, ReadLength:5, Ext:1 +// |D, D, D, D, 4, G, G, 7| [ 8, x, x, x, x, ...] ReadStart:4, ReadLength:1, Ext:0 +// |D, D, D, D, 4, G, G, 7| [ 8, G,10,11, x, ...] ReadStart:4, ReadLength:1, Ext:0 +// |D, D, D, D, 4, 5, 6, 7| [ 8, G,10,11, x, ...] ReadStart:4, ReadLength:4, Ext:0 +// |D, D, D, D, R, R, R, R| [ R, G,10,11, x, ...] ReadStart:4, ReadLength:4, Ext:1 +// |D, G,10,11, x, ...] ReadStart:1, ReadLength:0, Ext:0 +// |D, 9,10,11, x, ...] ReadStart:1, ReadLength:3, Ext:0 +TEST(MultiRecvTest, TwoGapWithTwoChunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + + RecvBuf.WriteAndCheck(4, 1, 0, 5, 1, ExternalReferences); + RecvBuf.WriteAndCheck(7, 2, 0, 5, 2, ExternalReferences); + RecvBuf.Drain(4); + ExternalReferences[0] = FALSE; + + RecvBuf.WriteAndCheck(10, 2, 4, 1, 2, ExternalReferences); + + RecvBuf.WriteAndCheck(5, 2, 4, 4, 2, ExternalReferences); + + LengthList[0] = 4; + LengthList[1] = 1; + ExternalReferences[0] = TRUE; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 4, 4, 2, ExternalReferences); + RecvBuf.Drain(5); + ExternalReferences[0] = FALSE; + ExternalReferences[1] = FALSE; + RecvBuf.WriteAndCheck(9, 1, 1, 3, 1, ExternalReferences); + + LengthList[0] = 3; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 1, 3, 1, ExternalReferences); + RecvBuf.Drain(3); +} + +// Validate ReadLength with 2 gaps +// |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 +// |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 +// |R, R, R, R, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, R, 4, 5, 6, 7| ReadStart:3, ReadLength:5, Ext:1 +// |8, 9, D, R, 4, 5, 6, 7| ReadStart:3, ReadLength:7, Ext:1 +// |8, 9, G, R, 4, 5, 6, 7| [ G,12, x, x, ...] ReadStart:3, ReadLength:7, Ext:0 +// |8, 9,10, R, 4, 5, 6, 7| [ G,12, x, x, ...] ReadStart:3, ReadLength:8, Ext:0 +// |8, 9,10, R, 4, 5, 6, 7| [11,12, G,14, ...] ReadStart:3, ReadLength:8, Ext:0 +// |8, 9,10, R, 4, 5, 6, 7| [11,12,13,14, ...] ReadStart:3, ReadLength:8, Ext:0 +TEST(MultiRecvTest, TwoGapCycleEdgeWithTwoChunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + // |0, 1, 2, 3, x, x, x, x| ReadStart:0, ReadLength:4, Ext:0 + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + // |R, R, R, R, x, x, x, x| ReadStart:0, ReadLength:4, Ext:1 + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 4, 1, ExternalReferences); + + RecvBuf.WriteAndCheck(4, 4, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(3); + RecvBuf.WriteAndCheck(8, 2, 3, 7, 1, ExternalReferences); + + RecvBuf.WriteAndCheck(12, 1, 3, 7, 2, ExternalReferences); + RecvBuf.WriteAndCheck(14, 1, 3, 7, 2, ExternalReferences); + RecvBuf.WriteAndCheck(10, 2, 3, 8, 2, ExternalReferences); + RecvBuf.WriteAndCheck(13, 1, 3, 8, 2, ExternalReferences); + + LengthList[0] = 4; + LengthList[1] = 3; + LengthList[2] = 4; + ExternalReferences[0] = TRUE; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(3, LengthList, 3, 8, 2, ExternalReferences); + RecvBuf.Drain(12); +} + +// |0, 1, 2, 3, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:0 +// |R, R, R, R, R, R, R, R| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, D, D, D, R, R| ReadStart:6, ReadLength:2, Ext:1 +// |8, 9,10,11,12,13, R, R| [14,15, x, x] ReadStart:6, ReadLength:8, Ext:1 +// |R, R, R, R, R, R, R, R| [ R, R, x, x] ReadStart:6, ReadLength:8, Ext:1 +// |D, D, R, R, R, R, D, D| [ R, R, x, x] ReadStart:2, ReadLength:4, Ext:1 +// |D, D, R, R, R, R, D, D| [ R, R,16,17,18, ...] ReadStart:2, ReadLength:4, Ext:1 +// [D, D,16,17,18, ...] ReadStart:2, ReadLength:3, Ext:0 +TEST(MultiRecvTest, ReadCycleSpan) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + LengthList[0] = 8; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(6); + RecvBuf.WriteAndCheck(8, 8, 6, 8, 2, ExternalReferences); + LengthList[0] = 6; + LengthList[1] = 2; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 6, 8, 2, ExternalReferences); + RecvBuf.Drain(4); + RecvBuf.WriteAndCheck(16, 3, 2, 4, 2, ExternalReferences); + RecvBuf.Drain(6); + LengthList[0] = 3; + RecvBuf.ReadAndCheck(1, LengthList, 2, 3, 1, ExternalReferences); + RecvBuf.Drain(3); +} + +// |0, 1, 2, 3, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:0 +// |R, R, R, R, R, R, R, R| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, D, D, D, R, R| ReadStart:6, ReadLength:2, Ext:1 +// |8, D, D, D, D, D, R, R| ReadStart:6, ReadLength:3, Ext:1 +// |8, G, 7, D, D, D, R, R| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10, G, D, D, R, R| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10, G,12, D, R, R| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10, G,12, G, R, R| |14, x, x, x, ...| ReadStart:6, ReadLength:3, Ext:1 // dead +// |8, G,10, G,12, G, R, R| |14, G,16, x, ...| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10,11,12, G, R, R| |14, G,16, x, ...| ReadStart:6, ReadLength:3, Ext:1 +// |8, 9,10,11,12, G, R, R| |14, G,16, x, ...| ReadStart:6, ReadLength:7, Ext:1 +// |8, 9,10,11,12, G, R, R| |14,15,16, x, ...| ReadStart:6, ReadLength:7, Ext:1 +// |8, 9,10,11,12,13, R, R| |14,15,16, x, ...| ReadStart:6, ReadLength:8, Ext:1 +TEST(MultiRecvTest, MultiGap) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + LengthList[0] = 8; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(6); + RecvBuf.WriteAndCheck(8, 1, 6, 3, 1, ExternalReferences); + RecvBuf.WriteAndCheck(10, 1, 6, 3, 1, ExternalReferences); + RecvBuf.WriteAndCheck(12, 1, 6, 3, 1, ExternalReferences); + RecvBuf.WriteAndCheck(14, 1, 6, 3, 2, ExternalReferences); // dead + RecvBuf.WriteAndCheck(16, 1, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(11, 1, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(9, 1, 6, 7, 2, ExternalReferences); + RecvBuf.WriteAndCheck(15, 1, 6, 7, 2, ExternalReferences); + RecvBuf.WriteAndCheck(13, 1, 6, 8, 2, ExternalReferences); + + LengthList[0] = 6; + LengthList[1] = 3; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 6, 8, 2, ExternalReferences); + RecvBuf.Drain(9); +} + +TEST(MultiRecvTest, MultiGapOverwrap) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + LengthList[0] = 8; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(6); + RecvBuf.WriteAndCheck(8, 1, 6, 3, 1, ExternalReferences); + RecvBuf.WriteAndCheck(10, 1, 6, 3, 1, ExternalReferences); + RecvBuf.WriteAndCheck(12, 1, 6, 3, 1, ExternalReferences); + RecvBuf.WriteAndCheck(14, 1, 6, 3, 2, ExternalReferences); // dead + RecvBuf.WriteAndCheck(16, 1, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(14, 2, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(11, 2, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(8, 5, 6, 7, 2, ExternalReferences); + RecvBuf.WriteAndCheck(11, 5, 6, 8, 2, ExternalReferences); + + LengthList[0] = 6; + LengthList[1] = 3; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 6, 8, 2, ExternalReferences); + RecvBuf.Drain(9); +} + +// |0, 1, 2, 3, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:0 +// |R, R, R, R, R, R, R, R| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, D, R, R, R, R| ReadStart:4, ReadLength:4, Ext:1 +// |8, D, D, D, R, R, R, R| ReadStart:4, ReadLength:5, Ext:1 +// |8, G,10, D, R, R, R, R| ReadStart:4, ReadLength:5, Ext:1 +// |8, G,10, G, R, R, R, R| |12, x, x, ...| ReadStart:4, ReadLength:5, Ext:1 // dead +// |8, G,10, G, D, D, R, R| |12, x, x, ...| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10, G, D, D, R, R| |12, G,14, ...| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10,11, D, D, R, R| |12, G,14, ...| ReadStart:6, ReadLength:3, Ext:1 +// |8, G,10,11, D, D, R, R| |12,13,14, ...| ReadStart:6, ReadLength:3, Ext:1 +// |8, 9,10,11, D, D, R, R| |12,13,14, ...| ReadStart:6, ReadLength:6, Ext:1 +TEST(MultiRecvTest, MultiGapDead) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + LengthList[0] = 8; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(4); + RecvBuf.WriteAndCheck(8, 1, 4, 5, 1, ExternalReferences); + RecvBuf.WriteAndCheck(10, 1, 4, 5, 1, ExternalReferences); + RecvBuf.WriteAndCheck(12, 1, 4, 5, 2, ExternalReferences); // dead + RecvBuf.Drain(2); + RecvBuf.WriteAndCheck(14, 1, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(11, 1, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(13, 1, 6, 3, 2, ExternalReferences); + RecvBuf.WriteAndCheck(9, 1, 6, 6, 2, ExternalReferences); + + LengthList[0] = 4; + LengthList[1] = 3; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 6, 6, 2, ExternalReferences); + RecvBuf.Drain(9); +} + +// |0, 1, 2, 3, 4, 5, 6, 7| ReadStart:0, ReadLength:8, Ext:0 +// |R, R, R, R, R, R, R, R| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, D, D, D, D, R, R| ReadStart:6, ReadLength:2, Ext:1 +// |8, 9,10,11,12,13, R, R| [14,15, x, x] ReadStart:6, ReadLength:8, Ext:1 +// |R, R, R, R, R, R, R, R| [ R, R, x, x] ReadStart:6, ReadLength:8, Ext:1 +// [ D, R, x, x, x, ...] ReadStart:1, ReadLength:1, Ext:1 +// [ D, R,16,17,18, ...] ReadStart:1, ReadLength:4, Ext:1 +TEST(MultiRecvTest, ReadDrainCycleSpan) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + LengthList[0] = 8; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(6); + RecvBuf.WriteAndCheck(8, 8, 6, 8, 2, ExternalReferences); + LengthList[0] = 6; + LengthList[1] = 2; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(2, LengthList, 6, 8, 2, ExternalReferences); + RecvBuf.Drain(9); + RecvBuf.WriteAndCheck(16, 3, 1, 4, 1, ExternalReferences); + LengthList[0] = 3; + RecvBuf.ReadAndCheck(1, LengthList, 1, 4, 1, ExternalReferences); + RecvBuf.Drain(3); +} + +// |0, 1, 2, 3, 4, 5, x, x| ReadStart:0, ReadLength:6, Ext:0 +// |R, R, R, R, R, R, x, x| ReadStart:0, ReadLength:6, Ext:1 +// |R, R, R, R, R, R, 6, 7| ReadStart:0, ReadLength:8, Ext:1 +// |D, D, R, R, R, R, 6, 7| ReadStart:2, ReadLength:6, Ext:1 +// |8, 9, R, R, R, R, 6, 7| [10, x, x, x, ...] ReadStart:2, ReadLength:8, Ext:1 +// |8, 9, R, R, R, R, 6, 7| [10, G,12, x, ...] ReadStart:2, ReadLength:8, Ext:1 +// |R, R, D, D, R, R, R, R| [ R, G,12, x, ...] ReadStart:4, ReadLength:6, Ext:1 +// |R, R, D, D, R, R, R, R| [ R, G,12, G,14, ...] ReadStart:4, ReadLength:6, Ext:1 +// |D, R, D, D, D, D, D, D| [ R, G,12, G,14, ...] ReadStart:1, ReadLength:1, Ext:1 // expand 2nd? +// |D, R, D, D, D, D, D, D| [ R, G,12,13,14, ...] ReadStart:1, ReadLength:1, Ext:1 +// [D, G,12,13,14, ...] ReadStart:1, ReadLength:0, Ext:0 +// [D,11,12,13,14, ...] ReadStart:1, ReadLength:4, Ext:0 +TEST(MultiRecvTest, Dead1stChunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {0, 0, 0}; + + RecvBuf.WriteAndCheck(0, 6, 0, 6, 1, ExternalReferences); + LengthList[0] = 6; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 6, 1, ExternalReferences); + RecvBuf.WriteAndCheck(6, 2, 0, 8, 1, ExternalReferences); + RecvBuf.Drain(2); + RecvBuf.WriteAndCheck(8, 3, 2, 8, 2, ExternalReferences); + RecvBuf.WriteAndCheck(12, 1, 2, 8, 2, ExternalReferences); + LengthList[0] = 2; + LengthList[1] = 2; + LengthList[2] = 1; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(3, LengthList, 2, 8, 2, ExternalReferences); + RecvBuf.Drain(2); + RecvBuf.WriteAndCheck(14, 1, 4, 6, 2, ExternalReferences); + RecvBuf.Drain(5); + RecvBuf.WriteAndCheck(13, 1, 1, 1, 2, ExternalReferences); + RecvBuf.Drain(2); + ExternalReferences[0] = FALSE; + RecvBuf.WriteAndCheck(11, 1, 1, 4, 1, ExternalReferences); + LengthList[0] = 4; + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 1, 4, 1, ExternalReferences); + RecvBuf.Drain(4); +} + +TEST(MultiRecvTest, Grow1stChunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {160, 0, 0}; + RecvBuf.WriteAndCheck(0, 4, 0, 4, 1, ExternalReferences); + RecvBuf.WriteAndCheck(4, 8, 0, 12, 1, ExternalReferences); // grow -> 16 + RecvBuf.WriteAndCheck(12, 16, 0, 28, 1, ExternalReferences); // grow -> 32 + RecvBuf.WriteAndCheck(28, 32, 0, 60, 1, ExternalReferences); // grow -> 64 + RecvBuf.WriteAndCheck(60, 100, 0, 160, 1, ExternalReferences); // grow -> 256 + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 160, 1, ExternalReferences); + RecvBuf.Drain(160); +} + +TEST(MultiRecvTest, Grow2ndChunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE}; + uint32_t LengthList[] = {8, 0, 0}; + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.WriteAndCheck(8, 8, 0, 8, 2, ExternalReferences); // append -> 16 + RecvBuf.WriteAndCheck(16, 16, 0, 8, 2, ExternalReferences); // grow -> 32 + RecvBuf.WriteAndCheck(32, 64, 0, 8, 2, ExternalReferences); // grow -> 128 + ExternalReferences[1] = TRUE; + LengthList[0] = 88; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 2, ExternalReferences); + RecvBuf.Drain(96); +} + +TEST(MultiRecvTest, Grow3rdChunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE, FALSE}; + uint32_t LengthList[] = {8, 0, 0}; + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.WriteAndCheck(8, 32, 0, 8, 2, ExternalReferences); // append -> 32 + LengthList[0] = 32; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 2, ExternalReferences); + RecvBuf.WriteAndCheck(40, 64, 0, 8, 3, ExternalReferences); // append -> 64 + RecvBuf.WriteAndCheck(104, 20, 0, 8, 3, ExternalReferences); // grow -> 128 + ExternalReferences[2] = TRUE; + LengthList[0] = 84; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 3, ExternalReferences); + RecvBuf.Drain(124); +} + +TEST(MultiRecvTest, ReadPendingOver2Chunk) +{ + RecvBuffer RecvBuf; + ASSERT_EQ(QUIC_STATUS_SUCCESS, RecvBuf.Initialize(QUIC_RECV_BUF_MODE_MULTIPLE, false, 8, LARGE_TEST_BUFFER_LENGTH)); + BOOLEAN ExternalReferences[] = {FALSE, FALSE, FALSE}; + uint32_t LengthList[] = {8, 0, 0}; + RecvBuf.WriteAndCheck(0, 8, 0, 8, 1, ExternalReferences); + ExternalReferences[0] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 1, ExternalReferences); + RecvBuf.WriteAndCheck(8, 8, 0, 8, 2, ExternalReferences); // append -> 16 + LengthList[0] = 8; + ExternalReferences[1] = TRUE; + RecvBuf.ReadAndCheck(1, LengthList, 0, 8, 2, ExternalReferences); + + RecvBuf.WriteAndCheck(16, 8, 0, 8, 2, ExternalReferences); // append -> 16 + RecvBuf.Drain(16); + LengthList[0] = 8; + RecvBuf.ReadAndCheck(1, LengthList, 8, 8, 1, ExternalReferences); + RecvBuf.Drain(8); +} + INSTANTIATE_TEST_SUITE_P( RecvBufferTest, WithMode, diff --git a/src/core/unittest/SettingsTest.cpp b/src/core/unittest/SettingsTest.cpp index 0120016262..2d6fd0100a 100644 --- a/src/core/unittest/SettingsTest.cpp +++ b/src/core/unittest/SettingsTest.cpp @@ -124,6 +124,7 @@ TEST(SettingsTest, TestAllSettingsFieldsSet) SETTINGS_FEATURE_SET_TEST(ReliableResetEnabled, QuicSettingsSettingsToInternal); SETTINGS_FEATURE_SET_TEST(OneWayDelayEnabled, QuicSettingsSettingsToInternal); SETTINGS_FEATURE_SET_TEST(NetStatsEventEnabled, QuicSettingsSettingsToInternal); + SETTINGS_FEATURE_SET_TEST(StreamMultiReceiveEnabled, QuicSettingsSettingsToInternal); Settings.IsSetFlags = 0; Settings.IsSet.RESERVED = ~Settings.IsSet.RESERVED; @@ -209,6 +210,7 @@ TEST(SettingsTest, TestAllSettingsFieldsGet) SETTINGS_FEATURE_GET_TEST(ReliableResetEnabled, QuicSettingsGetSettings); SETTINGS_FEATURE_GET_TEST(OneWayDelayEnabled, QuicSettingsGetSettings); SETTINGS_FEATURE_GET_TEST(NetStatsEventEnabled, QuicSettingsGetSettings); + SETTINGS_FEATURE_GET_TEST(StreamMultiReceiveEnabled, QuicSettingsGetSettings); Settings.IsSetFlags = 0; Settings.IsSet.RESERVED = ~Settings.IsSet.RESERVED; diff --git a/src/core/worker.c b/src/core/worker.c index ee0c350016..1132642953 100644 --- a/src/core/worker.c +++ b/src/core/worker.c @@ -76,6 +76,7 @@ QuicWorkerInitialize( CxPlatEventInitialize(&Worker->Done, TRUE, FALSE); CxPlatEventInitialize(&Worker->Ready, FALSE, FALSE); CxPlatListInitializeHead(&Worker->Connections); + Worker->PriorityConnectionsTail = &Worker->Connections.Flink; CxPlatListInitializeHead(&Worker->Operations); CxPlatPoolInitialize(FALSE, sizeof(QUIC_STREAM), QUIC_POOL_STREAM, &Worker->StreamPool); CxPlatPoolInitialize(FALSE, sizeof(QUIC_RECV_CHUNK)+QUIC_DEFAULT_STREAM_RECV_BUFFER_SIZE, QUIC_POOL_SBUF, &Worker->DefaultReceiveBufferPool); @@ -169,6 +170,7 @@ QuicWorkerUninitialize( CxPlatEventUninitialize(Worker->Ready); CXPLAT_TEL_ASSERT(CxPlatListIsEmpty(&Worker->Connections)); + Worker->PriorityConnectionsTail = NULL; CXPLAT_TEL_ASSERT(CxPlatListIsEmpty(&Worker->Operations)); CxPlatPoolUninitialize(&Worker->StreamPool); @@ -222,10 +224,10 @@ QuicWorkerQueueConnection( { CXPLAT_DBG_ASSERT(Connection->Worker != NULL); BOOLEAN ConnectionQueued = FALSE; + BOOLEAN WakeWorkerThread = FALSE; CxPlatDispatchLockAcquire(&Worker->Lock); - BOOLEAN WakeWorkerThread; if (!Connection->WorkerProcessing && !Connection->HasQueuedWork) { WakeWorkerThread = QuicWorkerIsIdle(Worker); Connection->Stats.Schedule.LastQueueTime = CxPlatTimeUs32(); @@ -237,8 +239,6 @@ QuicWorkerQueueConnection( QuicConnAddRef(Connection, QUIC_CONN_REF_WORKER); CxPlatListInsertTail(&Worker->Connections, &Connection->WorkerLink); ConnectionQueued = TRUE; - } else { - WakeWorkerThread = FALSE; } Connection->HasQueuedWork = TRUE; @@ -246,11 +246,54 @@ QuicWorkerQueueConnection( CxPlatDispatchLockRelease(&Worker->Lock); if (ConnectionQueued) { + if (WakeWorkerThread) { + QuicWorkerThreadWake(Worker); + } QuicPerfCounterIncrement(QUIC_PERF_COUNTER_CONN_QUEUE_DEPTH); } +} - if (WakeWorkerThread) { - QuicWorkerThreadWake(Worker); +_IRQL_requires_max_(DISPATCH_LEVEL) +void +QuicWorkerQueuePriorityConnection( + _In_ QUIC_WORKER* Worker, + _In_ QUIC_CONNECTION* Connection + ) +{ + CXPLAT_DBG_ASSERT(Connection->Worker != NULL); + BOOLEAN ConnectionQueued = FALSE; + BOOLEAN WakeWorkerThread = FALSE; + + CxPlatDispatchLockAcquire(&Worker->Lock); + + if (!Connection->WorkerProcessing && !Connection->HasPriorityWork) { + if (!Connection->HasQueuedWork) { // Not already queued for normal priority work + WakeWorkerThread = QuicWorkerIsIdle(Worker); + Connection->Stats.Schedule.LastQueueTime = CxPlatTimeUs32(); + QuicTraceEvent( + ConnScheduleState, + "[conn][%p] Scheduling: %u", + Connection, + QUIC_SCHEDULE_QUEUED); + QuicConnAddRef(Connection, QUIC_CONN_REF_WORKER); + ConnectionQueued = TRUE; + } else { // Moving from normal priority to high priority + CxPlatListEntryRemove(&Connection->WorkerLink); + } + CxPlatListInsertTail(*Worker->PriorityConnectionsTail, &Connection->WorkerLink); + Worker->PriorityConnectionsTail = &Connection->WorkerLink.Flink; + Connection->HasPriorityWork = TRUE; + } + + Connection->HasQueuedWork = TRUE; + + CxPlatDispatchLockRelease(&Worker->Lock); + + if (ConnectionQueued) { + if (WakeWorkerThread) { + QuicWorkerThreadWake(Worker); + } + QuicPerfCounterIncrement(QUIC_PERF_COUNTER_CONN_QUEUE_DEPTH); } } @@ -258,25 +301,30 @@ _IRQL_requires_max_(DISPATCH_LEVEL) void QuicWorkerMoveConnection( _In_ QUIC_WORKER* Worker, - _In_ QUIC_CONNECTION* Connection + _In_ QUIC_CONNECTION* Connection, + _In_ BOOLEAN IsPriority ) { CXPLAT_DBG_ASSERT(Connection->Worker != NULL); + CXPLAT_DBG_ASSERT(Connection->HasQueuedWork); CxPlatDispatchLockAcquire(&Worker->Lock); - BOOLEAN WakeWorkerThread = QuicWorkerIsIdle(Worker); - - if (Connection->HasQueuedWork) { - Connection->Stats.Schedule.LastQueueTime = CxPlatTimeUs32(); - QuicTraceEvent( - ConnScheduleState, - "[conn][%p] Scheduling: %u", - Connection, - QUIC_SCHEDULE_QUEUED); - QuicConnAddRef(Connection, QUIC_CONN_REF_WORKER); + const BOOLEAN WakeWorkerThread = QuicWorkerIsIdle(Worker); + Connection->Stats.Schedule.LastQueueTime = CxPlatTimeUs32(); + if (IsPriority) { + CxPlatListInsertTail(*Worker->PriorityConnectionsTail, &Connection->WorkerLink); + Worker->PriorityConnectionsTail = &Connection->WorkerLink.Flink; + Connection->HasPriorityWork = TRUE; + } else { CxPlatListInsertTail(&Worker->Connections, &Connection->WorkerLink); } + QuicTraceEvent( + ConnScheduleState, + "[conn][%p] Scheduling: %u", + Connection, + QUIC_SCHEDULE_QUEUED); + QuicConnAddRef(Connection, QUIC_CONN_REF_WORKER); CxPlatDispatchLockRelease(&Worker->Lock); @@ -365,9 +413,13 @@ QuicWorkerGetNextConnection( Connection = CXPLAT_CONTAINING_RECORD( CxPlatListRemoveHead(&Worker->Connections), QUIC_CONNECTION, WorkerLink); + if (Worker->PriorityConnectionsTail == &Connection->WorkerLink.Flink) { + Worker->PriorityConnectionsTail = &Worker->Connections.Flink; + } CXPLAT_DBG_ASSERT(!Connection->WorkerProcessing); CXPLAT_DBG_ASSERT(Connection->HasQueuedWork); Connection->HasQueuedWork = FALSE; + Connection->HasPriorityWork = FALSE; Connection->WorkerProcessing = TRUE; QuicPerfCounterDecrement(QUIC_PERF_COUNTER_CONN_QUEUE_DEPTH); } @@ -502,8 +554,9 @@ QuicWorkerProcessConnection( // // Process some operations. // + BOOLEAN StillHasPriorityWork = FALSE; BOOLEAN StillHasWorkToDo = - QuicConnDrainOperations(Connection) | Connection->State.UpdateWorker; + QuicConnDrainOperations(Connection, &StillHasPriorityWork) | Connection->State.UpdateWorker; Connection->WorkerThreadID = 0; // @@ -517,7 +570,13 @@ QuicWorkerProcessConnection( if (!Connection->State.UpdateWorker) { if (Connection->HasQueuedWork) { Connection->Stats.Schedule.LastQueueTime = CxPlatTimeUs32(); - CxPlatListInsertTail(&Worker->Connections, &Connection->WorkerLink); + if (StillHasPriorityWork) { + CxPlatListInsertTail(*Worker->PriorityConnectionsTail, &Connection->WorkerLink); + Worker->PriorityConnectionsTail = &Connection->WorkerLink.Flink; + Connection->HasPriorityWork = TRUE; + } else { + CxPlatListInsertTail(&Worker->Connections, &Connection->WorkerLink); + } QuicTraceEvent( ConnScheduleState, "[conn][%p] Scheduling: %u", @@ -548,7 +607,7 @@ QuicWorkerProcessConnection( CXPLAT_FRE_ASSERT(Connection->Registration != NULL); QuicRegistrationQueueNewConnection(Connection->Registration, Connection); CXPLAT_DBG_ASSERT(Worker != Connection->Worker); - QuicWorkerMoveConnection(Connection->Worker, Connection); + QuicWorkerMoveConnection(Connection->Worker, Connection, StillHasPriorityWork); } // @@ -577,6 +636,9 @@ QuicWorkerLoopCleanup( QUIC_CONNECTION* Connection = CXPLAT_CONTAINING_RECORD( CxPlatListRemoveHead(&Worker->Connections), QUIC_CONNECTION, WorkerLink); + if (Worker->PriorityConnectionsTail == &Connection->WorkerLink.Flink) { + Worker->PriorityConnectionsTail = &Worker->Connections.Flink; + } if (!Connection->State.ExternalOwner) { // // If there is no external owner, shut down the connection so diff --git a/src/core/worker.h b/src/core/worker.h index b3693d5d56..5cb4796bb6 100644 --- a/src/core/worker.h +++ b/src/core/worker.h @@ -70,6 +70,7 @@ typedef struct QUIC_CACHEALIGN QUIC_WORKER { // Queue of connections with operations to be processed. // CXPLAT_LIST_ENTRY Connections; + CXPLAT_LIST_ENTRY** PriorityConnectionsTail; // // Queue of stateless operations to be processed. @@ -184,6 +185,17 @@ QuicWorkerQueueConnection( _In_ QUIC_CONNECTION* Connection ); +// +// Queues a priority connection onto the worker, and kicks the worker thread if +// necessary. +// +_IRQL_requires_max_(DISPATCH_LEVEL) +void +QuicWorkerQueuePriorityConnection( + _In_ QUIC_WORKER* Worker, + _In_ QUIC_CONNECTION* Connection + ); + // // Queues the operation onto the worker, and kicks the worker thread if // necessary. diff --git a/src/cs/lib/msquic_generated.cs b/src/cs/lib/msquic_generated.cs index 9840a74710..59c766543d 100644 --- a/src/cs/lib/msquic_generated.cs +++ b/src/cs/lib/msquic_generated.cs @@ -1349,6 +1349,19 @@ internal ulong NetStatsEventEnabled } } + internal ulong StreamMultiReceiveEnabled + { + get + { + return Anonymous2.Anonymous.StreamMultiReceiveEnabled; + } + + set + { + Anonymous2.Anonymous.StreamMultiReceiveEnabled = value; + } + } + internal ulong ReservedFlags { get @@ -1965,17 +1978,31 @@ internal ulong NetStatsEventEnabled } } - [NativeTypeName("uint64_t : 22")] + [NativeTypeName("uint64_t : 1")] + internal ulong StreamMultiReceiveEnabled + { + get + { + return (_bitfield >> 42) & 0x1UL; + } + + set + { + _bitfield = (_bitfield & ~(0x1UL << 42)) | ((value & 0x1UL) << 42); + } + } + + [NativeTypeName("uint64_t : 21")] internal ulong RESERVED { get { - return (_bitfield >> 42) & 0x3FFFFFUL; + return (_bitfield >> 43) & 0x1FFFFFUL; } set { - _bitfield = (_bitfield & ~(0x3FFFFFUL << 42)) | ((value & 0x3FFFFFUL) << 42); + _bitfield = (_bitfield & ~(0x1FFFFFUL << 43)) | ((value & 0x1FFFFFUL) << 43); } } } @@ -2066,17 +2093,31 @@ internal ulong NetStatsEventEnabled } } - [NativeTypeName("uint64_t : 59")] + [NativeTypeName("uint64_t : 1")] + internal ulong StreamMultiReceiveEnabled + { + get + { + return (_bitfield >> 5) & 0x1UL; + } + + set + { + _bitfield = (_bitfield & ~(0x1UL << 5)) | ((value & 0x1UL) << 5); + } + } + + [NativeTypeName("uint64_t : 58")] internal ulong ReservedFlags { get { - return (_bitfield >> 5) & 0x7FFFFFFUL; + return (_bitfield >> 6) & 0x3FFFFFFUL; } set { - _bitfield = (_bitfield & ~(0x7FFFFFFUL << 5)) | ((value & 0x7FFFFFFUL) << 5); + _bitfield = (_bitfield & ~(0x3FFFFFFUL << 6)) | ((value & 0x3FFFFFFUL) << 6); } } } diff --git a/src/distribution/Info.plist b/src/distribution/Info.plist index ed536a0852..32583bc5b4 100644 --- a/src/distribution/Info.plist +++ b/src/distribution/Info.plist @@ -19,7 +19,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleVersion - 2.4.0 + 2.5.0 NSHumanReadableCopyright MIT CFBundleGetInfoString diff --git a/src/generated/linux/Tcp.cpp.clog.h.lttng.h b/src/generated/linux/Tcp.cpp.clog.h.lttng.h index 66e80eb0db..711615bac7 100644 --- a/src/generated/linux/Tcp.cpp.clog.h.lttng.h +++ b/src/generated/linux/Tcp.cpp.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpCreateClient, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -33,7 +33,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpCreateServer, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -52,7 +52,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -74,7 +74,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpConnectCallback, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -94,7 +94,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpReceiveCallback, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -113,7 +113,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpSendCompleteCallback, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -132,7 +132,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppAccept, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -151,7 +151,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpStartTls, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -170,7 +170,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppConnect, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -189,7 +189,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppDisconnect, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -220,7 +220,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppReceive, unsigned char, arg5, unsigned char, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -255,7 +255,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpSendFrame, unsigned char, arg5, unsigned char, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -281,7 +281,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppSendComplete, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -313,7 +313,7 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppSend, unsigned char, arg5, unsigned char, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -336,6 +336,6 @@ TRACEPOINT_EVENT(CLOG_TCP_CPP, PerfTcpAppClose, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/generated/linux/api.c.clog.h.lttng.h b/src/generated/linux/api.c.clog.h.lttng.h index ffe2e0355f..3ad21b6e3d 100644 --- a/src/generated/linux/api.c.clog.h.lttng.h +++ b/src/generated/linux/api.c.clog.h.lttng.h @@ -18,7 +18,7 @@ TRACEPOINT_EVENT(CLOG_API_C, ApiEnter, const void *, arg3), TP_FIELDS( ctf_integer(unsigned int, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -114,7 +114,7 @@ TRACEPOINT_EVENT(CLOG_API_C, StreamError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -143,7 +143,7 @@ TRACEPOINT_EVENT(CLOG_API_C, StreamAppSend, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -168,7 +168,7 @@ TRACEPOINT_EVENT(CLOG_API_C, StreamAppReceiveCompleteCall, const void *, arg2, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -191,7 +191,7 @@ TRACEPOINT_EVENT(CLOG_API_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/bbr.c.clog.h.lttng.h b/src/generated/linux/bbr.c.clog.h.lttng.h index 1327b981cd..89a30cc133 100644 --- a/src/generated/linux/bbr.c.clog.h.lttng.h +++ b/src/generated/linux/bbr.c.clog.h.lttng.h @@ -32,7 +32,7 @@ TRACEPOINT_EVENT(CLOG_BBR_C, IndicateDataAcked, unsigned int, arg7, unsigned long long, arg8), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) @@ -81,7 +81,7 @@ TRACEPOINT_EVENT(CLOG_BBR_C, ConnBbr, unsigned int, arg9, unsigned int, arg10), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -132,7 +132,7 @@ TRACEPOINT_EVENT(CLOG_BBR_C, ConnOutFlowStatsV2, unsigned long long, arg9, unsigned long long, arg10), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -159,7 +159,7 @@ TRACEPOINT_EVENT(CLOG_BBR_C, ConnRecoveryExit, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -181,7 +181,7 @@ TRACEPOINT_EVENT(CLOG_BBR_C, ConnCongestionV2, const void *, arg2, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -201,6 +201,6 @@ TRACEPOINT_EVENT(CLOG_BBR_C, ConnPersistentCongestion, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/generated/linux/binding.c.clog.h.lttng.h b/src/generated/linux/binding.c.clog.h.lttng.h index 9a0df7cf11..7392a89c6e 100644 --- a/src/generated/linux/binding.c.clog.h.lttng.h +++ b/src/generated/linux/binding.c.clog.h.lttng.h @@ -16,8 +16,8 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingListenerAlreadyRegistered, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -39,7 +39,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingSendFailed, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -135,7 +135,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingSendTestDrop, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -183,7 +183,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -215,8 +215,8 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingCreated, unsigned int, arg5_len, const void *, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -239,7 +239,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingCleanup, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -258,7 +258,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -288,8 +288,8 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingRundown, unsigned int, arg5_len, const void *, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -316,7 +316,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, ConnNoListenerIp, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -341,7 +341,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, ConnNoListenerAlpn, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -365,7 +365,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -388,7 +388,7 @@ TRACEPOINT_EVENT(CLOG_BINDING_C, BindingExecOper, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) diff --git a/src/generated/linux/configuration.c.clog.h.lttng.h b/src/generated/linux/configuration.c.clog.h.lttng.h index 8f8a022fd8..30646f0d8e 100644 --- a/src/generated/linux/configuration.c.clog.h.lttng.h +++ b/src/generated/linux/configuration.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationOpenStorageFailed, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -40,7 +40,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationOpenAppStorageFailed, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -63,8 +63,8 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationSettingsUpdated, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -83,7 +83,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationSetSettings, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -106,7 +106,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ApiEnter, const void *, arg3), TP_FIELDS( ctf_integer(unsigned int, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -151,8 +151,8 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationCreated, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -190,7 +190,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationCleanup, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -209,7 +209,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -247,7 +247,7 @@ TRACEPOINT_EVENT(CLOG_CONFIGURATION_C, ConfigurationRundown, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) diff --git a/src/generated/linux/congestion_control.c.clog.h.lttng.h b/src/generated/linux/congestion_control.c.clog.h.lttng.h index a92a152c6e..df64b9f1c8 100644 --- a/src/generated/linux/congestion_control.c.clog.h.lttng.h +++ b/src/generated/linux/congestion_control.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_CONGESTION_CONTROL_C, InvalidCongestionControlAlgorithm, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) diff --git a/src/generated/linux/connection.c.clog.h.lttng.h b/src/generated/linux/connection.c.clog.h.lttng.h index 9c81584427..8cef04d1cc 100644 --- a/src/generated/linux/connection.c.clog.h.lttng.h +++ b/src/generated/linux/connection.c.clog.h.lttng.h @@ -56,7 +56,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, VersionInfoChosenVersionZero, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -81,7 +81,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ClientVersionInfoVersionMismatch, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -105,7 +105,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, VersionInfoOtherVersionZero, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -131,7 +131,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ServerVersionInfoVersionMismatch, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -158,7 +158,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ClientChosenVersionMismatchServerChosenVersi unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -182,7 +182,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ServerVersionInformationPreviousVersionIsCho const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -205,7 +205,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ServerVersionInformationPreviousVersionInOth const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -231,7 +231,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CompatibleVersionNegotiationNotCompatible, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -258,7 +258,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CompatibleVersionNegotiationOriginalVersionN unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -279,7 +279,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, RecvVerNegNoMatch, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -298,7 +298,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, RecvVerNegCryptoError, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -317,7 +317,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ApiEventNoHandler, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -336,7 +336,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, NoReplacementCidForRetire, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -355,7 +355,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, NonActivePathCidRetired, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -374,7 +374,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IgnoreUnreachable, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -400,7 +400,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IgnoreFrameAfterClose, unsigned char, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -421,7 +421,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, InvalidInitialPackets, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -440,7 +440,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UnreachableIgnore, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -459,7 +459,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UnreachableInvalid, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -478,7 +478,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CloseComplete, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -500,7 +500,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, Restart, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -520,7 +520,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CryptoStateDiscard, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -542,8 +542,8 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, SetConfiguration, const void *, arg1, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -562,7 +562,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PeerTPSet, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -585,7 +585,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PeerPreferredAddress, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -606,7 +606,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, NegotiatedDisable1RttEncryption, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -625,7 +625,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CustomCertValidationPending, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -644,7 +644,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, RecvStatelessReset, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -663,7 +663,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, HandshakeConfirmedFrame, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -685,7 +685,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UpdatePacketTolerance, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -708,7 +708,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, FirstCidUsage, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -731,7 +731,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PathDiscarded, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -751,7 +751,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, Unreachable, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -773,7 +773,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, FailedRouteResolution, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -796,7 +796,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UpdatePeerPacketTolerance, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -819,7 +819,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UpdateShareBinding, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -842,7 +842,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UpdateStreamSchedulingScheme, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -865,7 +865,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, LocalInterfaceSet, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -891,7 +891,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CibirIdSet, unsigned char, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -912,7 +912,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ApplySettings, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -934,7 +934,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PhaseShiftUpdated, const void *, arg1, long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(int64_t, arg3, arg3) ) ) @@ -969,7 +969,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, RttUpdatedV2, unsigned int, arg7, unsigned int, arg8), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -994,7 +994,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, NewSrcCidNameCollision, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1013,7 +1013,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ZeroLengthCidRetire, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1035,7 +1035,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateShutdownByPeer, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1058,7 +1058,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateShutdownByTransport, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -1078,7 +1078,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateConnectionShutdownComplete, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1097,7 +1097,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, AbandonInternallyClosed, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1116,7 +1116,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateResumed, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1135,7 +1135,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateResumptionTicketReceived, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1160,7 +1160,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ClientVersionNegotiationCompatibleVersionUpg unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -1187,7 +1187,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, CompatibleVersionUpgradeComplete, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -1211,7 +1211,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateReliableResetNegotiated, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -1237,7 +1237,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicateOneWayDelayNegotiated, unsigned char, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -1264,7 +1264,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicatePeerCertificateReceived, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -1288,7 +1288,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, QueueDatagrams, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -1308,7 +1308,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, RecvVerNeg, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1333,7 +1333,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, VerNegItem, int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -1357,7 +1357,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, DeferDatagram, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -1377,7 +1377,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, DecryptOldKey, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1399,7 +1399,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PossiblePeerKeyUpdate, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1422,7 +1422,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UpdateReadKeyPhase, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1445,7 +1445,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PeerConnFCBlocked, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1471,7 +1471,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, PeerStreamFCBlocked, unsigned short, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -1496,7 +1496,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicatePeerNeedStreamsV2, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -1516,7 +1516,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, IndicatePeerAddrChanged, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1538,7 +1538,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UdpRecvBatch, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -1561,7 +1561,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, UdpRecvDeferred, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -1584,7 +1584,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, DatagramReceiveEnableUpdated, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -1607,7 +1607,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, Disable1RttEncrytionUpdated, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -1627,7 +1627,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ForceKeyUpdate, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1646,7 +1646,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ForceCidUpdate, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1671,7 +1671,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, TestTPSet, unsigned int, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -1721,7 +1721,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnCreated, unsigned char, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -1746,7 +1746,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnLocalAddrAdded, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -1771,7 +1771,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnRemoteAddrAdded, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -1799,7 +1799,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnDestCidAdded, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) @@ -1828,7 +1828,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnSourceCidAdded, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) @@ -1850,7 +1850,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnInitializeComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -1869,7 +1869,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -1888,7 +1888,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnHandleClosed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -1910,8 +1910,8 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnUnregistered, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -1933,8 +1933,8 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnRegistered, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -1959,7 +1959,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnRundown, unsigned short, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -1983,8 +1983,8 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnAssignWorker, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -2006,7 +2006,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnEcnCapable, const void *, arg2, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -2029,7 +2029,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnVersionSet, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -2049,7 +2049,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnHandshakeComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -2071,7 +2071,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -2098,7 +2098,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnDestCidRemoved, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) @@ -2126,7 +2126,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnSetTimer, unsigned char, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -2150,7 +2150,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnExpiredTimer, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -2173,7 +2173,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnExecTimerOper, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -2196,7 +2196,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnShutdownComplete, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -2222,7 +2222,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnAppShutdown, unsigned long long, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -2252,7 +2252,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnTransportShutdown, unsigned char, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -2279,7 +2279,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -2300,7 +2300,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnServerResumeTicket, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -2319,7 +2319,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnHandshakeStart, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -2366,7 +2366,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnPacketRecv, unsigned char, arg4, unsigned short, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) @@ -2388,7 +2388,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnDelayCloseApplicationError, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -2413,7 +2413,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnRecvUdpDatagrams, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -2438,7 +2438,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_C, ConnLocalAddrRemoved, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) diff --git a/src/generated/linux/connection.h.clog.h.lttng.h b/src/generated/linux/connection.h.clog.h.lttng.h index 60a2476d73..0b51042d75 100644 --- a/src/generated/linux/connection.h.clog.h.lttng.h +++ b/src/generated/linux/connection.h.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_H, ConnOutFlowStreamStats, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -44,7 +44,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_H, ConnInFlowStats, const void *, arg2, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -88,7 +88,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_H, ConnStatsV3, const char *, arg9, unsigned int, arg10), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -139,7 +139,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_H, ConnPacketStats, unsigned long long, arg9, unsigned long long, arg10), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) @@ -169,7 +169,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_H, ConnOutFlowBlocked, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -196,7 +196,7 @@ TRACEPOINT_EVENT(CLOG_CONNECTION_H, ConnSourceCidRemoved, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) diff --git a/src/generated/linux/crypto.c.clog.h.lttng.h b/src/generated/linux/crypto.c.clog.h.lttng.h index 9f80e1e8ee..ba3b860ff8 100644 --- a/src/generated/linux/crypto.c.clog.h.lttng.h +++ b/src/generated/linux/crypto.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, IgnoreCryptoFrame, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -36,7 +36,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, DiscardKeyType, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -56,7 +56,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ZeroRttAccepted, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -75,7 +75,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ZeroRttRejected, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -94,7 +94,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, HandshakeConfirmedServer, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -113,7 +113,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, CustomCertValidationSuccess, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -150,7 +150,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, CryptoDump, unsigned int, arg7, unsigned int, arg8), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -181,7 +181,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, CryptoDumpUnacked, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -208,7 +208,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, CryptoDumpUnacked2, unsigned long long, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -229,7 +229,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, NoMoreRoomForCrypto, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -254,7 +254,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, AddCryptoFrame, unsigned short, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -281,7 +281,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, RecoverCrypto, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -308,7 +308,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, AckCrypto, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -338,7 +338,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, RecvCrypto, unsigned long long, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -363,7 +363,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, IndicateConnected, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -386,7 +386,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, DrainCrypto, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -406,7 +406,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, CryptoNotReady, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -454,7 +454,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -478,7 +478,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -501,7 +501,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnWriteKeyUpdated, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -524,7 +524,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnReadKeyUpdated, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -544,7 +544,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnHandshakeComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -570,7 +570,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnSourceCidRemoved, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) @@ -592,7 +592,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnNewPacketKeys, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -614,7 +614,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_C, ConnKeyPhaseChange, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) diff --git a/src/generated/linux/crypto_tls.c.clog.h.lttng.h b/src/generated/linux/crypto_tls.c.clog.h.lttng.h index 5c76d677e4..06eb22974f 100644 --- a/src/generated/linux/crypto_tls.c.clog.h.lttng.h +++ b/src/generated/linux/crypto_tls.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, NoSniPresent, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -39,7 +39,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPReserved, unsigned long long, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -66,7 +66,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPUnknown, unsigned long long, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -90,7 +90,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPStart, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -117,7 +117,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPOriginalDestinationCID, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -140,7 +140,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPIdleTimeout, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -167,7 +167,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPStatelessResetToken, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -190,7 +190,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPMaxUdpPayloadSize, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -213,7 +213,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPInitMaxData, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -236,7 +236,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPInitMaxStreamDataBidiLocal, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -259,7 +259,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPInitMaxStreamDataBidiRemote, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -282,7 +282,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPInitMaxStreamUni, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -305,7 +305,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPMaxBidiStreams, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -328,7 +328,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPMaxUniStreams, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -351,7 +351,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPAckDelayExponent, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -374,7 +374,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPMaxAckDelay, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -394,7 +394,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPDisableMigration, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -413,7 +413,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPPreferredAddress, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -435,7 +435,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPCIDLimit, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -462,7 +462,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPOriginalCID, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -489,7 +489,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPRetrySourceCID, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -512,7 +512,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeMaxDatagramFrameSize, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -532,7 +532,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPDisable1RttEncryption, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -554,7 +554,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPVersionNegotiationExt, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -577,7 +577,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPMinAckDelay, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -603,7 +603,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPCibirEncoding, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -624,7 +624,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPGreaseQuicBit, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -643,7 +643,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPReliableReset, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -665,7 +665,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPTimestamp, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -691,7 +691,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPTest, unsigned short, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -715,7 +715,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, EncodeTPEnd, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -741,7 +741,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPStart, unsigned char, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -769,7 +769,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPOriginalDestinationCID, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -792,7 +792,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPIdleTimeout, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -819,7 +819,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPStatelessResetToken, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -842,7 +842,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPMaxUdpPayloadSize, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -865,7 +865,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPInitMaxData, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -888,7 +888,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPInitMaxStreamDataBidiLocal, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -911,7 +911,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPInitMaxStreamDataBidiRemote, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -934,7 +934,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPInitMaxStreamDataBidiUni, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -957,7 +957,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPMaxBidiStreams, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -980,7 +980,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPMaxUniStreams, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1003,7 +1003,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPAckDelayExponent, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1026,7 +1026,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPMaxAckDelay, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1046,7 +1046,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPDisableActiveMigration, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1065,7 +1065,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPPreferredAddress, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1087,7 +1087,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPCIDLimit, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1114,7 +1114,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPInitialSourceCID, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -1141,7 +1141,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPRetrySourceCID, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -1164,7 +1164,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPMaxDatagramFrameSize, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1190,7 +1190,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPCibirEncoding, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -1211,7 +1211,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPDisable1RttEncryption, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1233,7 +1233,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPVersionNegotiationInfo, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -1256,7 +1256,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPMinAckDelay, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -1276,7 +1276,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPGreaseQuicBit, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1295,7 +1295,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, DecodeTPReliableReset, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -1317,7 +1317,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -1366,7 +1366,7 @@ TRACEPOINT_EVENT(CLOG_CRYPTO_TLS_C, ConnErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) diff --git a/src/generated/linux/cubic.c.clog.h.lttng.h b/src/generated/linux/cubic.c.clog.h.lttng.h index 333bfa5732..783c30da0e 100644 --- a/src/generated/linux/cubic.c.clog.h.lttng.h +++ b/src/generated/linux/cubic.c.clog.h.lttng.h @@ -32,7 +32,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, IndicateDataAcked, unsigned int, arg7, unsigned long long, arg8), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) @@ -69,7 +69,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnCubic, unsigned int, arg5, unsigned int, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -101,7 +101,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnHyStartStateChange, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -126,7 +126,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnCongestionV2, const void *, arg2, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -146,7 +146,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnPersistentCongestion, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -165,7 +165,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnRecoveryExit, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -184,7 +184,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnSpuriousCongestion, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -227,7 +227,7 @@ TRACEPOINT_EVENT(CLOG_CUBIC_C, ConnOutFlowStatsV2, unsigned long long, arg9, unsigned long long, arg10), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) diff --git a/src/generated/linux/datagram.c.clog.h.lttng.h b/src/generated/linux/datagram.c.clog.h.lttng.h index 4fa6526b27..afbfaa39c3 100644 --- a/src/generated/linux/datagram.c.clog.h.lttng.h +++ b/src/generated/linux/datagram.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_DATAGRAM_C, DatagramSendStateChanged, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -37,7 +37,7 @@ TRACEPOINT_EVENT(CLOG_DATAGRAM_C, DatagramSendShutdown, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -62,7 +62,7 @@ TRACEPOINT_EVENT(CLOG_DATAGRAM_C, IndicateDatagramStateChanged, unsigned char, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -92,8 +92,8 @@ TRACEPOINT_EVENT(CLOG_DATAGRAM_C, DatagramSendQueued, unsigned long long, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) ) @@ -117,7 +117,7 @@ TRACEPOINT_EVENT(CLOG_DATAGRAM_C, IndicateDatagramReceived, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -140,7 +140,7 @@ TRACEPOINT_EVENT(CLOG_DATAGRAM_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/datapath_epoll.c.clog.h.lttng.h b/src/generated/linux/datapath_epoll.c.clog.h.lttng.h index 6fe4234b80..af63c3a62c 100644 --- a/src/generated/linux/datapath_epoll.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_epoll.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathRecvEmpty, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -62,7 +62,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -91,7 +91,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathCreated, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -114,7 +114,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -147,7 +147,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathRecv, unsigned int, arg6_len, const void *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -189,7 +189,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathSend, unsigned int, arg7_len, const void *, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/datapath_kqueue.c.clog.h.lttng.h b/src/generated/linux/datapath_kqueue.c.clog.h.lttng.h index 451de97581..80430b7c62 100644 --- a/src/generated/linux/datapath_kqueue.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_kqueue.c.clog.h.lttng.h @@ -43,7 +43,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_KQUEUE_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -78,7 +78,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_KQUEUE_C, DatapathRecv, unsigned int, arg6_len, const void *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -111,7 +111,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_KQUEUE_C, DatapathCreated, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -134,7 +134,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_KQUEUE_C, DatapathDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -170,7 +170,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_KQUEUE_C, DatapathSend, unsigned int, arg7_len, const void *, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/datapath_raw.c.clog.h.lttng.h b/src/generated/linux/datapath_raw.c.clog.h.lttng.h index d121885bfd..5b8ad3ffab 100644 --- a/src/generated/linux/datapath_raw.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw.c.clog.h.lttng.h @@ -51,7 +51,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_C, DatapathRecv, unsigned int, arg6_len, const void *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -93,7 +93,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_C, DatapathSend, unsigned int, arg7_len, const void *, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/datapath_raw_socket.c.clog.h.lttng.h b/src/generated/linux/datapath_raw_socket.c.clog.h.lttng.h index 8679a3802b..66f2d44ad9 100644 --- a/src/generated/linux/datapath_raw_socket.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw_socket.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_C, DatapathTcpAuxBinding, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -58,7 +58,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_C, RouteResolutionEnd, unsigned char, arg8, unsigned char, arg9), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -90,7 +90,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -125,7 +125,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_C, DatapathSendTcpControl, unsigned int, arg6_len, const void *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -167,7 +167,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_C, DatapathSend, unsigned int, arg7_len, const void *, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/datapath_raw_socket_linux.c.clog.h.lttng.h b/src/generated/linux/datapath_raw_socket_linux.c.clog.h.lttng.h index f74685b158..5b04613419 100644 --- a/src/generated/linux/datapath_raw_socket_linux.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw_socket_linux.c.clog.h.lttng.h @@ -22,7 +22,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_LINUX_C, DatapathGetRouteStart, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -51,7 +51,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_LINUX_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -87,7 +87,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_LINUX_C, DatapathResoveShow, const void *, arg5, int, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) diff --git a/src/generated/linux/datapath_raw_socket_win.c.clog.h.lttng.h b/src/generated/linux/datapath_raw_socket_win.c.clog.h.lttng.h index 343928bc40..6295a7c2ae 100644 --- a/src/generated/linux/datapath_raw_socket_win.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw_socket_win.c.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_WIN_C, RouteResolutionStart, unsigned char, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -72,7 +72,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_WIN_C, DatapathGetRouteStart, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -101,7 +101,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_WIN_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -126,7 +126,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_WIN_C, DatapathGetRouteComplete, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -150,7 +150,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_SOCKET_WIN_C, DatapathError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/datapath_raw_win.c.clog.h.lttng.h b/src/generated/linux/datapath_raw_win.c.clog.h.lttng.h index 91f5d538e0..0a79251768 100644 --- a/src/generated/linux/datapath_raw_win.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw_win.c.clog.h.lttng.h @@ -66,7 +66,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_WIN_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) diff --git a/src/generated/linux/datapath_raw_xdp_linux.c.clog.h.lttng.h b/src/generated/linux/datapath_raw_xdp_linux.c.clog.h.lttng.h index 84b8e576da..0a65d87672 100644 --- a/src/generated/linux/datapath_raw_xdp_linux.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw_xdp_linux.c.clog.h.lttng.h @@ -72,7 +72,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, InterfaceFree, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -94,8 +94,8 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, QueueFree, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -306,7 +306,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpInitialize, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -329,7 +329,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpWorkerStart, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -349,7 +349,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpRelease, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -368,7 +368,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpUninitializeComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -387,7 +387,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpUninitialize, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -558,7 +558,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpPartitionShutdown, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -577,7 +577,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpPartitionShutdownComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -596,7 +596,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_LINUX_C, XdpQueueAsyncIoRxComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/generated/linux/datapath_raw_xdp_win.c.clog.h.lttng.h b/src/generated/linux/datapath_raw_xdp_win.c.clog.h.lttng.h index 4307fc726a..30214396e4 100644 --- a/src/generated/linux/datapath_raw_xdp_win.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_raw_xdp_win.c.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, FoundVF, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -44,7 +44,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInitialize, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -67,8 +67,8 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpQueueStart, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -90,7 +90,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpWorkerStart, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -110,7 +110,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpRelease, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -129,7 +129,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpUninitializeComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -148,7 +148,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpUninitialize, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -167,7 +167,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpPartitionShutdown, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -186,7 +186,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpQueueAsyncIoRx, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -205,7 +205,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpQueueAsyncIoTx, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -224,7 +224,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpQueueAsyncIoRxComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -243,7 +243,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpQueueAsyncIoTxComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -262,7 +262,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpPartitionShutdownComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/generated/linux/datapath_unix.c.clog.h.lttng.h b/src/generated/linux/datapath_unix.c.clog.h.lttng.h index 52bb3ececb..889b0b09e4 100644 --- a/src/generated/linux/datapath_unix.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_unix.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_UNIX_C, DatapathResolveHostNameFailed, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/datapath_winkernel.c.clog.h.lttng.h b/src/generated/linux/datapath_winkernel.c.clog.h.lttng.h index bd93a28dcb..6efeb61ee7 100644 --- a/src/generated/linux/datapath_winkernel.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_winkernel.c.clog.h.lttng.h @@ -204,7 +204,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDropEmptyMdl, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -223,7 +223,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDropMissingInfo, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -245,7 +245,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDropTooBig, const void *, arg2, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -265,7 +265,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDropMdlMapFailure, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -284,7 +284,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathFragmented, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -303,7 +303,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDropAllocIoBlockFailure, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -322,7 +322,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDropAllocRecvBufferFailure, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -341,7 +341,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathUroExceeded, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -364,7 +364,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathUnreachableMsg, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -388,7 +388,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathResolveHostNameFailed, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -481,7 +481,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathCreated, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -510,7 +510,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -531,7 +531,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -564,7 +564,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathRecv, unsigned int, arg6_len, const void *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -606,7 +606,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINKERNEL_C, DatapathSend, unsigned int, arg7_len, const void *, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/datapath_winuser.c.clog.h.lttng.h b/src/generated/linux/datapath_winuser.c.clog.h.lttng.h index 2bf4cac555..09933cc4ad 100644 --- a/src/generated/linux/datapath_winuser.c.clog.h.lttng.h +++ b/src/generated/linux/datapath_winuser.c.clog.h.lttng.h @@ -109,7 +109,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathRecvEmpty, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -128,7 +128,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathMissingInfo, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -147,7 +147,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathUroPreallocExceeded, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -166,7 +166,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathShutDownComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -185,7 +185,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathSocketContextComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -211,7 +211,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathUnreachableWithError, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) @@ -237,7 +237,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathTooLarge, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) @@ -310,7 +310,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -339,7 +339,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathCreated, unsigned int, arg4_len, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -362,7 +362,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -395,7 +395,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathRecv, unsigned int, arg6_len, const void *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -437,7 +437,7 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_WINUSER_C, DatapathSend, unsigned int, arg7_len, const void *, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/drvmain.cpp.clog.h.lttng.h b/src/generated/linux/drvmain.cpp.clog.h.lttng.h index 175264b817..f0600bfdd9 100644 --- a/src/generated/linux/drvmain.cpp.clog.h.lttng.h +++ b/src/generated/linux/drvmain.cpp.clog.h.lttng.h @@ -17,8 +17,8 @@ TRACEPOINT_EVENT(CLOG_DRVMAIN_CPP, PerfControlClientCanceledRequest, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -69,7 +69,7 @@ TRACEPOINT_EVENT(CLOG_DRVMAIN_CPP, PerfControlClientCreated, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -88,7 +88,7 @@ TRACEPOINT_EVENT(CLOG_DRVMAIN_CPP, PerfControlClientCleaningUp, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -149,7 +149,7 @@ TRACEPOINT_EVENT(CLOG_DRVMAIN_CPP, PerfControlClientIoctl, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -172,7 +172,7 @@ TRACEPOINT_EVENT(CLOG_DRVMAIN_CPP, PerfControlClientIoctlComplete, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) diff --git a/src/generated/linux/frame.c.clog.h.lttng.h b/src/generated/linux/frame.c.clog.h.lttng.h index bbb7dc77f1..5c25f96c93 100644 --- a/src/generated/linux/frame.c.clog.h.lttng.h +++ b/src/generated/linux/frame.c.clog.h.lttng.h @@ -1695,7 +1695,7 @@ TRACEPOINT_EVENT(CLOG_FRAME_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/library.c.clog.h.lttng.h b/src/generated/linux/library.c.clog.h.lttng.h index 5a7241fdef..28b1c836d8 100644 --- a/src/generated/linux/library.c.clog.h.lttng.h +++ b/src/generated/linux/library.c.clog.h.lttng.h @@ -49,7 +49,7 @@ TRACEPOINT_EVENT(CLOG_LIBRARY_C, LibrarySettingsUpdated, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -484,7 +484,7 @@ TRACEPOINT_EVENT(CLOG_LIBRARY_C, BindingError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/listener.c.clog.h.lttng.h b/src/generated/linux/listener.c.clog.h.lttng.h index 990d1efaed..ce7e4b605e 100644 --- a/src/generated/linux/listener.c.clog.h.lttng.h +++ b/src/generated/linux/listener.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerIndicateStopComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -36,8 +36,8 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerIndicateNewConnection, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -62,7 +62,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerCibirIdSet, unsigned char, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -89,7 +89,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, CibirIdSet, unsigned char, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -114,7 +114,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ApiEnter, const void *, arg3), TP_FIELDS( ctf_integer(unsigned int, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -159,8 +159,8 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerCreated, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -198,7 +198,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -239,7 +239,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -271,8 +271,8 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerStarted, unsigned int, arg5_len, const void *, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) ctf_integer(unsigned int, arg5_len, arg5_len) @@ -295,7 +295,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerStopped, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -317,8 +317,8 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ListenerRundown, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -340,7 +340,7 @@ TRACEPOINT_EVENT(CLOG_LISTENER_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/lookup.c.clog.h.lttng.h b/src/generated/linux/lookup.c.clog.h.lttng.h index a4e4b51354..f64c19a981 100644 --- a/src/generated/linux/lookup.c.clog.h.lttng.h +++ b/src/generated/linux/lookup.c.clog.h.lttng.h @@ -20,9 +20,9 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupCidFound, unsigned int, arg3, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) - ctf_integer_hex(uint64_t, arg4, arg4) + ctf_integer_hex(uint64_t, arg4, (uint64_t)arg4) ) ) @@ -44,7 +44,7 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupCidNotFound, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -70,9 +70,9 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupRemoteHashFound, unsigned int, arg3, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) - ctf_integer_hex(uint64_t, arg4, arg4) + ctf_integer_hex(uint64_t, arg4, (uint64_t)arg4) ) ) @@ -94,7 +94,7 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupRemoteHashNotFound, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -120,8 +120,8 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupCidInsert, const void *, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(unsigned int, arg4, arg4) ) ) @@ -147,8 +147,8 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupRemoteHashInsert, const void *, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(unsigned int, arg4, arg4) ) ) @@ -171,7 +171,7 @@ TRACEPOINT_EVENT(CLOG_LOOKUP_C, LookupCidRemoved, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) diff --git a/src/generated/linux/loss_detection.c.clog.h.lttng.h b/src/generated/linux/loss_detection.c.clog.h.lttng.h index 8743ed45e1..ca2cafe4e4 100644 --- a/src/generated/linux/loss_detection.c.clog.h.lttng.h +++ b/src/generated/linux/loss_detection.c.clog.h.lttng.h @@ -260,7 +260,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, HandshakeConfirmedAck, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -282,7 +282,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, PathMinMtuValidated, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -305,7 +305,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, PathValidationTimeout, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -328,7 +328,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ScheduleProbe, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -348,7 +348,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, KeyChangeConfirmed, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -376,7 +376,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ConnLossDetectionTimerSet, unsigned int, arg4, unsigned short, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) @@ -430,7 +430,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ConnPacketLost, unsigned char, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -458,7 +458,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ConnPacketACKed, unsigned long long, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -482,7 +482,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -505,7 +505,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ConnEcnCapable, const void *, arg2, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -542,7 +542,7 @@ TRACEPOINT_EVENT(CLOG_LOSS_DETECTION_C, ConnEcnFailed, long long, arg7, unsigned short, arg8), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(int, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) diff --git a/src/generated/linux/mtu_discovery.c.clog.h.lttng.h b/src/generated/linux/mtu_discovery.c.clog.h.lttng.h index b7b349acf3..377d2b25d0 100644 --- a/src/generated/linux/mtu_discovery.c.clog.h.lttng.h +++ b/src/generated/linux/mtu_discovery.c.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_MTU_DISCOVERY_C, MtuSearchComplete, unsigned char, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -47,7 +47,7 @@ TRACEPOINT_EVENT(CLOG_MTU_DISCOVERY_C, MtuSearching, unsigned char, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -77,7 +77,7 @@ TRACEPOINT_EVENT(CLOG_MTU_DISCOVERY_C, MtuPathInitialized, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -105,7 +105,7 @@ TRACEPOINT_EVENT(CLOG_MTU_DISCOVERY_C, PathMtuUpdated, unsigned char, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -135,7 +135,7 @@ TRACEPOINT_EVENT(CLOG_MTU_DISCOVERY_C, MtuDiscarded, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -166,7 +166,7 @@ TRACEPOINT_EVENT(CLOG_MTU_DISCOVERY_C, MtuIncorrectSize, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) diff --git a/src/generated/linux/nmrprovider.c.clog.h.lttng.h b/src/generated/linux/nmrprovider.c.clog.h.lttng.h index 39bfd1fa81..bc34a9a6f2 100644 --- a/src/generated/linux/nmrprovider.c.clog.h.lttng.h +++ b/src/generated/linux/nmrprovider.c.clog.h.lttng.h @@ -35,7 +35,7 @@ TRACEPOINT_EVENT(CLOG_NMRPROVIDER_C, ProviderAttachClient, unsigned int, arg8, unsigned long long, arg9), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -61,7 +61,7 @@ TRACEPOINT_EVENT(CLOG_NMRPROVIDER_C, ProviderDetachClient, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/generated/linux/operation.h.clog.h.lttng.h b/src/generated/linux/operation.h.clog.h.lttng.h index d44c441d7c..6624f0a77d 100644 --- a/src/generated/linux/operation.h.clog.h.lttng.h +++ b/src/generated/linux/operation.h.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_OPERATION_H, ConnExecApiOper, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -40,7 +40,7 @@ TRACEPOINT_EVENT(CLOG_OPERATION_H, ConnExecTimerOper, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -63,7 +63,7 @@ TRACEPOINT_EVENT(CLOG_OPERATION_H, ConnExecOper, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) diff --git a/src/generated/linux/packet.c.clog.h.lttng.h b/src/generated/linux/packet.c.clog.h.lttng.h index 7d9509f04d..a00a4d2c3b 100644 --- a/src/generated/linux/packet.c.clog.h.lttng.h +++ b/src/generated/linux/packet.c.clog.h.lttng.h @@ -329,7 +329,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_C, ConnDropPacket, const void *, arg4, const char *, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -364,7 +364,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_C, BindingDropPacket, const void *, arg4, const char *, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ctf_integer(unsigned int, arg4_len, arg4_len) @@ -402,7 +402,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_C, ConnDropPacketEx, const void *, arg5, const char *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) @@ -441,7 +441,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_C, BindingDropPacketEx, const void *, arg5, const char *, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4_len, arg4_len) ctf_sequence(char, arg4, arg4, unsigned int, arg4_len) diff --git a/src/generated/linux/packet_builder.c.clog.h.lttng.h b/src/generated/linux/packet_builder.c.clog.h.lttng.h index d535bfb8e9..a4643d8b06 100644 --- a/src/generated/linux/packet_builder.c.clog.h.lttng.h +++ b/src/generated/linux/packet_builder.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, NoSrcCidAvailable, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -36,7 +36,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, GetPacketTypeFailure, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -59,7 +59,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, PacketBuilderSendBatch, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -82,7 +82,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -192,7 +192,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, ConnErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -222,7 +222,7 @@ TRACEPOINT_EVENT(CLOG_PACKET_BUILDER_C, ConnPacketSent, unsigned char, arg4, unsigned short, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) diff --git a/src/generated/linux/path.c.clog.h.lttng.h b/src/generated/linux/path.c.clog.h.lttng.h index 80565a0b08..eb57556270 100644 --- a/src/generated/linux/path.c.clog.h.lttng.h +++ b/src/generated/linux/path.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_PATH_C, PathInitialized, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -40,7 +40,7 @@ TRACEPOINT_EVENT(CLOG_PATH_C, PathRemoved, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -66,7 +66,7 @@ TRACEPOINT_EVENT(CLOG_PATH_C, PathValidated, unsigned char, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_string(arg4, arg4) ) @@ -93,7 +93,7 @@ TRACEPOINT_EVENT(CLOG_PATH_C, PathActive, unsigned char, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -117,7 +117,7 @@ TRACEPOINT_EVENT(CLOG_PATH_C, PathQeoEnabled, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -140,7 +140,7 @@ TRACEPOINT_EVENT(CLOG_PATH_C, PathQeoDisabled, const void *, arg1, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ) ) diff --git a/src/generated/linux/platform_worker.c.clog.h.lttng.h b/src/generated/linux/platform_worker.c.clog.h.lttng.h index 65db127d6d..7f82dccbd4 100644 --- a/src/generated/linux/platform_worker.c.clog.h.lttng.h +++ b/src/generated/linux/platform_worker.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_PLATFORM_WORKER_C, PlatformWorkerThreadStart, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -33,7 +33,7 @@ TRACEPOINT_EVENT(CLOG_PLATFORM_WORKER_C, PlatformWorkerThreadStop, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/generated/linux/registration.c.clog.h.lttng.h b/src/generated/linux/registration.c.clog.h.lttng.h index d3ed2030ae..34713d4c36 100644 --- a/src/generated/linux/registration.c.clog.h.lttng.h +++ b/src/generated/linux/registration.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_REGISTRATION_C, RegistrationVerifierEnabled, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -37,7 +37,7 @@ TRACEPOINT_EVENT(CLOG_REGISTRATION_C, ApiEnter, const void *, arg3), TP_FIELDS( ctf_integer(unsigned int, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -85,7 +85,7 @@ TRACEPOINT_EVENT(CLOG_REGISTRATION_C, RegistrationCreatedV2, const char *, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -125,7 +125,7 @@ TRACEPOINT_EVENT(CLOG_REGISTRATION_C, RegistrationCleanup, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -166,7 +166,7 @@ TRACEPOINT_EVENT(CLOG_REGISTRATION_C, RegistrationRundownV2, const char *, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) diff --git a/src/generated/linux/send.c.clog.h.lttng.h b/src/generated/linux/send.c.clog.h.lttng.h index b16358a417..6cc081067e 100644 --- a/src/generated/linux/send.c.clog.h.lttng.h +++ b/src/generated/linux/send.c.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, SetSendFlag, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -44,7 +44,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, ClearSendFlags, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -64,7 +64,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, EcnValidationUnknown, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -89,7 +89,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, ScheduleSendFlags, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -113,7 +113,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, RemoveSendFlagsMsg, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -133,7 +133,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, AmplificationProtectionBlocked, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -155,7 +155,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, SendFlushComplete, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -178,7 +178,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, StartAckDelayTimer, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -201,7 +201,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, ConnQueueSendFlush, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -224,7 +224,7 @@ TRACEPOINT_EVENT(CLOG_SEND_C, ConnFlushSend, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) diff --git a/src/generated/linux/send_buffer.c.clog.h.lttng.h b/src/generated/linux/send_buffer.c.clog.h.lttng.h index 151bfb3a5c..fdd456613c 100644 --- a/src/generated/linux/send_buffer.c.clog.h.lttng.h +++ b/src/generated/linux/send_buffer.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_SEND_BUFFER_C, IndicateIdealSendBuffer, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) diff --git a/src/generated/linux/settings.c.clog.h b/src/generated/linux/settings.c.clog.h index 414b8eb1e9..ddf319a195 100644 --- a/src/generated/linux/settings.c.clog.h +++ b/src/generated/linux/settings.c.clog.h @@ -782,6 +782,21 @@ tracepoint(CLOG_SETTINGS_C, SettingNetStatsEventEnabled , arg2);\ +/*---------------------------------------------------------- +// Decoder Ring for SettingsStreamMultiReceiveEnabled +// [sett] StreamMultiReceiveEnabled= %hhu +// QuicTraceLogVerbose(SettingsStreamMultiReceiveEnabled, "[sett] StreamMultiReceiveEnabled= %hhu", Settings->StreamMultiReceiveEnabled); +// arg2 = arg2 = Settings->StreamMultiReceiveEnabled = arg2 +----------------------------------------------------------*/ +#ifndef _clog_3_ARGS_TRACE_SettingsStreamMultiReceiveEnabled +#define _clog_3_ARGS_TRACE_SettingsStreamMultiReceiveEnabled(uniqueId, encoded_arg_string, arg2)\ +tracepoint(CLOG_SETTINGS_C, SettingsStreamMultiReceiveEnabled , arg2);\ + +#endif + + + + /*---------------------------------------------------------- // Decoder Ring for SettingDumpLFixedServerID // [sett] FixedServerID = %u @@ -812,6 +827,21 @@ tracepoint(CLOG_SETTINGS_C, SettingDumpStreamRecvBufferDefault , arg2);\ +/*---------------------------------------------------------- +// Decoder Ring for SettingStreamMultiReceiveEnabled +// [sett] StreamMultiReceiveEnabled = %hhu +// QuicTraceLogVerbose(SettingStreamMultiReceiveEnabled, "[sett] StreamMultiReceiveEnabled = %hhu", Settings->StreamMultiReceiveEnabled); +// arg2 = arg2 = Settings->StreamMultiReceiveEnabled = arg2 +----------------------------------------------------------*/ +#ifndef _clog_3_ARGS_TRACE_SettingStreamMultiReceiveEnabled +#define _clog_3_ARGS_TRACE_SettingStreamMultiReceiveEnabled(uniqueId, encoded_arg_string, arg2)\ +tracepoint(CLOG_SETTINGS_C, SettingStreamMultiReceiveEnabled , arg2);\ + +#endif + + + + /*---------------------------------------------------------- // Decoder Ring for SettingsLoadInvalidAcceptableVersion // Invalid AcceptableVersion loaded from storage! 0x%x at position %d diff --git a/src/generated/linux/settings.c.clog.h.lttng.h b/src/generated/linux/settings.c.clog.h.lttng.h index 82d16f669e..c168d96477 100644 --- a/src/generated/linux/settings.c.clog.h.lttng.h +++ b/src/generated/linux/settings.c.clog.h.lttng.h @@ -810,6 +810,22 @@ TRACEPOINT_EVENT(CLOG_SETTINGS_C, SettingNetStatsEventEnabled, +/*---------------------------------------------------------- +// Decoder Ring for SettingsStreamMultiReceiveEnabled +// [sett] StreamMultiReceiveEnabled= %hhu +// QuicTraceLogVerbose(SettingsStreamMultiReceiveEnabled, "[sett] StreamMultiReceiveEnabled= %hhu", Settings->StreamMultiReceiveEnabled); +// arg2 = arg2 = Settings->StreamMultiReceiveEnabled = arg2 +----------------------------------------------------------*/ +TRACEPOINT_EVENT(CLOG_SETTINGS_C, SettingsStreamMultiReceiveEnabled, + TP_ARGS( + unsigned char, arg2), + TP_FIELDS( + ctf_integer(unsigned char, arg2, arg2) + ) +) + + + /*---------------------------------------------------------- // Decoder Ring for SettingDumpLFixedServerID // [sett] FixedServerID = %u @@ -842,6 +858,22 @@ TRACEPOINT_EVENT(CLOG_SETTINGS_C, SettingDumpStreamRecvBufferDefault, +/*---------------------------------------------------------- +// Decoder Ring for SettingStreamMultiReceiveEnabled +// [sett] StreamMultiReceiveEnabled = %hhu +// QuicTraceLogVerbose(SettingStreamMultiReceiveEnabled, "[sett] StreamMultiReceiveEnabled = %hhu", Settings->StreamMultiReceiveEnabled); +// arg2 = arg2 = Settings->StreamMultiReceiveEnabled = arg2 +----------------------------------------------------------*/ +TRACEPOINT_EVENT(CLOG_SETTINGS_C, SettingStreamMultiReceiveEnabled, + TP_ARGS( + unsigned char, arg2), + TP_FIELDS( + ctf_integer(unsigned char, arg2, arg2) + ) +) + + + /*---------------------------------------------------------- // Decoder Ring for SettingsLoadInvalidAcceptableVersion // Invalid AcceptableVersion loaded from storage! 0x%x at position %d diff --git a/src/generated/linux/stream.c.clog.h.lttng.h b/src/generated/linux/stream.c.clog.h.lttng.h index eee0344e23..4059b2a305 100644 --- a/src/generated/linux/stream.c.clog.h.lttng.h +++ b/src/generated/linux/stream.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, CloseWithoutShutdown, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -33,7 +33,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, EventSilentDiscard, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -52,7 +52,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, ShutdownImmediatePendingReliableReset, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -74,7 +74,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, UpdatePriority, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -94,7 +94,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, MultipleReliableResetSendNotSupported, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -116,7 +116,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, ReliableSendOffsetSet, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -136,7 +136,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, ConfiguredForDelayedIDFC, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -164,7 +164,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, IndicateStartComplete, unsigned long long, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -201,7 +201,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, IndicateStreamShutdownComplete, unsigned long long, arg6, unsigned int, arg7), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -228,8 +228,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamAlloc, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -248,7 +248,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -276,8 +276,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamCreated, unsigned long long, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) ) @@ -301,7 +301,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamSendState, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -324,7 +324,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamRecvState, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -353,8 +353,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamRundown, unsigned long long, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) ) @@ -378,7 +378,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_C, StreamOutFlowBlocked, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) diff --git a/src/generated/linux/stream.h.clog.h.lttng.h b/src/generated/linux/stream.h.clog.h.lttng.h index b362d53fe1..2572470c0d 100644 --- a/src/generated/linux/stream.h.clog.h.lttng.h +++ b/src/generated/linux/stream.h.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_H, StreamOutFlowBlocked, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) diff --git a/src/generated/linux/stream_recv.c.clog.h.lttng.h b/src/generated/linux/stream_recv.c.clog.h.lttng.h index 87d5cf587b..f750fe9c00 100644 --- a/src/generated/linux/stream_recv.c.clog.h.lttng.h +++ b/src/generated/linux/stream_recv.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, ReliableResetNotNegotiatedError, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -33,7 +33,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, ResetEarly, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -52,7 +52,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, ResetTooBig, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -71,7 +71,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, ReceiveTooBig, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -90,7 +90,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, ReceiveBeyondFlowControl, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -109,7 +109,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, RemoteCloseReset, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -131,7 +131,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, ReliableRecvOffsetSet, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -151,7 +151,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, LocalCloseStopSending, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -170,7 +170,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, TreatFinAsReset, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -189,7 +189,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, QueueRecvFlush, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -211,7 +211,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IndicatePeerSendAbort, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -234,7 +234,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IndicatePeerReceiveAborted, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -254,7 +254,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IgnoreRecvAfterClose, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -273,7 +273,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IgnoreRecvAfterAbort, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -292,7 +292,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, FlowControlExhausted, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -320,7 +320,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, Receive, unsigned long long, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -345,7 +345,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, RemoteBlocked, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -377,7 +377,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IncreaseRxBuffer, unsigned long long, arg5, unsigned long long, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) @@ -400,7 +400,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, UpdateFlowControl, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -419,7 +419,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IgnoreRecvFlush, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -438,7 +438,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, IndicatePeerSendShutdown, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -460,7 +460,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, StreamRecvState, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -506,7 +506,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, StreamError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -529,7 +529,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, StreamReceiveFrame, const void *, arg2, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -549,7 +549,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, StreamReceiveFrameComplete, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -577,7 +577,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, StreamAppReceive, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -602,7 +602,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_RECV_C, StreamAppReceiveComplete, const void *, arg2, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ) ) diff --git a/src/generated/linux/stream_send.c.clog.h.lttng.h b/src/generated/linux/stream_send.c.clog.h.lttng.h index 8bc0682ee1..c2ffd27b16 100644 --- a/src/generated/linux/stream_send.c.clog.h.lttng.h +++ b/src/generated/linux/stream_send.c.clog.h.lttng.h @@ -14,7 +14,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, IndicateSendShutdownComplete, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -36,8 +36,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, IndicateSendCanceled, const void *, arg1, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -59,8 +59,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, IndicateSendComplete, const void *, arg1, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -91,8 +91,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, SendQueued, unsigned long long, arg5, unsigned int, arg6), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) ctf_integer(unsigned int, arg6, arg6) @@ -114,7 +114,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, NoMoreRoom, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -133,7 +133,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, NoMoreFrames, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -161,7 +161,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, AddFrame, unsigned short, arg4, unsigned char, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned char, arg5, arg5) @@ -183,7 +183,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, RecoverOpen, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -202,7 +202,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, RecoverFin, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -227,7 +227,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, RecoverRange, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -257,7 +257,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, AckRangeMsg, unsigned long long, arg4, unsigned short, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(int, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) @@ -282,7 +282,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, Send0RttUpdated, const void *, arg1, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ) ) @@ -302,7 +302,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, SendQueueDrained, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -348,7 +348,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, SendDump, unsigned long long, arg10, unsigned long long, arg11), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ctf_integer(uint64_t, arg5, arg5) @@ -382,7 +382,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, SendDumpAck, unsigned long long, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -406,7 +406,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, StreamSendState, const void *, arg2, unsigned char, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ) ) @@ -429,7 +429,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SEND_C, StreamWriteFrames, const void *, arg2, unsigned long long, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) ) ) diff --git a/src/generated/linux/stream_set.c.clog.h.lttng.h b/src/generated/linux/stream_set.c.clog.h.lttng.h index 825a7f6727..6cf32fb515 100644 --- a/src/generated/linux/stream_set.c.clog.h.lttng.h +++ b/src/generated/linux/stream_set.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, NotAccepted, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -37,7 +37,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, IndicatePeerAccepted, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -56,7 +56,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, ConfiguredForDelayedIDFC, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -81,7 +81,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, MaxStreamCountUpdated, unsigned short, arg3, unsigned char, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned char, arg4, arg4) ) @@ -108,7 +108,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, IndicateStreamsAvailable, unsigned short, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -135,7 +135,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, PeerStreamCountsUpdated, unsigned char, arg3, unsigned long long, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned char, arg3, arg3) ctf_integer(uint64_t, arg4, arg4) ) @@ -162,8 +162,8 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, IndicatePeerStreamStarted, const void *, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ctf_integer(unsigned int, arg4, arg4) ) ) @@ -209,7 +209,7 @@ TRACEPOINT_EVENT(CLOG_STREAM_SET_C, ConnError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) diff --git a/src/generated/linux/timer_wheel.c.clog.h.lttng.h b/src/generated/linux/timer_wheel.c.clog.h.lttng.h index d8ef1d39a6..e3fab5f42c 100644 --- a/src/generated/linux/timer_wheel.c.clog.h.lttng.h +++ b/src/generated/linux/timer_wheel.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_TIMER_WHEEL_C, TimerWheelResize, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -37,7 +37,7 @@ TRACEPOINT_EVENT(CLOG_TIMER_WHEEL_C, TimerWheelNextExpirationNull, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -62,9 +62,9 @@ TRACEPOINT_EVENT(CLOG_TIMER_WHEEL_C, TimerWheelNextExpiration, unsigned long long, arg3, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(uint64_t, arg3, arg3) - ctf_integer_hex(uint64_t, arg4, arg4) + ctf_integer_hex(uint64_t, arg4, (uint64_t)arg4) ) ) @@ -86,8 +86,8 @@ TRACEPOINT_EVENT(CLOG_TIMER_WHEEL_C, TimerWheelRemoveConnection, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -109,8 +109,8 @@ TRACEPOINT_EVENT(CLOG_TIMER_WHEEL_C, TimerWheelUpdateConnection, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -129,7 +129,7 @@ TRACEPOINT_EVENT(CLOG_TIMER_WHEEL_C, StillInTimerWheel, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) diff --git a/src/generated/linux/tls_openssl.c.clog.h.lttng.h b/src/generated/linux/tls_openssl.c.clog.h.lttng.h index 65fd3d19f2..950f2aade4 100644 --- a/src/generated/linux/tls_openssl.c.clog.h.lttng.h +++ b/src/generated/linux/tls_openssl.c.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslAlert, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -44,7 +44,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslQuicDataErrorStr, const void *, arg1, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ) ) @@ -73,7 +73,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslHandshakeErrorStr, const char *, arg4, int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_string(arg3, arg3) ctf_string(arg4, arg4) ctf_integer(int, arg5, arg5) @@ -98,7 +98,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslHandshakeError, const void *, arg1, int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(int, arg3, arg3) ) ) @@ -118,7 +118,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslAlpnNegotiationFailure, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -137,7 +137,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslInvalidAlpnLength, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -156,7 +156,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslNoMatchingAlpn, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -175,7 +175,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslMissingTransportParameters, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -197,7 +197,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslHandshakeDataStart, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -220,7 +220,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSsl1RttDataStart, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -243,7 +243,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslOnRecvTicket, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -266,7 +266,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslOnSetTicket, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -286,7 +286,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslHandshakeComplete, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -305,7 +305,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslHandshakeResumed, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -327,7 +327,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslNewEncryptionSecrets, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -353,7 +353,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslAddHandshakeData, unsigned long long, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(uint64_t, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -377,7 +377,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslTickedDecrypted, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -400,7 +400,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslRecvTicketData, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -420,7 +420,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslContextCreated, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -439,7 +439,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslContextCleaningUp, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -461,7 +461,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslSendTicketData, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -484,7 +484,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, OpenSslProcessData, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -507,7 +507,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, TlsError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -575,7 +575,7 @@ TRACEPOINT_EVENT(CLOG_TLS_OPENSSL_C, TlsErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) diff --git a/src/generated/linux/tls_schannel.c.clog.h.lttng.h b/src/generated/linux/tls_schannel.c.clog.h.lttng.h index ce813c8009..b23cf5d65b 100644 --- a/src/generated/linux/tls_schannel.c.clog.h.lttng.h +++ b/src/generated/linux/tls_schannel.c.clog.h.lttng.h @@ -81,7 +81,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelOutBufferTooSmall, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -103,7 +103,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelHandshakeComplete, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -126,7 +126,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelConsumedBytes, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -146,7 +146,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelReadHandshakeStart, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -165,7 +165,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelRead1RttStart, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -187,7 +187,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelWriteHandshakeStart, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -210,7 +210,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelWrite1RttStart, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -233,7 +233,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelProducedData, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -256,7 +256,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelMissingData, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -286,7 +286,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelTransParamsBufferTooSmall, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -307,7 +307,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelContextCreated, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -326,7 +326,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelContextCleaningUp, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -354,7 +354,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelKeyReady, unsigned short, arg4, unsigned short, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ctf_integer(unsigned short, arg5, arg5) @@ -379,7 +379,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelIgnoringTicket, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -402,7 +402,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, SchannelProcessingData, const void *, arg1, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -490,7 +490,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, TlsError, const void *, arg2, const char *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_string(arg3, arg3) ) ) @@ -516,7 +516,7 @@ TRACEPOINT_EVENT(CLOG_TLS_SCHANNEL_C, TlsErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) diff --git a/src/generated/linux/version_neg.c.clog.h.lttng.h b/src/generated/linux/version_neg.c.clog.h.lttng.h index c799228d5a..992f0b69ff 100644 --- a/src/generated/linux/version_neg.c.clog.h.lttng.h +++ b/src/generated/linux/version_neg.c.clog.h.lttng.h @@ -17,7 +17,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, VersionInfoDecodeFailed1, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -40,7 +40,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, VersionInfoDecodeFailed2, const void *, arg1, unsigned short, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ) ) @@ -66,7 +66,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, ServerVersionInfoDecodeFailed3, unsigned short, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -93,7 +93,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, ServerVersionInfoDecodeFailed4, unsigned short, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -120,7 +120,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, ServerVersionInfoDecoded, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -147,7 +147,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, ServerVersionNegotiationInfoEncoded, unsigned int, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -181,7 +181,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, ClientVersionInfoEncoded, unsigned int, arg4, unsigned int, arg5), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned int, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ctf_integer(unsigned int, arg5, arg5) @@ -207,7 +207,7 @@ TRACEPOINT_EVENT(CLOG_VERSION_NEG_C, ConnVNEOtherVersionList, unsigned int, arg3_len, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3_len, arg3_len) ctf_sequence(char, arg3, arg3, unsigned int, arg3_len) ) diff --git a/src/generated/linux/worker.c.clog.h.lttng.h b/src/generated/linux/worker.c.clog.h.lttng.h index 3ce58693c3..baf33eb5bd 100644 --- a/src/generated/linux/worker.c.clog.h.lttng.h +++ b/src/generated/linux/worker.c.clog.h.lttng.h @@ -20,7 +20,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, IndicateIdealProcChanged, unsigned short, arg3, unsigned short, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ctf_integer(unsigned short, arg3, arg3) ctf_integer(unsigned short, arg4, arg4) ) @@ -41,7 +41,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, AbandonOnLibShutdown, TP_ARGS( const void *, arg1), TP_FIELDS( - ctf_integer_hex(uint64_t, arg1, arg1) + ctf_integer_hex(uint64_t, arg1, (uint64_t)arg1) ) ) @@ -66,9 +66,9 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerCreated, unsigned short, arg3, const void *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned short, arg3, arg3) - ctf_integer_hex(uint64_t, arg4, arg4) + ctf_integer_hex(uint64_t, arg4, (uint64_t)arg4) ) ) @@ -93,7 +93,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerErrorStatus, unsigned int, arg3, const char *, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ctf_string(arg4, arg4) ) @@ -114,7 +114,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerCleanup, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -133,7 +133,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerDestroyed, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -155,8 +155,8 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, ConnAssignWorker, const void *, arg2, const void *, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) - ctf_integer_hex(uint64_t, arg3, arg3) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) + ctf_integer_hex(uint64_t, arg3, (uint64_t)arg3) ) ) @@ -178,7 +178,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, ConnScheduleState, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -201,7 +201,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerQueueDelayUpdated, const void *, arg2, unsigned int, arg3), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned int, arg3, arg3) ) ) @@ -227,7 +227,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerActivityStateUpdated, unsigned char, arg3, unsigned int, arg4), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ctf_integer(unsigned char, arg3, arg3) ctf_integer(unsigned int, arg4, arg4) ) @@ -248,7 +248,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerStart, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) @@ -267,7 +267,7 @@ TRACEPOINT_EVENT(CLOG_WORKER_C, WorkerStop, TP_ARGS( const void *, arg2), TP_FIELDS( - ctf_integer_hex(uint64_t, arg2, arg2) + ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2) ) ) diff --git a/src/inc/msquic.h b/src/inc/msquic.h index 23c6b36647..0f7649ee82 100644 --- a/src/inc/msquic.h +++ b/src/inc/msquic.h @@ -685,7 +685,8 @@ typedef struct QUIC_SETTINGS { uint64_t ReliableResetEnabled : 1; uint64_t OneWayDelayEnabled : 1; uint64_t NetStatsEventEnabled : 1; - uint64_t RESERVED : 22; + uint64_t StreamMultiReceiveEnabled : 1; + uint64_t RESERVED : 21; #else uint64_t RESERVED : 26; #endif @@ -735,7 +736,8 @@ typedef struct QUIC_SETTINGS { uint64_t ReliableResetEnabled : 1; uint64_t OneWayDelayEnabled : 1; uint64_t NetStatsEventEnabled : 1; - uint64_t ReservedFlags : 59; + uint64_t StreamMultiReceiveEnabled : 1; + uint64_t ReservedFlags : 58; #else uint64_t ReservedFlags : 63; #endif diff --git a/src/inc/msquic.hpp b/src/inc/msquic.hpp index 04e6ec4d04..5b911abbf6 100644 --- a/src/inc/msquic.hpp +++ b/src/inc/msquic.hpp @@ -587,6 +587,7 @@ class MsQuicSettings : public QUIC_SETTINGS { MsQuicSettings& SetDisconnectTimeoutMs(uint32_t Value) { DisconnectTimeoutMs = Value; IsSet.DisconnectTimeoutMs = TRUE; return *this; } MsQuicSettings& SetPeerBidiStreamCount(uint16_t Value) { PeerBidiStreamCount = Value; IsSet.PeerBidiStreamCount = TRUE; return *this; } MsQuicSettings& SetPeerUnidiStreamCount(uint16_t Value) { PeerUnidiStreamCount = Value; IsSet.PeerUnidiStreamCount = TRUE; return *this; } + MsQuicSettings& SetStreamRecvWindowDefault(uint32_t Value) { StreamRecvWindowDefault = Value; IsSet.StreamRecvWindowDefault = TRUE; return *this; } MsQuicSettings& SetMaxBytesPerKey(uint64_t Value) { MaxBytesPerKey = Value; IsSet.MaxBytesPerKey = TRUE; return *this; } MsQuicSettings& SetMaxAckDelayMs(uint32_t Value) { MaxAckDelayMs = Value; IsSet.MaxAckDelayMs = TRUE; return *this; } MsQuicSettings& SetMaximumMtu(uint16_t Mtu) { MaximumMtu = Mtu; IsSet.MaximumMtu = TRUE; return *this; } @@ -604,6 +605,7 @@ class MsQuicSettings : public QUIC_SETTINGS { MsQuicSettings& SetReliableResetEnabled(bool value) { ReliableResetEnabled = value; IsSet.ReliableResetEnabled = TRUE; return *this; } MsQuicSettings& SetOneWayDelayEnabled(bool value) { OneWayDelayEnabled = value; IsSet.OneWayDelayEnabled = TRUE; return *this; } MsQuicSettings& SetNetStatsEventEnabled(bool value) { NetStatsEventEnabled = value; IsSet.NetStatsEventEnabled = TRUE; return *this; } + MsQuicSettings& SetStreamMultiReceiveEnabled(bool value) { StreamMultiReceiveEnabled = value; IsSet.StreamMultiReceiveEnabled = TRUE; return *this; } #endif QUIC_STATUS diff --git a/src/inc/msquic.ver b/src/inc/msquic.ver index ea8d504707..98c74522d5 100644 --- a/src/inc/msquic.ver +++ b/src/inc/msquic.ver @@ -8,7 +8,7 @@ #endif #ifndef VER_MINOR -#define VER_MINOR 4 +#define VER_MINOR 5 #endif #ifndef VER_PATCH diff --git a/src/inc/msquichelper.h b/src/inc/msquichelper.h index d7d2eb2db5..0da9b4eb40 100644 --- a/src/inc/msquichelper.h +++ b/src/inc/msquichelper.h @@ -257,6 +257,11 @@ DecodeHexBuffer( return HexBufferLen; } +#if defined(__GNUC__) && (__GNUC__ >= 13) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + inline void EncodeHexBuffer( @@ -272,6 +277,10 @@ EncodeHexBuffer( } } +#if defined(__GNUC__) && (__GNUC__ >= 13) +#pragma GCC diagnostic pop +#endif + #if defined(__cplusplus) // diff --git a/src/manifest/clog.sidecar b/src/manifest/clog.sidecar index 6963c9cd4b..226b674417 100644 --- a/src/manifest/clog.sidecar +++ b/src/manifest/clog.sidecar @@ -5644,6 +5644,22 @@ ], "macroName": "QuicTraceLogStreamVerbose" }, + "IgnoreRecvFlushByReadPending": { + "ModuleProperites": {}, + "TraceString": "[strm][%p] Ignoring recv flush (ReadPendingLenght=%lu)", + "UniqueId": "IgnoreRecvFlushByReadPending", + "splitArgs": [ + { + "DefinationEncoding": "p", + "MacroVariableName": "arg1" + }, + { + "DefinationEncoding": "lu", + "MacroVariableName": "arg3" + } + ], + "macroName": "QuicTraceLogStreamVerbose" + }, "IgnoreUnreachable": { "ModuleProperites": {}, "TraceString": "[conn][%p] Ignoring received unreachable event (inline)", @@ -10994,6 +11010,30 @@ ], "macroName": "QuicTraceLogError" }, + "SettingsStreamMultiReceiveEnabled": { + "ModuleProperites": {}, + "TraceString": "[sett] StreamMultiReceiveEnabled= %hhu", + "UniqueId": "SettingsStreamMultiReceiveEnabled", + "splitArgs": [ + { + "DefinationEncoding": "hhu", + "MacroVariableName": "arg2" + } + ], + "macroName": "QuicTraceLogVerbose" + }, + "SettingStreamMultiReceiveEnabled": { + "ModuleProperites": {}, + "TraceString": "[sett] StreamMultiReceiveEnabled = %hhu", + "UniqueId": "SettingStreamMultiReceiveEnabled", + "splitArgs": [ + { + "DefinationEncoding": "hhu", + "MacroVariableName": "arg2" + } + ], + "macroName": "QuicTraceLogVerbose" + }, "ShutdownImmediatePendingReliableReset": { "ModuleProperites": {}, "TraceString": "[strm][%p] Invalid immediate shutdown request (pending reliable reset).", @@ -14896,6 +14936,11 @@ "TraceID": "IgnoreRecvFlush", "EncodingString": "[strm][%p] Ignoring recv flush (recv disabled)" }, + { + "UniquenessHash": "1537935d-ab2d-521e-a290-e59e29d2626d", + "TraceID": "IgnoreRecvFlushByReadPending", + "EncodingString": "[strm][%p] Ignoring recv flush (ReadPendingLenght=%llu)" + }, { "UniquenessHash": "1e752977-c5b3-6034-4b89-414f9c6ff50f", "TraceID": "IgnoreUnreachable", @@ -16651,6 +16696,16 @@ "TraceID": "SettingsLoadInvalidOfferedVersion", "EncodingString": "Invalid OfferedVersion loaded from storage! 0x%x at position %d" }, + { + "UniquenessHash": "7db0f817-cc89-749d-01ec-356d35f7189a", + "TraceID": "SettingsStreamMultiReceiveEnabled", + "EncodingString": "[sett] StreamMultiReceiveEnabled= %hhu" + }, + { + "UniquenessHash": "45ba4873-08cc-5dee-18d4-fe33c464ee1f", + "TraceID": "SettingStreamMultiReceiveEnabled", + "EncodingString": "[sett] StreamMultiReceiveEnabled = %hhu" + }, { "UniquenessHash": "f34a9d8e-7798-1d30-2104-37dac8a3c0e0", "TraceID": "ShutdownImmediatePendingReliableReset", diff --git a/src/perf/lib/PerfClient.cpp b/src/perf/lib/PerfClient.cpp index cc6c98d15f..379d6bc0b8 100644 --- a/src/perf/lib/PerfClient.cpp +++ b/src/perf/lib/PerfClient.cpp @@ -229,7 +229,8 @@ PerfClient::Init( nullptr, PerfClientConnection::TcpConnectCallback, PerfClientConnection::TcpReceiveCallback, - PerfClientConnection::TcpSendCompleteCallback)); + PerfClientConnection::TcpSendCompleteCallback, + TcpDefaultExecutionProfile)); // Client defaults to using LowLatency profile } else { if (UseSendBuffering || !UsePacing) { // Update settings if non-default MsQuicSettings Settings; @@ -945,8 +946,7 @@ PerfClientStream::OnShutdown() { } if (Client.PrintThroughput && SendSuccess) { - //const auto ElapsedMicroseconds = SendEndTime - StartTime; - const auto ElapsedMicroseconds = RecvEndTime - StartTime; + const auto ElapsedMicroseconds = CXPLAT_MAX(SendEndTime - StartTime, RecvEndTime - StartTime); const auto Rate = (uint32_t)((TotalBytes * 1000 * 1000 * 8) / (1000 * ElapsedMicroseconds)); WriteOutput( "Result: Upload %llu bytes @ %u kbps (%u.%03u ms).\n", diff --git a/src/perf/lib/PerfServer.h b/src/perf/lib/PerfServer.h index d7b17a50bc..af38d3e023 100644 --- a/src/perf/lib/PerfServer.h +++ b/src/perf/lib/PerfServer.h @@ -18,7 +18,7 @@ class PerfServer { public: PerfServer(const QUIC_CREDENTIAL_CONFIG* CredConfig) : - Engine(TcpAcceptCallback, TcpConnectCallback, TcpReceiveCallback, TcpSendCompleteCallback), + Engine(TcpAcceptCallback, TcpConnectCallback, TcpReceiveCallback, TcpSendCompleteCallback, TcpDefaultExecutionProfile), Server(&Engine, CredConfig, this) { CxPlatZeroMemory(&LocalAddr, sizeof(LocalAddr)); QuicAddrSetFamily(&LocalAddr, QUIC_ADDRESS_FAMILY_UNSPEC); diff --git a/src/perf/lib/SecNetPerf.h b/src/perf/lib/SecNetPerf.h index ee7cb28b52..cd2a232d5d 100644 --- a/src/perf/lib/SecNetPerf.h +++ b/src/perf/lib/SecNetPerf.h @@ -42,7 +42,13 @@ #define PERF_MAX_THREAD_COUNT 128 #define PERF_MAX_REQUESTS_PER_SECOND 2000000 // best guess - must increase if we can do better +typedef enum TCP_EXECUTION_PROFILE { + TCP_EXECUTION_PROFILE_LOW_LATENCY, + TCP_EXECUTION_PROFILE_MAX_THROUGHPUT, +} TCP_EXECUTION_PROFILE; + extern QUIC_EXECUTION_PROFILE PerfDefaultExecutionProfile; +extern TCP_EXECUTION_PROFILE TcpDefaultExecutionProfile; extern QUIC_CONGESTION_CONTROL_ALGORITHM PerfDefaultCongestionControl; extern uint8_t PerfDefaultEcnEnabled; extern uint8_t PerfDefaultQeoAllowed; diff --git a/src/perf/lib/SecNetPerfMain.cpp b/src/perf/lib/SecNetPerfMain.cpp index 93b2054256..7588a4c543 100644 --- a/src/perf/lib/SecNetPerfMain.cpp +++ b/src/perf/lib/SecNetPerfMain.cpp @@ -22,6 +22,7 @@ PerfClient* Client; uint32_t MaxRuntime = 0; QUIC_EXECUTION_PROFILE PerfDefaultExecutionProfile = QUIC_EXECUTION_PROFILE_LOW_LATENCY; +TCP_EXECUTION_PROFILE TcpDefaultExecutionProfile = TCP_EXECUTION_PROFILE_LOW_LATENCY; QUIC_CONGESTION_CONTROL_ALGORITHM PerfDefaultCongestionControl = QUIC_CONGESTION_CONTROL_ALGORITHM_CUBIC; uint8_t PerfDefaultEcnEnabled = false; uint8_t PerfDefaultQeoAllowed = false; @@ -193,14 +194,16 @@ QuicMainStart( if (ExecStr != nullptr) { if (IsValue(ExecStr, "lowlat")) { PerfDefaultExecutionProfile = QUIC_EXECUTION_PROFILE_LOW_LATENCY; + TcpDefaultExecutionProfile = TCP_EXECUTION_PROFILE_LOW_LATENCY; } else if (IsValue(ExecStr, "maxtput")) { PerfDefaultExecutionProfile = QUIC_EXECUTION_PROFILE_TYPE_MAX_THROUGHPUT; + TcpDefaultExecutionProfile = TCP_EXECUTION_PROFILE_MAX_THROUGHPUT; } else if (IsValue(ExecStr, "scavenger")) { PerfDefaultExecutionProfile = QUIC_EXECUTION_PROFILE_TYPE_SCAVENGER; } else if (IsValue(ExecStr, "realtime")) { PerfDefaultExecutionProfile = QUIC_EXECUTION_PROFILE_TYPE_REAL_TIME; } else { - WriteOutput("Failed to parse execution profile[%s], use lowlat as default\n", ExecStr); + WriteOutput("Failed to parse execution profile[%s], use lowlat as default for QUIC, lowlat as default for TCP.\n", ExecStr); } } diff --git a/src/perf/lib/Tcp.cpp b/src/perf/lib/Tcp.cpp index b92aa76d62..87cb69ab4a 100644 --- a/src/perf/lib/Tcp.cpp +++ b/src/perf/lib/Tcp.cpp @@ -105,10 +105,12 @@ TcpEngine::TcpEngine( TcpAcceptHandler AcceptHandler, TcpConnectHandler ConnectHandler, TcpReceiveHandler ReceiveHandler, - TcpSendCompleteHandler SendCompleteHandler) noexcept : + TcpSendCompleteHandler SendCompleteHandler, + TCP_EXECUTION_PROFILE TcpExecutionProfile) noexcept : ProcCount((uint16_t)CxPlatProcCount()), Workers(new(std::nothrow) TcpWorker[ProcCount]), AcceptHandler(AcceptHandler), ConnectHandler(ConnectHandler), - ReceiveHandler(ReceiveHandler), SendCompleteHandler(SendCompleteHandler) + ReceiveHandler(ReceiveHandler), SendCompleteHandler(SendCompleteHandler), + TcpExecutionProfile(TcpExecutionProfile) { CxPlatListInitializeHead(&Connections); for (uint16_t i = 0; i < ProcCount; ++i) { @@ -117,6 +119,12 @@ TcpEngine::TcpEngine( } } Initialized = true; + if (TcpExecutionProfile == TCP_EXECUTION_PROFILE_LOW_LATENCY) { + WriteOutput("Initialized TCP Engine with Low Latency mode!\n"); + } + if (TcpExecutionProfile == TCP_EXECUTION_PROFILE_MAX_THROUGHPUT) { + WriteOutput("Initialized TCP Engine with Max Throughput mode!\n"); + } } TcpEngine::~TcpEngine() noexcept diff --git a/src/perf/lib/Tcp.h b/src/perf/lib/Tcp.h index 431aa65393..dd6876590d 100644 --- a/src/perf/lib/Tcp.h +++ b/src/perf/lib/Tcp.h @@ -95,12 +95,14 @@ class TcpEngine { const TcpConnectHandler ConnectHandler; const TcpReceiveHandler ReceiveHandler; const TcpSendCompleteHandler SendCompleteHandler; + const TCP_EXECUTION_PROFILE TcpExecutionProfile; public: TcpEngine( TcpAcceptHandler AcceptHandler, TcpConnectHandler ConnectHandler, TcpReceiveHandler ReceiveHandler, - TcpSendCompleteHandler SendCompleteHandler) noexcept; + TcpSendCompleteHandler SendCompleteHandler, + TCP_EXECUTION_PROFILE TcpExecutionProfile) noexcept; ~TcpEngine() noexcept; bool IsInitialized() const { return Initialized; } bool AddConnection(TcpConnection* Connection, uint16_t PartitionIndex); diff --git a/src/platform/datapath_winuser.c b/src/platform/datapath_winuser.c index bcee79523b..dbcdc66f91 100644 --- a/src/platform/datapath_winuser.c +++ b/src/platform/datapath_winuser.c @@ -1167,7 +1167,7 @@ SocketCreateUdp( if (Config->Flags & CXPLAT_SOCKET_FLAG_PCP) { Socket->PcpBinding = TRUE; } - CxPlatRefInitializeEx(&Socket->RefCount, SocketCount); + CxPlatRefInitializeEx(&Socket->RefCount, Socket->UseTcp ? 1 : SocketCount); if (Datapath->UseTcp) { // @@ -2255,10 +2255,15 @@ SocketDelete( CXPLAT_DBG_ASSERT(!Socket->Uninitialized); Socket->Uninitialized = TRUE; - const uint16_t SocketCount = - Socket->NumPerProcessorSockets ? (uint16_t)CxPlatProcCount() : 1; - for (uint16_t i = 0; i < SocketCount; ++i) { - CxPlatSocketContextUninitialize(&Socket->PerProcSockets[i]); + if (Socket->UseTcp) { + // QTIP did not initialize PerProcSockets + CxPlatSocketRelease(Socket); + } else { + const uint16_t SocketCount = + Socket->NumPerProcessorSockets ? (uint16_t)CxPlatProcCount() : 1; + for (uint16_t i = 0; i < SocketCount; ++i) { + CxPlatSocketContextUninitialize(&Socket->PerProcSockets[i]); + } } } diff --git a/src/plugins/dbg/connection.cpp b/src/plugins/dbg/connection.cpp index a53cd61e7a..8af53209b1 100644 --- a/src/plugins/dbg/connection.cpp +++ b/src/plugins/dbg/connection.cpp @@ -110,23 +110,41 @@ EXT_COMMAND( // Dml("\nOPERATIONS\n" - "\n"); + "\n" + "\tWorker Processing %s\n" + "\tHas Queued Work %s\n" + "\tHas Priority Work %s\n", + Conn.WorkerProcessing() ? "TRUE" : "FALSE", + Conn.HasQueuedWork() ? "TRUE" : "FALSE", + Conn.HasPriorityWork() ? "TRUE" : "FALSE"); - bool HasAtLeastOneOperation = false; auto Operations = Conn.GetOperQueue().GetOperations(); - while (!CheckControlC()) { - auto OperLinkAddr = Operations.Next(); - if (OperLinkAddr == 0) { - break; + if (Operations.IsEmpty()) { + Dml("\t\tNo Operations Queued\n"); + } else { + bool IsHighPriority = true; + bool IsFirstOperation = true; + UINT64 PriorityTail; + ReadPointerAtAddr(Conn.GetOperQueue().GetPriorityTail(), &PriorityTail); + while (!CheckControlC()) { + auto OperLinkAddr = Operations.Next(); + if (OperLinkAddr == 0) { + break; + } + + if (PriorityTail == OperLinkAddr) { + IsHighPriority = false; + Dml("\n\tNORMAL PRIORITY:\n\n"); + } + + if (IsFirstOperation && IsHighPriority) { + Dml("\n\tHIGH PRIORITY:\n\n"); + } + + auto Operation = Operation::FromLink(OperLinkAddr); + Dml("\t\t%s\n", Operation.TypeStr()); + IsFirstOperation = false; } - - auto Operation = Operation::FromLink(OperLinkAddr); - Dml("\t%s\n", Operation.TypeStr()); - HasAtLeastOneOperation = true; - } - - if (!HasAtLeastOneOperation) { - Dml("\tNo Operations Queued\n"); } // diff --git a/src/plugins/dbg/quictypes.h b/src/plugins/dbg/quictypes.h index 5db0588746..03ce0cebe3 100644 --- a/src/plugins/dbg/quictypes.h +++ b/src/plugins/dbg/quictypes.h @@ -1123,6 +1123,10 @@ struct OperQueue : Struct { LinkedList GetOperations() { return LinkedList(AddrOf("List")); } + + ULONG64 GetPriorityTail() { + return ReadPointer("PriorityTail"); + } }; struct StreamSet : Struct { @@ -1216,6 +1220,18 @@ struct Connection : Struct { } } + BYTE WorkerProcessing() { + return ReadType("WorkerProcessing"); + } + + BYTE HasQueuedWork() { + return ReadType("HasQueuedWork"); + } + + BYTE HasPriorityWork() { + return ReadType("HasPriorityWork"); + } + IpAddress GetLocalAddress() { return IpAddress(AddrOf("LocalAddress")); // TODO - Broken } diff --git a/src/plugins/trace/dll/DataModel/QuicEvents.cs b/src/plugins/trace/dll/DataModel/QuicEvents.cs index 4b8278df80..5dda14b161 100644 --- a/src/plugins/trace/dll/DataModel/QuicEvents.cs +++ b/src/plugins/trace/dll/DataModel/QuicEvents.cs @@ -32,7 +32,6 @@ public enum QuicApiType ConnectionStart, ConnectionSetConfiguration, ConnectionSendResumptionTicket, - ConnectionCompleteResumptionTicketValidation, StreamOpen, StreamClose, StreamStart, @@ -40,7 +39,9 @@ public enum QuicApiType StreamSend, StreamReceiveComplete, StreamReceiveSetEnabled, - StreamDatagramSend + StreamDatagramSend, + ConnectionCompleteResumptionTicketValidation, + ConnectionCompleteCertificateValidation } public enum QuicConnectionState diff --git a/src/plugins/trace/dll/DataModel/QuicStream.cs b/src/plugins/trace/dll/DataModel/QuicStream.cs index 88004ef0b4..8225f8abe0 100644 --- a/src/plugins/trace/dll/DataModel/QuicStream.cs +++ b/src/plugins/trace/dll/DataModel/QuicStream.cs @@ -151,6 +151,7 @@ internal void AddEvent(QuicEvent evt, QuicState state) Timings.SendPacket = state.SendPacketSet.FindActive(new QuicObjectKey(evt.PointerSize, (evt as QuicStreamWriteFramesEvent)!.ID, evt.ProcessId)); if (Timings.SendPacket == null) { + //Console.WriteLine("No SendPacket Error!"); Timings.EncounteredError = true; break; } @@ -188,6 +189,7 @@ internal void AddEvent(QuicEvent evt, QuicState state) Timings.RecvPacket = state.ReceivePacketSet.FindActive(new QuicObjectKey(evt.PointerSize, (evt as QuicStreamReceiveFrameEvent)!.ID, evt.ProcessId)); if (Timings.RecvPacket == null) { + //Console.WriteLine("No RecvPacket Error!"); Timings.EncounteredError = true; break; } @@ -218,7 +220,7 @@ internal void AddEvent(QuicEvent evt, QuicState state) } } - if (InitialTimeStamp > Timings.RecvPacket.PacketReceive) + if (InitialTimeStamp > Timings.RecvPacket.PacketReceive && !Timings.IsAllocated) { // Stream was created after packet recieved Timings.UpdateToState(QuicStreamState.Alloc, InitialTimeStamp); diff --git a/src/plugins/trace/dll/DataModel/QuicStreamTiming.cs b/src/plugins/trace/dll/DataModel/QuicStreamTiming.cs index 6f5ca72604..9eed12e8dc 100644 --- a/src/plugins/trace/dll/DataModel/QuicStreamTiming.cs +++ b/src/plugins/trace/dll/DataModel/QuicStreamTiming.cs @@ -48,6 +48,11 @@ public sealed class QuicStreamTiming // public bool IsServer { get; internal set; } + // + // The stream has been allocated + // + public bool IsAllocated { get; internal set; } + // // The application is actively handling a receive. // @@ -179,7 +184,7 @@ internal void UpdateToState(QuicStreamState newState, Timestamp time, bool ignor { if (!ignorePrevious) { - //Console.WriteLine("ERROR: Invalid state change from {0} to {1}", State, state); + //Console.WriteLine("ERROR: Invalid state change from {0} to {1}", State, newState); EncounteredError = true; } else if (State == QuicStreamState.Alloc && newState == QuicStreamState.QueueRecv) @@ -205,6 +210,10 @@ internal void UpdateToState(QuicStreamState newState, Timestamp time, bool ignor LastStateChangeTime = time; State = newState; + if (newState == QuicStreamState.Alloc) + { + IsAllocated = true; + } } internal void UpdateToIdle(Timestamp time) diff --git a/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs b/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs index 469be65b69..557b60f681 100644 --- a/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs +++ b/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs @@ -84,6 +84,21 @@ public sealed class QuicStreamLifetimeTable new ColumnMetadata(new Guid("{D0612FB2-4243-4C13-9164-5D55837F7E04}"), "Type"), new UIHints { AggregationMode = AggregationMode.UniqueCount }); + private static readonly ColumnConfiguration processIdColumnConfig = + new ColumnConfiguration( + new ColumnMetadata(new Guid("{73bf47c1-a87e-473e-8337-dfc8442da9bb}"), "Process (ID)"), + new UIHints { AggregationMode = AggregationMode.Max }); + + private static readonly ColumnConfiguration threadIdColumnConfig = + new ColumnConfiguration( + new ColumnMetadata(new Guid("{b58d4999-21b8-4462-8dd7-6bf483d45b15}"), "ThreadId"), + new UIHints { AggregationMode = AggregationMode.Max }); + + private static readonly ColumnConfiguration cpuColumnConfig = + new ColumnConfiguration( + new ColumnMetadata(new Guid("{48ab57b9-e0df-4068-856a-a2c2ffdfa8f3}"), "CPU"), + new UIHints { AggregationMode = AggregationMode.Sum }); + private static readonly ColumnConfiguration countColumnConfig = new ColumnConfiguration( new ColumnMetadata(new Guid("{9583D245-BD70-4BA3-A249-088F0D6C0D8C}"), "Count"), @@ -102,6 +117,9 @@ public sealed class QuicStreamLifetimeTable typeColumnConfig, TableConfiguration.PivotColumn, TableConfiguration.LeftFreezeColumn, + processIdColumnConfig, + threadIdColumnConfig, + cpuColumnConfig, timeColumnConfig, TableConfiguration.RightFreezeColumn, TableConfiguration.GraphColumn, @@ -123,6 +141,9 @@ public static void BuildTable(ITableBuilder tableBuilder, QuicState quicState) var dataProjection = Projection.Index(events); table.AddColumn(typeColumnConfig, dataProjection.Compose(ProjectType)); + table.AddColumn(processIdColumnConfig, dataProjection.Compose(ProjectProcessId)); + table.AddColumn(threadIdColumnConfig, dataProjection.Compose(ProjectThreadId)); + table.AddColumn(cpuColumnConfig, dataProjection.Compose(ProjectCpu)); table.AddColumn(countColumnConfig, Projection.Constant(1)); table.AddColumn(timeColumnConfig, dataProjection.Compose(ProjectTime)); @@ -139,6 +160,21 @@ private static string ProjectType(QuicEvent evt) return evt.EventId == QuicEventId.StreamCreated ? "Stream Create" : "Stream Destroy"; } + private static uint ProjectProcessId(QuicEvent evt) + { + return evt.ProcessId; + } + + private static uint ProjectThreadId(QuicEvent evt) + { + return evt.ThreadId; + } + + private static ushort ProjectCpu(QuicEvent evt) + { + return evt.Processor; + } + private static Timestamp ProjectTime(QuicEvent evt) { return evt.TimeStamp; diff --git a/src/plugins/trace/dll/pluginManifest.json b/src/plugins/trace/dll/pluginManifest.json index 0dee683f18..1c6afb5973 100644 --- a/src/plugins/trace/dll/pluginManifest.json +++ b/src/plugins/trace/dll/pluginManifest.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json", "identity": { "id": "QuicTrace", - "version": "1.0.0" + "version": "1.0.3" }, "displayName": "QuicTrace", "description": "Used to open MsQuic trace files.", diff --git a/src/plugins/trace/exe/Program.cs b/src/plugins/trace/exe/Program.cs index 631faa7c8e..92723d81c2 100644 --- a/src/plugins/trace/exe/Program.cs +++ b/src/plugins/trace/exe/Program.cs @@ -6,6 +6,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading; using Microsoft.Diagnostics.Tracing.Session; @@ -233,6 +234,13 @@ static void RunRpsAnalysis(QuicState[] quicStates) foreach (var stream in quicState.Streams) { + /*Console.WriteLine("\nConn {0}, Stream {1}, {2}, {3}", stream.Connection.Id, stream.Id, stream.Timings.IsServer ? "Server" : "Client", stream.Timings.EncounteredError ? "Errors" : "Success"); + var t0 = stream.Timings.StateChanges[0].Item2; + foreach (var state in stream.Timings.StateChanges) + { + Console.WriteLine(" {0,-16}{1,6:F1}", state.Item1, (state.Item2 - t0).ToNanoseconds / 1000.0); + }*/ + if (stream.Connection != null && !stream.Timings.EncounteredError && stream.Timings.IsFinalized) @@ -323,13 +331,26 @@ static void RunRpsAnalysis(QuicState[] quicStates) // // Full state changes for each percentile request above. // - Console.WriteLine("Percentile,States"); foreach (var percentile in Percentiles) { var s = sortedRequests.ElementAt((int)((clientRequestCount * percentile) / 100)); var t = s.Timings; - Console.WriteLine("{0}th (Client),{1}", percentile, string.Join(",", t.StateChangeDeltas)); - Console.WriteLine("{0}th (Server),{1}", percentile, string.Join(",", t.Peer!.StateChangeDeltas)); + Console.WriteLine("\n{0}th Percentile, Conn {1}, Stream {2}\nClient", percentile, s.Connection!.Id, s.Id); + var t0 = s.Timings.InitialStateTime; + var prev = t0; + foreach (var state in s.Timings.StateChanges) + { + Console.WriteLine(" {0,-16}{1,6:F1}", state.Item1, (prev - t0).ToNanoseconds / 1000.0); + prev = state.Item2; + } + Console.WriteLine("Server"); + t0 = t.Peer!.InitialStateTime; + prev = t0; + foreach (var state in t.Peer!.StateChanges) + { + Console.WriteLine(" {0,-16}{1,6:F1}", state.Item1, (prev - t0).ToNanoseconds / 1000.0); + prev = state.Item2; + } } Console.WriteLine(); diff --git a/src/test/MsQuicTests.h b/src/test/MsQuicTests.h index a7b77d45a9..83943df6fa 100644 --- a/src/test/MsQuicTests.h +++ b/src/test/MsQuicTests.h @@ -570,6 +570,10 @@ void QuicTestStreamReliableResetMultipleSends( ); +void +QuicTestStreamMultiReceive( + ); + void QuicTestStreamBlockUnblockConnFlowControl( _In_ BOOLEAN Bidirectional @@ -579,6 +583,10 @@ void QuicTestOperationPriority( ); +void +QuicTestConnectionPriority( + ); + void QuicTestConnectionStreamStartSendPriority( ); @@ -1305,4 +1313,10 @@ typedef struct { #define IOCTL_QUIC_RUN_OPERATION_PRIORITY \ QUIC_CTL_CODE(122, METHOD_BUFFERED, FILE_WRITE_DATA) -#define QUIC_MAX_IOCTL_FUNC_CODE 122 +#define IOCTL_QUIC_RUN_CONNECTION_PRIORITY \ + QUIC_CTL_CODE(123, METHOD_BUFFERED, FILE_WRITE_DATA) + +#define IOCTL_QUIC_RUN_STREAM_MULTI_RECEIVE \ + QUIC_CTL_CODE(124, METHOD_BUFFERED, FILE_WRITE_DATA) + +#define QUIC_MAX_IOCTL_FUNC_CODE 124 diff --git a/src/test/bin/quic_gtest.cpp b/src/test/bin/quic_gtest.cpp index dbba33c080..ffb97c9f50 100644 --- a/src/test/bin/quic_gtest.cpp +++ b/src/test/bin/quic_gtest.cpp @@ -2202,6 +2202,18 @@ TEST(Misc, StreamReliableResetMultipleSends) { } #endif // QUIC_PARAM_STREAM_RELIABLE_OFFSET +#ifdef QUIC_API_ENABLE_PREVIEW_FEATURES +TEST(Misc, StreamMultiReceive) { + TestLogger Logger("StreamMultiReceive"); + if (TestingKernelMode) { + GTEST_SKIP(); + ASSERT_TRUE(DriverClient.Run(IOCTL_QUIC_RUN_STREAM_MULTI_RECEIVE)); + } else { + QuicTestStreamMultiReceive(); + } +} +#endif // QUIC_API_ENABLE_PREVIEW_FEATURES + TEST(Misc, StreamBlockUnblockUnidiConnFlowControl) { TestLogger Logger("StreamBlockUnblockUnidiConnFlowControl"); if (TestingKernelMode) { @@ -2229,6 +2241,15 @@ TEST(Basic, OperationPriority) { } } +TEST(Basic, ConnectionPriority) { + TestLogger Logger("ConnectionPriority"); + if (TestingKernelMode) { + ASSERT_TRUE(DriverClient.Run(IOCTL_QUIC_RUN_CONNECTION_PRIORITY)); + } else { + QuicTestConnectionPriority(); + } +} + TEST(Drill, VarIntEncoder) { TestLogger Logger("QuicDrillTestVarIntEncoder"); if (TestingKernelMode) { diff --git a/src/test/bin/winkernel/control.cpp b/src/test/bin/winkernel/control.cpp index 54db2cb9cf..b4f9c7c50d 100644 --- a/src/test/bin/winkernel/control.cpp +++ b/src/test/bin/winkernel/control.cpp @@ -521,6 +521,8 @@ size_t QUIC_IOCTL_BUFFER_SIZES[] = sizeof(BOOLEAN), 0, 0, + 0, + 0, }; CXPLAT_STATIC_ASSERT( @@ -1455,6 +1457,14 @@ QuicTestCtlEvtIoDeviceControl( case IOCTL_QUIC_RUN_OPERATION_PRIORITY: QuicTestCtlRun(QuicTestOperationPriority()); + + case IOCTL_QUIC_RUN_STREAM_MULTI_RECEIVE: + QuicTestCtlRun(QuicTestStreamMultiReceive()); + + break; + + case IOCTL_QUIC_RUN_CONNECTION_PRIORITY: + QuicTestCtlRun(QuicTestConnectionPriority()); break; default: diff --git a/src/test/lib/DataTest.cpp b/src/test/lib/DataTest.cpp index 76e1733d30..52e4206919 100644 --- a/src/test/lib/DataTest.cpp +++ b/src/test/lib/DataTest.cpp @@ -3372,10 +3372,7 @@ struct OperationPriorityTestContext { MsQuicStream* ExpectedStream {nullptr}; bool TestSucceeded {false}; - static QUIC_STATUS ServerStreamCallback(_In_ MsQuicStream* Stream, _In_opt_ void* Context, _Inout_ QUIC_STREAM_EVENT* Event) { - UNREFERENCED_PARAMETER(Stream); - UNREFERENCED_PARAMETER(Context); - UNREFERENCED_PARAMETER(Event); + static QUIC_STATUS ServerStreamCallback(_In_ MsQuicStream*, _In_opt_ void*, _Inout_ QUIC_STREAM_EVENT*) { return QUIC_STATUS_SUCCESS; } @@ -3556,6 +3553,284 @@ void QuicTestOperationPriority() } } +struct ConnectionPriorityTestContext { + static const uint8_t NumSend; + uint8_t MaxSend; + CxPlatEvent AllReceivesComplete; + CxPlatEvent OperationQueuedComplete; + CxPlatEvent BlockAfterInitialStart; + uint32_t CurrentSendCount {0}; + uint32_t CurrentStartCount {0}; + MsQuicStream* ExpectedStream {nullptr}; + bool TestSucceeded {false}; + MsQuicStream* StartOrder[128] {0}; + MsQuicStream* SendOrder[128] {0}; + + static QUIC_STATUS ServerStreamCallback(_In_ MsQuicStream*, _In_opt_ void*, _Inout_ QUIC_STREAM_EVENT*) { + return QUIC_STATUS_SUCCESS; + } + + static QUIC_STATUS ClientStreamStartStreamCallback(_In_ MsQuicStream* Stream, _In_opt_ void* Context, _Inout_ QUIC_STREAM_EVENT* Event) { + auto TestContext = (ConnectionPriorityTestContext*)Context; + if (Event->Type == QUIC_STREAM_EVENT_START_COMPLETE) { + TestContext->StartOrder[TestContext->CurrentStartCount++] = Stream; + if (TestContext->CurrentStartCount == 1) { + // initial dummy stream start to block this thread + TestContext->TestSucceeded = TestContext->ExpectedStream == Stream; + TestContext->BlockAfterInitialStart.Set(); + // Wait until all operations are queued + TestContext->OperationQueuedComplete.WaitTimeout(TestWaitTimeout); + } else if (TestContext->CurrentStartCount == 2) { + TestContext->TestSucceeded = TestContext->TestSucceeded && (TestContext->ExpectedStream == Stream); + } + } else if (Event->Type == QUIC_STREAM_EVENT_SEND_COMPLETE) { + TestContext->SendOrder[TestContext->CurrentSendCount++] = Stream; + if (TestContext->CurrentSendCount == 1) { + TestContext->TestSucceeded = TestContext->TestSucceeded && (TestContext->ExpectedStream == Stream); + } else if (TestContext->CurrentSendCount == TestContext->MaxSend) { + TestContext->AllReceivesComplete.Set(); + } + } + return QUIC_STATUS_SUCCESS; + } + + static QUIC_STATUS ConnCallback(_In_ MsQuicConnection*, _In_opt_ void* Context, _Inout_ QUIC_CONNECTION_EVENT* Event) { + if (Event->Type == QUIC_CONNECTION_EVENT_PEER_STREAM_STARTED) { + new(std::nothrow) MsQuicStream(Event->PEER_STREAM_STARTED.Stream, CleanUpAutoDelete, ServerStreamCallback, Context); + } + return QUIC_STATUS_SUCCESS; + } +}; +const uint8_t ConnectionPriorityTestContext::NumSend = 3; + +void QuicTestConnectionPriority() +{ + // QUIC_EXECUTION_PROFILE_TYPE_SCAVENGER for serializing Connections + MsQuicRegistration Registration("MsQuicTest", QUIC_EXECUTION_PROFILE_TYPE_SCAVENGER, true); + TEST_QUIC_SUCCEEDED(Registration.GetInitStatus()); + + MsQuicConfiguration ServerConfiguration(Registration, "MsQuicTest", MsQuicSettings().SetPeerUnidiStreamCount(ConnectionPriorityTestContext::NumSend), ServerSelfSignedCredConfig); + TEST_QUIC_SUCCEEDED(ServerConfiguration.GetInitStatus()); + + MsQuicConfiguration ClientConfiguration(Registration, "MsQuicTest", MsQuicCredentialConfig()); + TEST_QUIC_SUCCEEDED(ClientConfiguration.GetInitStatus()); + + MsQuicAutoAcceptListener Listener(Registration, ServerConfiguration, ConnectionPriorityTestContext::ConnCallback); + TEST_QUIC_SUCCEEDED(Listener.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Listener.Start("MsQuicTest")); + QuicAddr ServerLocalAddr; + TEST_QUIC_SUCCEEDED(Listener.GetLocalAddr(ServerLocalAddr)); + + uint8_t RawBuffer[100]; + QUIC_BUFFER Buffer { sizeof(RawBuffer), RawBuffer }; + MsQuicStream* Streams[ConnectionPriorityTestContext::NumSend] = {0}; + const uint8_t NumConnections = 8; + + { + MsQuicConnection *Connections[NumConnections] = {0}; + for (uint8_t i = 0; i < NumConnections; ++i) { + Connections[i] = new(std::nothrow) MsQuicConnection(Registration); + TEST_QUIC_SUCCEEDED(Connections[i]->GetInitStatus()); + TEST_QUIC_SUCCEEDED(Connections[i]->Start(ClientConfiguration, ServerLocalAddr.GetFamily(), QUIC_TEST_LOOPBACK_FOR_AF(ServerLocalAddr.GetFamily()), ServerLocalAddr.GetPort())); + TEST_TRUE(Connections[i]->HandshakeCompleteEvent.WaitTimeout(TestWaitTimeout)); + TEST_TRUE(Connections[i]->HandshakeComplete); + } + + // s: stream op + // p: prioritied op + // s0/s2: stream start, stream send + // n in sn0/sn2: stream id + // processing | queued + // [1[s0]] | [] + // [1[s0]] | [2[s00, s02, ..., s(n-1)0, s(n-1)2]] + // [1[s0]] | [3[s0p, s2p], 2[s00, s02, ..., s(n-1)0, s(n-1)2]] + // [3[s0p, s2p], 2[s00, s02, ..., s(n-1)0, s(n-1)2]] | [] + { + ConnectionPriorityTestContext Context; + MsQuicStream Stream1(*Connections[0], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + MsQuicStream Stream3(*Connections[2], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + Context.ExpectedStream = &Stream1; + + // NOTE: This is to flush all operations in the queue. + // If this is not done, the operation order is not guaranteed. + // e.g. This test case randomly swap [3] and [4] and fail without sleep. + // This happens when [3] is already in the worker queue. + // Normal enqueue doesn't re-queue the Connection + CxPlatSleep(300); + + Stream1.Start(QUIC_STREAM_START_FLAG_IMMEDIATE); + // Wait until this StreamStart operation is drained + TEST_TRUE(Context.BlockAfterInitialStart.WaitTimeout(TestWaitTimeout)); + Context.ExpectedStream = &Stream3; + + for (uint8_t i = 0; i < ConnectionPriorityTestContext::NumSend; ++i) { + Streams[i] = new(std::nothrow) MsQuicStream( + *Connections[1], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, + ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + TEST_QUIC_SUCCEEDED(Streams[i]->GetInitStatus()); + TEST_QUIC_SUCCEEDED(Streams[i]->Send(&Buffer, 1, QUIC_SEND_FLAG_START | QUIC_SEND_FLAG_FIN)); + } + + TEST_QUIC_SUCCEEDED(Stream3.Start(QUIC_STREAM_START_FLAG_PRIORITY_WORK)); + TEST_QUIC_SUCCEEDED(Stream3.Send(&Buffer, 1, QUIC_SEND_FLAG_FIN | QUIC_SEND_FLAG_PRIORITY_WORK)); + Context.MaxSend = ConnectionPriorityTestContext::NumSend + 1; + Context.OperationQueuedComplete.Set(); // All operations are queued. Kick off processing the operations + + MsQuicStream* ExpectedStartOrder[ConnectionPriorityTestContext::NumSend + 2] = {0}; + ExpectedStartOrder[0] = &Stream1; + ExpectedStartOrder[1] = &Stream3; + for (uint8_t i = 2; i < ConnectionPriorityTestContext::NumSend + 2; ++i) { + ExpectedStartOrder[i] = Streams[i-2]; + } + MsQuicStream* ExpectedSendOrder[ConnectionPriorityTestContext::NumSend + 1] = {0}; + ExpectedSendOrder[0] = &Stream3; + for (uint8_t i = 1; i < ConnectionPriorityTestContext::NumSend + 1; ++i) { + ExpectedSendOrder[i] = Streams[i-1]; + } + + TEST_TRUE(Context.AllReceivesComplete.WaitTimeout(TestWaitTimeout)); + + TEST_TRUE(memcmp(Context.StartOrder, ExpectedStartOrder, sizeof(ExpectedStartOrder)) == 0); + TEST_TRUE(memcmp(Context.SendOrder, ExpectedSendOrder, sizeof(ExpectedSendOrder)) == 0); + TEST_TRUE(Context.TestSucceeded); + for (uint8_t i = 0; i < ConnectionPriorityTestContext::NumSend; ++i) { + delete Streams[i]; + } + } + + // processing | queued + // [1[s0]] | [] + // [1[s0]] | [2[s(n-1)0p, s(n-1)2p, s00, s02, ..., s(n-2)0, s(n-2)2]] + // [1[s0]] | [2[s(n-1)0p, s(n-1)2p, s00, s02, ..., s(n-2)0, s(n-2)2], 3[s0p, s2p]] + // [2[s(n-1)0p, s(n-1)2p, s00, s02, ..., s(n-2)0, s(n-2)2], 3[s0p, s2p]] | [] + { + ConnectionPriorityTestContext Context; + MsQuicStream Stream1(*Connections[0], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + MsQuicStream Stream3(*Connections[2], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + Context.ExpectedStream = &Stream1; + + // NOTE: This is to flush all operations in the queue. + // If this is not done, the operation order is not guaranteed. + // e.g. This test case randomly swap [3] and [4] and fail without sleep. + // This happens when [3] is already in the worker queue. + // Normal enqueue doesn't re-queue the Connection + CxPlatSleep(300); + + Stream1.Start(QUIC_STREAM_START_FLAG_IMMEDIATE); + // Wait until this StreamStart operation is drained + TEST_TRUE(Context.BlockAfterInitialStart.WaitTimeout(TestWaitTimeout)); + + for (uint8_t i = 0; i < ConnectionPriorityTestContext::NumSend; ++i) { + Streams[i] = new(std::nothrow) MsQuicStream( + *Connections[1], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, + ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + TEST_QUIC_SUCCEEDED(Streams[i]->GetInitStatus()); + + // NOTE: Splitting Start and Send without using QUIC_SEND_FLAG_START doesn't change operation order, + // but it changes callback order. This is needed for using ExpectedXxxxOrder array. + if (i == ConnectionPriorityTestContext::NumSend-1) { + Context.ExpectedStream = Streams[i]; + TEST_QUIC_SUCCEEDED(Streams[i]->Start(QUIC_STREAM_START_FLAG_PRIORITY_WORK)) + TEST_QUIC_SUCCEEDED(Streams[i]->Send(&Buffer, 1, QUIC_SEND_FLAG_FIN | QUIC_SEND_FLAG_PRIORITY_WORK)); + } else { + TEST_QUIC_SUCCEEDED(Streams[i]->Start(QUIC_STREAM_START_FLAG_NONE)) + TEST_QUIC_SUCCEEDED(Streams[i]->Send(&Buffer, 1, QUIC_SEND_FLAG_FIN)); + } + } + + TEST_QUIC_SUCCEEDED(Stream3.Start(QUIC_STREAM_START_FLAG_NONE)); + TEST_QUIC_SUCCEEDED(Stream3.Send(&Buffer, 1, QUIC_SEND_FLAG_FIN)); + Context.MaxSend = ConnectionPriorityTestContext::NumSend + 1; + Context.OperationQueuedComplete.Set(); // All operations are queued. Kick off processing the operations + + MsQuicStream* ExpectedStartOrder[ConnectionPriorityTestContext::NumSend + 2] = {0}; + ExpectedStartOrder[0] = &Stream1; + ExpectedStartOrder[1] = Streams[ConnectionPriorityTestContext::NumSend-1]; + ExpectedStartOrder[ConnectionPriorityTestContext::NumSend+1] = &Stream3; + for (uint8_t i = 2; i < ConnectionPriorityTestContext::NumSend + 1; ++i) { + ExpectedStartOrder[i] = Streams[i-2]; + } + MsQuicStream* ExpectedSendOrder[ConnectionPriorityTestContext::NumSend + 1] = {0}; + ExpectedSendOrder[0] = Streams[ConnectionPriorityTestContext::NumSend-1]; + ExpectedSendOrder[ConnectionPriorityTestContext::NumSend] = &Stream3; + for (uint8_t i = 1; i < ConnectionPriorityTestContext::NumSend; ++i) { + ExpectedSendOrder[i] = Streams[i-1]; + } + + TEST_TRUE(Context.AllReceivesComplete.WaitTimeout(TestWaitTimeout)); + + TEST_TRUE(memcmp(Context.StartOrder, ExpectedStartOrder, sizeof(ExpectedStartOrder)) == 0); + TEST_TRUE(memcmp(Context.SendOrder, ExpectedSendOrder, sizeof(ExpectedSendOrder)) == 0); + TEST_TRUE(Context.TestSucceeded); + for (uint8_t i = 0; i < ConnectionPriorityTestContext::NumSend; ++i) { + delete Streams[i]; + } + } + + // processing | queued + // [1[s0]] | [] + // [1[s0]] | [5[s0, s2]] + // [1[s0]] | [4[s0p, s2p], 5[s0, s2]] + // [1[s0]] | [4[s0p, s2p], 5[s0, s2]], 3[s0, s2]] + // [1[s0]] | [4[s0p, s2p], 2[s0p, s2p], 5[s0, s2], 3[s0, s2]] + // [1[s0, s2]] | [4[s0p, s2p], 2[s0p, s2p], 5[s0, s2], 3[s0, s2]] + { + ConnectionPriorityTestContext Context; + MsQuicStream Stream1(*Connections[0], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + MsQuicStream Stream2(*Connections[1], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + MsQuicStream Stream3(*Connections[2], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + MsQuicStream Stream4(*Connections[3], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + MsQuicStream Stream5(*Connections[4], QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, ConnectionPriorityTestContext::ClientStreamStartStreamCallback, &Context); + + // NOTE: This is to flush all operations in the queue. + // If this is not done, the operation order is not guaranteed. + // e.g. This test case randomly swap [3] and [4] and fail without sleep. + // This happens when [3] is already in the worker queue. + // Normal enqueue doesn't re-queue the Connection + CxPlatSleep(300); + + Stream1.Start(QUIC_STREAM_START_FLAG_IMMEDIATE); + // Wait until this StreamStart operation is drained + TEST_TRUE(Context.BlockAfterInitialStart.WaitTimeout(TestWaitTimeout)); + + TEST_QUIC_SUCCEEDED(Stream5.Start(QUIC_STREAM_START_FLAG_NONE)); + TEST_QUIC_SUCCEEDED(Stream5.Send(&Buffer, 1, QUIC_SEND_FLAG_START | QUIC_SEND_FLAG_FIN)); + TEST_QUIC_SUCCEEDED(Stream4.Start(QUIC_STREAM_START_FLAG_PRIORITY_WORK)); + TEST_QUIC_SUCCEEDED(Stream4.Send(&Buffer, 1, QUIC_SEND_FLAG_START | QUIC_SEND_FLAG_FIN | QUIC_SEND_FLAG_PRIORITY_WORK)); + TEST_QUIC_SUCCEEDED(Stream3.Start(QUIC_STREAM_START_FLAG_NONE)); + TEST_QUIC_SUCCEEDED(Stream3.Send(&Buffer, 1, QUIC_SEND_FLAG_START | QUIC_SEND_FLAG_FIN)); + TEST_QUIC_SUCCEEDED(Stream2.Start(QUIC_STREAM_START_FLAG_PRIORITY_WORK)); + TEST_QUIC_SUCCEEDED(Stream2.Send(&Buffer, 1, QUIC_SEND_FLAG_START | QUIC_SEND_FLAG_FIN | QUIC_SEND_FLAG_PRIORITY_WORK)); + + TEST_QUIC_SUCCEEDED(Stream1.Send(&Buffer, 1, QUIC_SEND_FLAG_FIN | QUIC_SEND_FLAG_PRIORITY_WORK)); + + Context.OperationQueuedComplete.Set(); // All operations are queued. Kick off processing the operations + Context.MaxSend = 5; + TEST_TRUE(Context.AllReceivesComplete.WaitTimeout(TestWaitTimeout)); + + MsQuicStream* ExpectedStartOrder[5] = {0}; + MsQuicStream* ExpectedSendOrder[5] = {0}; + ExpectedStartOrder[0] = &Stream1; + ExpectedStartOrder[1] = &Stream4; + ExpectedStartOrder[2] = &Stream2; + ExpectedStartOrder[3] = &Stream5; + ExpectedStartOrder[4] = &Stream3; + ExpectedSendOrder[0] = &Stream1; + ExpectedSendOrder[1] = &Stream4; + ExpectedSendOrder[2] = &Stream2; + ExpectedSendOrder[3] = &Stream5; + ExpectedSendOrder[4] = &Stream3; + + TEST_TRUE(memcmp(Context.StartOrder, ExpectedStartOrder, sizeof(ExpectedStartOrder)) == 0); + TEST_TRUE(memcmp(Context.SendOrder, ExpectedSendOrder, sizeof(ExpectedSendOrder)) == 0); + } + + for (uint8_t i = 0; i < NumConnections; ++i) { + delete Connections[i]; + } + } +} + struct StreamBlockUnblockConnFlowControl { CxPlatEvent ClientStreamShutdownComplete; CxPlatEvent ClientStreamSendComplete; @@ -3989,3 +4264,222 @@ QuicTestStreamReliableResetMultipleSends( TEST_TRUE(Context.ShutdownErrorCode == AbortShutdownErrorCode); } #endif // QUIC_PARAM_STREAM_RELIABLE_OFFSET + +#ifdef QUIC_API_ENABLE_PREVIEW_FEATURES +#define MultiRecvNumSend 10 +// 1G seems to be too big for CI environment to finish in a reasonable time. +uint8_t Buffer10M[10000000] = {}; +struct MultiReceiveTestContext { + CxPlatEvent PktRecvd[MultiRecvNumSend]; + MsQuicStream* ServerStream {nullptr}; + int Recvd {0}; + uint8_t RecvdSignatures[MultiRecvNumSend] {0}; + uint64_t PseudoProcessingLength {0}; + CXPLAT_LOCK Lock; + uint64_t TotalReceivedBytes {0}; + uint64_t TotalSendBytes {0}; + uint8_t* RecvBuffer {nullptr}; + + MultiReceiveTestContext() { + CxPlatLockInitialize(&Lock); + } + ~MultiReceiveTestContext() { + CxPlatLockUninitialize(&Lock); + } + + static QUIC_STATUS ServerStreamCallback(_In_ MsQuicStream* Stream, _In_opt_ void* Context, _Inout_ QUIC_STREAM_EVENT* Event) { + UNREFERENCED_PARAMETER(Stream); + QUIC_STATUS Status = QUIC_STATUS_SUCCESS; + auto TestContext = (MultiReceiveTestContext*)Context; + if (Event->Type == QUIC_STREAM_EVENT_RECEIVE) { + const QUIC_BUFFER* Buffers = Event->RECEIVE.Buffers; + uint32_t BufferCount = Event->RECEIVE.BufferCount; + TestContext->RecvdSignatures[TestContext->Recvd] = Buffers[BufferCount-1].Buffer[Buffers[BufferCount-1].Length-1]; + CxPlatLockAcquire(&TestContext->Lock); + TestContext->PseudoProcessingLength += Event->RECEIVE.TotalBufferLength; + CxPlatLockRelease(&TestContext->Lock); + TestContext->TotalReceivedBytes += Event->RECEIVE.TotalBufferLength; + if (TestContext->RecvBuffer) { + uint64_t Offset = Event->RECEIVE.AbsoluteOffset; + for (uint32_t i = 0; i < BufferCount; i++) { + memcpy(TestContext->RecvBuffer + Offset, Buffers[i].Buffer, Buffers[i].Length); + Offset += Buffers[i].Length; + } + if (TestContext->TotalReceivedBytes == TestContext->TotalSendBytes) { + TestContext->PktRecvd[0].Set(); + } + } else { + if (TestContext->RecvdSignatures[TestContext->Recvd] != 0) { + TestContext->PktRecvd[TestContext->Recvd++].Set(); + } + } + Status = QUIC_STATUS_PENDING; + } + + return Status; + } + + static QUIC_STATUS ClientStreamCallback(_In_ MsQuicStream* , _In_opt_ void* , _Inout_ QUIC_STREAM_EVENT* ) { + return QUIC_STATUS_SUCCESS; + } + + static QUIC_STATUS ConnCallback(_In_ MsQuicConnection*, _In_opt_ void* Context, _Inout_ QUIC_CONNECTION_EVENT* Event) { + if (Event->Type == QUIC_CONNECTION_EVENT_PEER_STREAM_STARTED) { + auto TestContext = (MultiReceiveTestContext*)Context; + TestContext->ServerStream = new(std::nothrow) MsQuicStream(Event->PEER_STREAM_STARTED.Stream, CleanUpAutoDelete, ServerStreamCallback, Context); + } + return QUIC_STATUS_SUCCESS; + } +}; + +void +QuicTestStreamMultiReceive( + ) +{ + MsQuicRegistration Registration(true); + TEST_QUIC_SUCCEEDED(Registration.GetInitStatus()); + + MsQuicConfiguration ServerConfiguration(Registration, "MsQuicTest", MsQuicSettings().SetPeerUnidiStreamCount(5).SetStreamMultiReceiveEnabled(true), ServerSelfSignedCredConfig); + TEST_QUIC_SUCCEEDED(ServerConfiguration.GetInitStatus()); + + MsQuicConfiguration ClientConfiguration(Registration, "MsQuicTest", MsQuicCredentialConfig()); + TEST_QUIC_SUCCEEDED(ClientConfiguration.GetInitStatus()); + + // Server side multi receive simple. 3 Sends and Complete at once + { + uint32_t BufferSize = 128; + QUIC_BUFFER Buffer { BufferSize, Buffer10M }; + int NumSend = MultiRecvNumSend; + + MultiReceiveTestContext Context; + MsQuicAutoAcceptListener Listener(Registration, ServerConfiguration, MultiReceiveTestContext::ConnCallback, &Context); + TEST_QUIC_SUCCEEDED(Listener.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Listener.Start("MsQuicTest")); + QuicAddr ServerLocalAddr; + TEST_QUIC_SUCCEEDED(Listener.GetLocalAddr(ServerLocalAddr)); + + MsQuicConnection Connection(Registration); + TEST_QUIC_SUCCEEDED(Connection.GetInitStatus()); + + TEST_QUIC_SUCCEEDED(Connection.Start(ClientConfiguration, ServerLocalAddr.GetFamily(), QUIC_TEST_LOOPBACK_FOR_AF(ServerLocalAddr.GetFamily()), ServerLocalAddr.GetPort())); + TEST_TRUE(Connection.HandshakeCompleteEvent.WaitTimeout(TestWaitTimeout)); + TEST_TRUE(Connection.HandshakeComplete); + + MsQuicStream Stream(Connection, QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, MultiReceiveTestContext::ClientStreamCallback, &Context); + TEST_QUIC_SUCCEEDED(Stream.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Stream.Start(QUIC_STREAM_START_FLAG_IMMEDIATE)); + + for (int i = 0; i < NumSend; i++) { + Buffer.Buffer[BufferSize-1] = ((uint8_t)i % 255) + 1; + TEST_QUIC_SUCCEEDED(Stream.Send(&Buffer, 1, i == NumSend - 1 ? QUIC_SEND_FLAG_FIN : QUIC_SEND_FLAG_NONE)); + TEST_TRUE(Context.PktRecvd[i].WaitTimeout(TestWaitTimeout)); + } + Context.ServerStream->ReceiveComplete(BufferSize * NumSend); + + for (int i = 0; i < NumSend; i++) { + TEST_TRUE(Context.RecvdSignatures[i] == (uint8_t)(i % 255) + 1) + } + } + + // Server side multi receive. MultiRecvNumSend Sends and Complete every 8 sends + // Possible packet split + { + uint32_t BufferSize = 2048; + QUIC_BUFFER Buffer { BufferSize, Buffer10M }; + int NumSend = MultiRecvNumSend; + + MultiReceiveTestContext Context; + MsQuicAutoAcceptListener Listener(Registration, ServerConfiguration, MultiReceiveTestContext::ConnCallback, &Context); + TEST_QUIC_SUCCEEDED(Listener.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Listener.Start("MsQuicTest")); + QuicAddr ServerLocalAddr; + TEST_QUIC_SUCCEEDED(Listener.GetLocalAddr(ServerLocalAddr)); + + MsQuicConnection Connection(Registration); + TEST_QUIC_SUCCEEDED(Connection.GetInitStatus()); + + TEST_QUIC_SUCCEEDED(Connection.Start(ClientConfiguration, ServerLocalAddr.GetFamily(), QUIC_TEST_LOOPBACK_FOR_AF(ServerLocalAddr.GetFamily()), ServerLocalAddr.GetPort())); + TEST_TRUE(Connection.HandshakeCompleteEvent.WaitTimeout(TestWaitTimeout)); + TEST_TRUE(Connection.HandshakeComplete); + + MsQuicStream Stream(Connection, QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, MultiReceiveTestContext::ClientStreamCallback, &Context); + TEST_QUIC_SUCCEEDED(Stream.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Stream.Start(QUIC_STREAM_START_FLAG_IMMEDIATE)); + + int lastCompleted = -1; + for (int i = 0; i < NumSend; i++) { + Buffer.Buffer[BufferSize-1] = ((uint8_t)i % 255) + 1; + TEST_QUIC_SUCCEEDED(Stream.Send(&Buffer, 1, i == NumSend - 1 ? QUIC_SEND_FLAG_FIN : QUIC_SEND_FLAG_NONE)); + TEST_TRUE(Context.PktRecvd[i].WaitTimeout(TestWaitTimeout)); + if ((i + 1) % 8 == 0) { // ReceiveComplete every 8 sends + Context.ServerStream->ReceiveComplete(BufferSize * (i - lastCompleted)); + lastCompleted = i; + } + } + if (lastCompleted != NumSend - 1) { + Context.ServerStream->ReceiveComplete(BufferSize * (NumSend - lastCompleted - 1)); + } + + for (int i = 0; i < NumSend; i++) { + TEST_TRUE(Context.RecvdSignatures[i] == (uint8_t)(i % 255) + 1) + } + } + + // Server side multi receive. Send 1G bytes + // handle MAX_STREAM_DATA and STREAM_DATA_BLOCKED, + // potential multi chunk and multi range + { + uint32_t BufferSize = sizeof(Buffer10M); + QUIC_BUFFER Buffer { BufferSize, Buffer10M }; + int NumSend = 1; + MultiReceiveTestContext Context; + for (uint32_t i = 0; i < BufferSize; i++) { + Buffer10M[i] = (uint8_t)(i % 255) + 1; + } + // alloc 1G + Context.RecvBuffer = new(std::nothrow) uint8_t[BufferSize]; + memset(Context.RecvBuffer, 0, BufferSize); + Context.TotalSendBytes = BufferSize; + + MsQuicAutoAcceptListener Listener(Registration, ServerConfiguration, MultiReceiveTestContext::ConnCallback, &Context); + TEST_QUIC_SUCCEEDED(Listener.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Listener.Start("MsQuicTest")); + QuicAddr ServerLocalAddr; + TEST_QUIC_SUCCEEDED(Listener.GetLocalAddr(ServerLocalAddr)); + + MsQuicConnection Connection(Registration); + TEST_QUIC_SUCCEEDED(Connection.GetInitStatus()); + + TEST_QUIC_SUCCEEDED(Connection.Start(ClientConfiguration, ServerLocalAddr.GetFamily(), QUIC_TEST_LOOPBACK_FOR_AF(ServerLocalAddr.GetFamily()), ServerLocalAddr.GetPort())); + TEST_TRUE(Connection.HandshakeCompleteEvent.WaitTimeout(TestWaitTimeout)); + TEST_TRUE(Connection.HandshakeComplete); + + MsQuicStream Stream(Connection, QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, CleanUpManual, MultiReceiveTestContext::ClientStreamCallback, &Context); + TEST_QUIC_SUCCEEDED(Stream.GetInitStatus()); + TEST_QUIC_SUCCEEDED(Stream.Start(QUIC_STREAM_START_FLAG_IMMEDIATE)); + + for (int i = 0; i < NumSend; i++) { + TEST_QUIC_SUCCEEDED(Stream.Send(&Buffer, 1, i == NumSend - 1 ? QUIC_SEND_FLAG_FIN : QUIC_SEND_FLAG_NONE)); + + uint64_t CompletingLength = 0; + while (!(Context.PktRecvd[0].WaitTimeout(1))) { + CxPlatLockAcquire(&Context.Lock); + CompletingLength = Context.PseudoProcessingLength; + Context.PseudoProcessingLength = 0; + CxPlatLockRelease(&Context.Lock); + if (CompletingLength > 0) { + Context.ServerStream->ReceiveComplete(CompletingLength); + } + } + if (Context.PseudoProcessingLength > 0) { + Context.ServerStream->ReceiveComplete(Context.PseudoProcessingLength); + Context.PseudoProcessingLength = 0; + } + } + + TEST_TRUE(Context.TotalReceivedBytes == BufferSize * NumSend); + TEST_EQUAL(0, memcmp(Buffer10M, Context.RecvBuffer, BufferSize)); + delete[] Context.RecvBuffer; + } +} +#endif // QUIC_API_ENABLE_PREVIEW_FEATURES diff --git a/src/tools/forwarder/forwarder.cpp b/src/tools/forwarder/forwarder.cpp index 45101d8225..d17ecca2ef 100644 --- a/src/tools/forwarder/forwarder.cpp +++ b/src/tools/forwarder/forwarder.cpp @@ -8,8 +8,12 @@ This tool creates a terminating QUIC proxy to forward all incoming traffic to a specified target. + N.B. Better synchronization between peer objects is needed around teardown. + --*/ +#define QUIC_API_ENABLE_PREVIEW_FEATURES 1 // for multiple receive + #include "msquichelper.h" #include "msquic.hpp" @@ -19,6 +23,7 @@ const char* BackEndTarget; uint16_t BackEndPort; QUIC_CERTIFICATE_HASH Cert; bool BufferedMode = true; +uint32_t FlowControlWindow = 0; const MsQuicApi* MsQuic; MsQuicRegistration* Registration; @@ -26,7 +31,7 @@ MsQuicConfiguration* FrontEndConfiguration; MsQuicConfiguration* BackEndConfiguration; #define USAGE \ - "Usage: quicforward : [0/1-buffered-mode]\n" + "Usage: quicforward : [0/1-buffered-mode] [fc-window]\n" bool ParseArgs(int argc, char **argv) { if (argc < 5) { @@ -49,12 +54,15 @@ bool ParseArgs(int argc, char **argv) { if (argc > 5) { BufferedMode = atoi(argv[5]) != 0; } + if (argc > 6) { + FlowControlWindow = (uint32_t)atoi(argv[6]); + } return true; } struct ForwardedSend { uint64_t TotalLength; - QUIC_BUFFER Buffers[2]; + QUIC_BUFFER Buffers[3]; static ForwardedSend* New(QUIC_STREAM_EVENT* Event) { if (BufferedMode) { auto SendContext = (ForwardedSend*)malloc(sizeof(ForwardedSend) + (size_t)Event->RECEIVE.TotalBufferLength); @@ -73,7 +81,8 @@ struct ForwardedSend { auto SendContext = new(std::nothrow) ForwardedSend; SendContext->TotalLength = Event->RECEIVE.TotalBufferLength; for (uint32_t i = 0; i < Event->RECEIVE.BufferCount; ++i) { - SendContext->Buffers[i] = Event->RECEIVE.Buffers[i]; + SendContext->Buffers[i].Length = Event->RECEIVE.Buffers[i].Length; + SendContext->Buffers[i].Buffer = Event->RECEIVE.Buffers[i].Buffer; } return SendContext; } @@ -90,15 +99,27 @@ QUIC_STATUS StreamCallback( ) { auto PeerStream = (MsQuicStream*)Context; + if (!PeerStream || !PeerStream->Handle) { return QUIC_STATUS_SUCCESS; } switch (Event->Type) { case QUIC_STREAM_EVENT_RECEIVE: { //printf("s[%p] Received %llu bytes\n", Stream, Event->RECEIVE.TotalBufferLength); + if (Event->RECEIVE.TotalBufferLength == 0) { + if (Event->RECEIVE.Flags & QUIC_RECEIVE_FLAG_FIN) { + PeerStream->Shutdown(0, QUIC_STREAM_SHUTDOWN_FLAG_GRACEFUL); + } + return QUIC_STATUS_SUCCESS; + } auto SendContext = ForwardedSend::New(Event); QUIC_SEND_FLAGS Flags = QUIC_SEND_FLAG_START; if (Event->RECEIVE.Flags & QUIC_RECEIVE_FLAG_FIN) { Flags |= QUIC_SEND_FLAG_FIN; } if (Event->RECEIVE.Flags & QUIC_RECEIVE_FLAG_0_RTT) { Flags |= QUIC_SEND_FLAG_ALLOW_0_RTT; } - CXPLAT_FRE_ASSERT(QUIC_SUCCEEDED( - PeerStream->Send(SendContext->Buffers, Event->RECEIVE.BufferCount, Flags, SendContext))); + auto Status = + PeerStream->Send(SendContext->Buffers, Event->RECEIVE.BufferCount, Flags, SendContext); + if (Status == QUIC_STATUS_ABORTED || Status == QUIC_STATUS_INVALID_STATE) { + ForwardedSend::Delete(SendContext); + return QUIC_STATUS_SUCCESS; + } + CXPLAT_FRE_ASSERT(QUIC_SUCCEEDED(Status)); return BufferedMode ? QUIC_STATUS_SUCCESS : QUIC_STATUS_PENDING; } case QUIC_STREAM_EVENT_SEND_COMPLETE: { @@ -191,12 +212,17 @@ int QUIC_MAIN_EXPORT main(int argc, char **argv) { MsQuicApi _MsQuic; CXPLAT_FRE_ASSERT(_MsQuic.IsValid()); MsQuic = &_MsQuic; - MsQuicRegistration Reg(true); + MsQuicRegistration Reg("forwarder", QUIC_EXECUTION_PROFILE_TYPE_MAX_THROUGHPUT, true); // TODO - make a knob for low lat vs max tput Registration = &Reg; MsQuicSettings Settings; Settings.SetSendBufferingEnabled(false); + Settings.SetStreamMultiReceiveEnabled(true); Settings.SetPeerBidiStreamCount(1000); Settings.SetPeerUnidiStreamCount(1000); + if (FlowControlWindow) { + Settings.SetStreamRecvWindowDefault(FlowControlWindow); + Settings.SetConnFlowControlWindow(FlowControlWindow); + } MsQuicConfiguration FrontEndConfig(Reg, Alpn, Settings, MsQuicCredentialConfig(QUIC_CREDENTIAL_FLAG_NONE, &Cert)); CXPLAT_FRE_ASSERT(FrontEndConfig.IsValid()); FrontEndConfiguration = &FrontEndConfig; diff --git a/src/tools/sample/sample.c b/src/tools/sample/sample.c index 9410c23999..dc2f19af51 100644 --- a/src/tools/sample/sample.c +++ b/src/tools/sample/sample.c @@ -36,6 +36,8 @@ --*/ +#define _CRT_SECURE_NO_WARNINGS 1 + #ifdef _WIN32 // // The conformant preprocessor along with the newest SDK throws this warning for @@ -43,6 +45,7 @@ // warning here. This is not an MsQuic bug but a Windows SDK bug. // #pragma warning(disable:5105) +#include #endif #include "msquic.h" #include @@ -99,6 +102,19 @@ HQUIC Registration; // HQUIC Configuration; + +// +// The struct to be filled with TLS secrets +// for debugging packet captured with e.g. Wireshark. +// +QUIC_TLS_SECRETS ClientSecrets = {0}; + +// +// The name of the environment variable being +// used to get the path to the ssl key log file. +// +const char* SslKeyLogEnvVar = "SSLKEYLOGFILE"; + void PrintUsage() { printf( @@ -190,6 +206,116 @@ DecodeHexBuffer( return HexBufferLen; } +void +EncodeHexBuffer( + _In_reads_(BufferLen) uint8_t* Buffer, + _In_ uint8_t BufferLen, + _Out_writes_bytes_(2*BufferLen) char* HexString + ) +{ + #define HEX_TO_CHAR(x) ((x) > 9 ? ('a' + ((x) - 10)) : '0' + (x)) + for (uint8_t i = 0; i < BufferLen; i++) { + HexString[i*2] = HEX_TO_CHAR(Buffer[i] >> 4); + HexString[i*2 + 1] = HEX_TO_CHAR(Buffer[i] & 0xf); + } +} + +void +WriteSslKeyLogFile( + _In_z_ const char* FileName, + _In_ QUIC_TLS_SECRETS* TlsSecrets + ) +{ + printf("Writing SSLKEYLOGFILE at %s\n", FileName); + FILE* File = NULL; +#ifdef _WIN32 + File = _fsopen(FileName, "ab", _SH_DENYNO); +#else + File = fopen(FileName, "ab"); +#endif + + if (File == NULL) { + printf("Failed to open sslkeylogfile %s\n", FileName); + return; + } + if (fseek(File, 0, SEEK_END) == 0 && ftell(File) == 0) { + fprintf(File, "# TLS 1.3 secrets log file, generated by msquic\n"); + } + + char ClientRandomBuffer[(2 * sizeof(((QUIC_TLS_SECRETS*)0)->ClientRandom)) + 1] = {0}; + + char TempHexBuffer[(2 * QUIC_TLS_SECRETS_MAX_SECRET_LEN) + 1] = {0}; + if (TlsSecrets->IsSet.ClientRandom) { + EncodeHexBuffer( + TlsSecrets->ClientRandom, + (uint8_t)sizeof(TlsSecrets->ClientRandom), + ClientRandomBuffer); + } + + if (TlsSecrets->IsSet.ClientEarlyTrafficSecret) { + EncodeHexBuffer( + TlsSecrets->ClientEarlyTrafficSecret, + TlsSecrets->SecretLength, + TempHexBuffer); + fprintf( + File, + "CLIENT_EARLY_TRAFFIC_SECRET %s %s\n", + ClientRandomBuffer, + TempHexBuffer); + } + + if (TlsSecrets->IsSet.ClientHandshakeTrafficSecret) { + EncodeHexBuffer( + TlsSecrets->ClientHandshakeTrafficSecret, + TlsSecrets->SecretLength, + TempHexBuffer); + fprintf( + File, + "CLIENT_HANDSHAKE_TRAFFIC_SECRET %s %s\n", + ClientRandomBuffer, + TempHexBuffer); + } + + if (TlsSecrets->IsSet.ServerHandshakeTrafficSecret) { + EncodeHexBuffer( + TlsSecrets->ServerHandshakeTrafficSecret, + TlsSecrets->SecretLength, + TempHexBuffer); + fprintf( + File, + "SERVER_HANDSHAKE_TRAFFIC_SECRET %s %s\n", + ClientRandomBuffer, + TempHexBuffer); + } + + if (TlsSecrets->IsSet.ClientTrafficSecret0) { + EncodeHexBuffer( + TlsSecrets->ClientTrafficSecret0, + TlsSecrets->SecretLength, + TempHexBuffer); + fprintf( + File, + "CLIENT_TRAFFIC_SECRET_0 %s %s\n", + ClientRandomBuffer, + TempHexBuffer); + } + + if (TlsSecrets->IsSet.ServerTrafficSecret0) { + EncodeHexBuffer( + TlsSecrets->ServerTrafficSecret0, + TlsSecrets->SecretLength, + TempHexBuffer); + fprintf( + File, + "SERVER_TRAFFIC_SECRET_0 %s %s\n", + ClientRandomBuffer, + TempHexBuffer); + } + + fflush(File); + fclose(File); +} + // // Allocates and sends some data over a QUIC stream. // @@ -682,6 +808,14 @@ ClientConnectionCallback( ) { UNREFERENCED_PARAMETER(Context); + + if (Event->Type == QUIC_CONNECTION_EVENT_CONNECTED) { + const char* SslKeyLogFile = getenv(SslKeyLogEnvVar); + if (SslKeyLogFile != NULL) { + WriteSslKeyLogFile(SslKeyLogFile, &ClientSecrets); + } + } + switch (Event->Type) { case QUIC_CONNECTION_EVENT_CONNECTED: // @@ -802,6 +936,7 @@ RunClient( QUIC_STATUS Status; const char* ResumptionTicketString = NULL; + const char* SslKeyLogFile = getenv(SslKeyLogEnvVar); HQUIC Connection = NULL; // @@ -825,6 +960,13 @@ RunClient( } } + if (SslKeyLogFile != NULL) { + if (QUIC_FAILED(Status = MsQuic->SetParam(Connection, QUIC_PARAM_CONN_TLS_SECRETS, sizeof(ClientSecrets), &ClientSecrets))) { + printf("SetParam(QUIC_PARAM_CONN_TLS_SECRETS) failed, 0x%x!\n", Status); + goto Error; + } + } + // // Get the target / server name or IP from the command line. // diff --git a/src/tools/spin/spinquic.cpp b/src/tools/spin/spinquic.cpp index ec1cafaefc..71140c0f76 100644 --- a/src/tools/spin/spinquic.cpp +++ b/src/tools/spin/spinquic.cpp @@ -879,6 +879,7 @@ void SpinQuicGetRandomParam(HQUIC Handle, uint16_t ThreadID) uint32_t Level = (uint32_t)GetRandom(ARRAYSIZE(ParamCounts)); uint32_t Param = (uint32_t)GetRandom(((ParamCounts[Level] & 0xFFFFFFF)) + 1); uint32_t Combined = ((Level+1) << 28) + Param; + Combined &= ~QUIC_PARAM_HIGH_PRIORITY; // TODO: enable high priority GetParam uint8_t OutBuffer[200]; uint32_t OutBufferLength = (uint32_t)GetRandom(sizeof(OutBuffer) + 1); diff --git a/submodules/clog b/submodules/clog index ca6e640fbf..f13417108b 160000 --- a/submodules/clog +++ b/submodules/clog @@ -1 +1 @@ -Subproject commit ca6e640fbf7f53ec9de915f1f4d852c10d874d13 +Subproject commit f13417108b0f77260baec4784cf104fb9aff7576 diff --git a/submodules/googletest b/submodules/googletest index 1d17ea141d..ff233bdd4c 160000 --- a/submodules/googletest +++ b/submodules/googletest @@ -1 +1 @@ -Subproject commit 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2 +Subproject commit ff233bdd4cac0a0bf6e5cd45bda3406814cb2796 diff --git a/submodules/xdp-for-windows b/submodules/xdp-for-windows index ce228a986f..eaf99076b9 160000 --- a/submodules/xdp-for-windows +++ b/submodules/xdp-for-windows @@ -1 +1 @@ -Subproject commit ce228a986fd30049ed58f569d2bf20efffc250f3 +Subproject commit eaf99076b917dd0df6fe849399b45982dd60e9f5 diff --git a/version.json b/version.json index b59daf9539..8feea53b2b 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{ "major": 2, "minor": 4, "patch": 0 } +{ "major": 2, "minor": 5, "patch": 0 }