* Package openssl files into a nuget for distribution
* Add nuget to path
* Package nuget on windows
* Add schannel builds, update licenses
* Add commit hash to package
* Insert repo url into package
* Start work on distribution
* yaml
* Another try
* Some more updates
* Fix package distribution
* Another join path fix
* Another fix
* Add all other builds
* Add distribution step to pipeline
* Fix indentation
* Adds tests yml
* Package distribution zips in public pipeline
* Fix trigger
* Another try
* Fixup trigger
* Another attempt at triggering tests
* Try again
* Add minimum compiler requirements for CI builds
For builds coming out of our CI, we want a minimum set up required flags and definitions, both for compliance and performance reasons. On linux, these checks are properly handled if missing at runtime, but we want them there in the binaries we build
* Fixup checks
* Clean up linux a bit
* Fix build, add lttng check
Muscle memory has me hitting tab once to access build.ps1. However, build-kernel.cmd is higher in the sort order when just b is entered. Rename the script to fix this
Remove excess prints from static builds
Remove gmock and gtest_main from builds
Allow using alternate build systems on windows builds with warning about dev command promt
Tested with VS 2022. Default is still 2019. Might add an option later to automatically detect 2022
* Pregenerate clog files
This removes the build time dependency on clog, which removes the build time dependency on .NET
* Add a few missing logs, cleanup
* Fixup linux build
* Make linux builds default to parallel
* Only install clog for dev, fix builds without logging
* Only link include dirs to logged programs
* Add support for building openssl with jom
Jom is a QT NMAKE replacement which supports parallel builds. Its done as an optional dependency to make builds still work without it installed
* Fix prepare machine
* Fixup cmake targets for openssl
* Extra comment
* Fully remove cache support
* Clean up code relating to cache
* Add initial static library support
* Revert change to msquic.lttng target
Also adds a missing newline at init.c's EOF
* Add whole static lib archiving support
* Add static build configuration to windows platforms in build.ps1 and
exclude system libs
* Invert build.ps1 switch and add documentation
* Resolve static link issues with repeated definition of QuicTraceRundown
* Add win32 static configurations to the azure pipeline build job lists
* Correctly ignore MSVC runtime libraries and fix documentation
* Passively create the static lib directly if it doesn't exist
In the event that a different output directory is specified, cmake's
generator will generally create the directory if it doesn't exist.
For the static monolith however, we emit the file with link.exe
directly, and this will fail if the parent directory doesn't exist.
* Try fix CI
* Add STATIC target annotation on perflib and testlib
* Reject libs without a valid ARCHIVE_OUTPUT_DIRECTORY path and inject CI
cached binaries
* Try to fix tests
* Force static build of gtest and support statically linked tools
* Remove kernel static build mods and handle MsQuicUnload in atexit
handlers
* Enforce a different means to enforce static builds for gtest artifacts
* Fix interop static
* One more?
* Change static linkage load/unload invocations to lazy lockfree approach
* Re-add exclusion list which was needed for the release build
* Introduce empty.c file and make msquic_static library a physical target
* Add missing InterlockedAnd to advertise the unloading sequence is
complete
* Inline MsQuicOpen to prevent duplicate symbol issues on Windows
* Temp workaround - Just use macro
* One more fix
Co-authored-by: Nick Banks <nibanks@microsoft.com>
* Add helper script for grabbing build config and artifact directory for local machine
* Make script only a single purpose
* Allow empty parameter
* Don't pass a default for platform
* Run release mode tests in CI
The internal windows build uses release mode msquic and msquictest binaries, however this is not tested anywhere in CI. Its possible for tests to be added that break this, and this won't then be detectable until a windows build. Run a build in CI so this can be detected early
* Fix stage name
* Disable certficiate tests and fix datagram tests in release mode
* Fix more handshake things
* 1 last fix
* Fix build deps
* Disable nth alloc in releasem ode
* Filters
* Fix OpenSSL failure.
* Fix CID allocation issue. Allow MsQuicOpen to fail.
* Fix UDP clean up on failure on Windows.
* Kill client connection when no DestCid is available.
Co-authored-by: Nick Banks <nibanks@microsoft.com>
Linux has a lot of performance fluctuation, and we don't currently have the time or knowledge to work on this. Its a future goal, but for now just increase the thresholds
* Average the last 5 results of runs for performance comparison
That way a jump from low to high doesn't break everything
* Fix a few variables
* 1 more fix
* Fix objects
* Make number of commits a variable
* Update GetValue function to check for full string, and validate length
Previously, -requests: would match a check for
equest as the strnicmp just checks for length. This changes ensures that the character after the check is a :, and also that the string length for the argument is acceptable
* Add a separate function to grab a flag
* Fix a few missing flags
* Fix pfx path
* Enhance performance logging capabilities
Use the existing log scripts to perform logging, allow perf pipeline to log any supported log profile
* Fixup log profile
* Fix script root
* Fix cleanup
* A bit more logging, mainly to figure out why robocopy failed. And fix local
* Fix remote
* Another client and server fix
* Fix runs
* Disable prints
* Extra new line..
* 1 more log fix
* Add stats logging option to perf, log debug output to file
Logging connection stats can be an easy way to debug certain issues with the performance tool. Add an option to make this work.
By default, the pwsh script only prints logs in debug mode. Instead, write all output to a file as well, so this can be later reviewed as well. Otherwise all data from step 1 would just be lost.
* Fix builds
* Spacing nit
* Removing extra comma
* Fix incorrect log file
* Extra backtick
* 1 more parameter check
* Actually log local results
* Add build version to machine name
* Fix log name
* Hopefully 1 last fix
* Don't overwrite release logs with debug logs
* Toggle kernel as well
Co-authored-by: Nick Banks <nibanks@microsoft.com>
* Default to send buffering off in secnetpert
We usually want to be testing with no send buffering, however thats not the default. That makes manual testing more difficult, as thats something we have to explicitly set. Make the default no send buffering, and require it to be enabled explcitly
* Adjust tcp throughput thresholds
Implement server-side validation of client certificates in Schannel. Add new tests to ensure that client certificates are validated.
QUIC_CREDENTIAL_FLAG_REQUIRE_CLIENT_AUTHENTICATION will automatically turn on client certificate validation, but client certificates that fail validation will cause the handshake to fail.
QUIC_CREDENTIAL_FLAG_DEFER_CERTIFICATE_VALIDATION is required to allow the handshake to proceed with client certificates that fail validation
* Properly handle IPv4 addresses in Invoke-EtwTraceCollection
Because of the port number, an IPv4 address would actually enter the IPv6 case in the regex, which would then not match. Explicitly check IPv4 first before checking IPv6.
* Fix naming
* Remove stub TLS
We were only using stub TLS to be compatible with ASAN. Now that OpenSSL and Asan work together, we can remove stub TLS and reduce our TLS scope.
* Attempt to run Asan on OpenSSL builds instead of Stub builds
* Fix build
* Fix openssl asan, fix resumption leak
* Properly fix resumption ticket buffer
* Free Key in CryptTest
* Missed a few other frees
* Async read streams
There is a deadlock that exists in the existing code, which can happen if there is a large stderror write
* Fix leak of openssl session
* Replace stub spinquic with asan openssl spinquic
* Fixup spinquic
Co-authored-by: Nick Banks <nibanks@microsoft.com>
* Fix Cmake generator arguments
CMake 3.20 seems to have gotten a lot more strict on the generator arguments. Properly use quotes, and also use -G not -g for generator
* Revert quotes
* Another fix test
* Only add quotes if generator has spaces
* Try lowercase ninja
* Actually fix build...
* 1 last fix
* Fix arm build
Theres no direct flag in powershell to detect which architecture is being used. Use uname to get the processor, and if it shows up as x86_64 check to see if we're running in translated mode.
Works on an M1 mac. CI as that is running native on Intel, that will test the native intel case. Native arm powershell does not exist yet, but when it does that case is handled as well
* Support multiple instances of secnetperf in kernel mode
This way loopback tests can be supported. Done by allowing user to supply driver name
* Get working with loopback and remote
* Run for infinite time
* Rename quicperf to netsecperf
Since TCP is now included, its now a network security perf test tool, not just quic perf
* Fix file names
* Fix clog
* 1 more name fix
* Add WANPerf previous result comparisons
Currently, only works for mainline builds and not periodic. Also doesn't currently fail on regressions
* Missing variable
* Trailing ocmma
* Fix wrong variable
* Clean up prints, remove extra file, enable periodic
* Use system libcrypto
* Only use system crypto if found
* Make system openssl optional, fix incorrect artifact upload, allow publishing multiples of same base artifacts
* Test system libcrypto build
* Fix platform build
Apple recommends shipping universal binaries on macOS, and actually require it if shipping to store. The easiest way to do this is post build. This adds a script that will merge all artifact binaries that can then be used and shipped.
Not currently hooked into azure, as this requires we build both platforms with the same tls provider, and arm64 openssl builds have issues there. I did test this locally, and got universal binaries that worked.
* Add support for building arm64 binaries on macOS
This will not create universal binaries, that is better handled as a post processing step to merge the 2 output libraries together
* Fixup multiple binaries
* Try forcing arm compiler openssl
* Work on getting stub arm64 working
* Fixup custom assembly
* Remove current, replace with empty
By default, destroy will ensure all trace data has been finalized before returning. When cancelling, we don't need this behavior, so pass the no wait flag, which massively reduces the amount of time needed for logging
Adds macos support to msquic.
Currently, it builds, and core tests will pass, but many datapath tests will not. This is because the datapath depends on ipv4 and ipv6 dual mode sockets, which have issues on macos. However, we want this merged so it doesn't get 4 months stale again.
The datapath is basically a clone of the epoll datapath, except using kqueue.
Co-authored-by: Max <mxms@me.com>
Co-authored-by: Nick Banks <nibanks@microsoft.com>
Co-authored-by: Lars Eggert <200328+larseggert@users.noreply.github.com>
* Add support for RSS on linux
We had a thread per socket context, so we only needed to configure the bpf for rss to get it working
* Hard affinitize
* Remove hard affinitizing threads
* Keep trying sidechannel shutdown
* Set current thread affinity properly on linux
* Try to fix rps clients ending
* Actually use proper start time
* Use diff
* Add watchdog timeout
* Fix thread context, fix printf
* Properly stop threads upon client destruction
* Add override specifier
* Print ulimit
* Another ulimit attempt
* Add watchdog back in, force rlimit to max
* Fix unreachable
* Only run RPS tests, collect logs
* Print out why conn dies
* Fix rss impl
* Fix per proc context
* Fixup code
* 1 more semicolon
* 1 more socket count fix
* Fixup extra added things
* Don't pair client socket proc and thread proc
* Fix review comments
* Start work on linux perf
* Add linux rps and hps tests
* Remove test functions
* Add linux perf
* Add low latency rps
* Use new machines for loopback too
* Fix windows tests
* Fix Powershell not installing correctly
Azure VM's updated, which broke powershell packages. Make install script take a parameter of which OS to use
* Passed args incorrectly
* Use 18.04 for raspbian build
* Rename quicperf driver to quicperfdrv, add private instance
Changing the name makes symbols not interfere between executable and driver, and we need a version that links into shipping msquic for internel tests
* Fix spacing, move to single argument with different config
* Fix error
* Fix a build break
* Actually properly check kernelpriv
* Use SMB copy if possible for perf copy
* Fix how copy works
* Use cmdlet to get smb share path
* Another attempt at not failing
* A bit more debug
* One more error code fix
* 1 more
* Add full RPS matrix, and a pipeline to run it.
Pipeline is manual only currently, and test suite likely needs more, but adding more is easy once this is going
* Fix name to periodic, trigger the blank space group
* fixup comments, add cron trigger
* Fix yaml
* Another yaml fix
* Turn into full run matrix
* Catch on missing old results
* Expand timeout to 5 hours
* Another timeout fix attempt
* 1 more attempt at timeout fixes
* Add support for running tests as a full matrix rather then a default and changing 1 variable.
Necessary for long run RPS tests
* Revert fake matrix, it works
* Cleanup perf scripts
This removes a lot of what was generic about the remotes, and instead moves remote to a common root context.
This makes new tests much easier to add, especially once we get the full matrix RPS
* Fix progress preference
* Add forced test failures to check logs, work on making script selectable
* Run way less tests
* disable more tests, fix assert, force assert in spinquic too
* Revert all test changes, finish up script
* Get performance data from perf repo branch
This will properly have data for branches
* Fix hps tests, add flag to force a compare branch name
* Fixup date parsing
* Initial New Pipeline Changes for Perf Post Processing
* Put branch name in auth key location
We can't safely add a new variable, but auth key is overwritten by the db publish script, so we can hijack that for now
* Another trial for post processing failures
* Fix path
* Fix how git clones, fix paths
* Force inline script
* Fix up publishing
* Fix up arguments...
Co-authored-by: Nick Banks <nibanks@microsoft.com>
Removes both the macro definition and the user code line for each trace. Makes it so file is half the number of lines, and updates to the caller variables will not require a sidecar update
* Fail build if throughput up test has a 5% or more performance drop
* Allow tests to finish, write failures at end
* Move thesholds to json files
* Fail loopback on regressions to, but use larger threshold
* Fix arguments
* Actual print failures at end
* Fix all negative regressions not counting
* Print more
* Slightly different output
* Fix not triggering
Co-authored-by: Nick Banks <nibanks@microsoft.com>
RPS latency numbers are recorded for every RPS run, as there is no noticeable impact on performance for doing so.
These latency numbers are currently not uploaded to the Database, they will be added at a later date. They are printed though.
Histograms of latency percentiles are also generated. Currently only the numbers from the last run of a set are uploaded to artifacts.
A 60 connection test was added to reduce utilization to a constant level.
0 size for upload or download doesn't make sense, as that case is handled by RPS, and you get no data (other then a single useless latency number) out of in in tput.
Then make 0 for all 3 tests an error, so 0's don't accidentally get uploaded to the server.
Also makes the test runner error if a 0 is received
* Rever a bunch of changes
* Send UDP timeout
* Reorder read
* Workarounds for timeout issue
* Fix reverts
* Handle errors properly
* Fix linux
* Cleanup in destructor
* Use ConnectionScope instead of manual deletion
* Add missing delete[] operator
* 1 more thing
* Create dumps on perf failures
* Destructors run before elements are destructed
* Fix kernel build
* Few other small fixes
* Some more testing, potential registration issue
* remove dump
* Add prints to error states in perf testing to display where initialization is failing
* Print current user and other small bugs found.
* Only print user name on windows
* Revert user print
* IOCTL Interface for MsQuic Performance Counters
* Add msquic_ioctl header, test API
* Remove all the file object stuff
* Remove service reading code
* Add ioctl test, onboard into CI pipeline
Still a bit of cleanup to do
* Incorrect test path name
* Fix review comments, clean up service stop code
* Fix clog issues
* Add ioctl header and test library to windows distribution
* nit: extra lines
* fix logs
Co-authored-by: Thad House <thhous@microsoft.com>
Starts the client portion of #462
Some interop tests still fail, and further investigation is needed.
Co-authored-by: Nick Banks <nibanks@microsoft.com>
Matrix values were incorrect, and defaults were always being used. Throughput this didn't matter, RPS it did matter a lot. Also increases the test timeout, some of the RPS tests take longer to finish
* Combine loopback and remote into a single script.
By doing this, we make things much easier for PGO
* Fix perf pipeline
* Fix tools lookup
* Update PGO
* Create logs in the right place (/logs not /log)
* Unbuffer clog2text_lttng.
I only tested the "handshake" test case. With these changes, quic.log is now
always created. But there is still a race condition of some sort, because in
most of the runs, all it contains is something like "Decoded 0 in
00:00:00.0018700". In some runs, however, almost 50K of log are written.
* Add sidechannel to perf runner to enable stopping the tests safely internally.
Only currently implemented in user mode, kernel mode will be different but done when kernel mode is finished
The TLS alert buffer was being provided to Schannel incorrectly, causing the alert to always be zero.
A new TLS test was introduced to the platform unittests to cover this as well.
Adds a script to make it easier to run quicping.exe for repro and debugging purposes.
Skip TlsTest.CertificateError on non-Schannel platforms.
Fixes#255
New performance driver is custom built specifically for performance, rather then using quicping.
Also will be compatible with server mode, and baseline support is part of this commit.