Skip to content

Fix DSCP detection on Windows. Add DSCP support to SecNetPerf #5130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 13, 2025

Conversation

anrossi
Copy link
Contributor

@anrossi anrossi commented May 29, 2025

Description

DSCP detection on Windows was incorrect and setting an invalid value, which would always error, causing MsQuic to determine DSCP to not be supported. This change fixes that bug, and also adds support to SecNetPerf to set DSCP on outgoing packets. It also adds support for receiving DSCP to the Windows datapath layers, which enables the DSCP tests to function.

Testing

Updated existing DSCP tests to validate DSCP is getting sent and received as expected.

Documentation

SecNetPerf help text was updated to list the new option.

@anrossi anrossi added this to the Release 2.5 milestone May 29, 2025
@anrossi anrossi requested a review from a team as a code owner May 29, 2025 00:18
@anrossi anrossi added Area: Performance Bug: Platform A code bug in platform/TLS specific code. labels May 29, 2025
Copy link

codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.15%. Comparing base (2e4a9f0) to head (d87bbe2).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5130      +/-   ##
==========================================
- Coverage   87.45%   86.15%   -1.30%     
==========================================
  Files          59       59              
  Lines       18048    18086      +38     
==========================================
- Hits        15783    15582     -201     
- Misses       2265     2504     +239     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sm-msft
Copy link
Contributor

sm-msft commented May 30, 2025

Suggest updating the readme file with help and sample test run data: https://github.com/microsoft/msquic/blob/main/src/perf/readme.md

@nibanks
Copy link
Contributor

nibanks commented Jun 1, 2025

TODO: Tests should be updated/verified to be checking for DSCP

Do you plan to fix this up soon? We need to get this into the release/2.5 branch.

@anrossi
Copy link
Contributor Author

anrossi commented Jun 6, 2025

TODO: Tests should be updated/verified to be checking for DSCP

Do you plan to fix this up soon? We need to get this into the release/2.5 branch.

Ah the problem is that, on receive, windows doesn't fetch the IP_TOS field, just ECN, so this test is failing because now it's actually testing DSCP, and we weren't fetching the DSCP values.
I'd added fetch support for DSCP, which should work downlevel since it has been around for a while.

csujedihy
csujedihy previously approved these changes Jun 12, 2025
@anrossi anrossi merged commit e08fd6e into main Jun 13, 2025
427 of 428 checks passed
@anrossi anrossi deleted the anrossi/fix-dscp-detection branch June 13, 2025 00:18
anrossi added a commit that referenced this pull request Jun 13, 2025
* Fix DSCP detection on Windows. Add DSCP support to SecNetPerf

* Add TypeOfService/TrafficClass on receive to test DSCP

* Don't attempt to receive TOS/TCLASS on Windows Server 2022

* Also mark epoll and raw datapaths as supporting recv DSCP
anrossi added a commit that referenced this pull request Jun 13, 2025
) (#5164)

* Fix DSCP detection on Windows. Add DSCP support to SecNetPerf

* Add TypeOfService/TrafficClass on receive to test DSCP

* Don't attempt to receive TOS/TCLASS on Windows Server 2022

* Also mark epoll and raw datapaths as supporting recv DSCP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Performance Bug: Platform A code bug in platform/TLS specific code.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants