Skip to content
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

Add support for setting TypeOfService/TrafficClass on connections #4757

Merged
merged 14 commits into from
Feb 5, 2025

Conversation

anrossi
Copy link
Contributor

@anrossi anrossi commented Jan 21, 2025

Description

Resolves #4767. Add support for applications to set the Type of Service/Traffic Class field all traffic sent from a connection.

Testing

Updated

Documentation

Updated the settings document with the new get/set param.

src/core/connection.c Outdated Show resolved Hide resolved
src/core/binding.c Outdated Show resolved Hide resolved
src/core/connection.c Outdated Show resolved Hide resolved
src/core/connection.c Outdated Show resolved Hide resolved
src/inc/msquic.h Outdated Show resolved Hide resolved
src/inc/quic_datapath.h Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.97%. Comparing base (451c1a8) to head (4d0a580).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4757      +/-   ##
==========================================
- Coverage   87.00%   85.97%   -1.04%     
==========================================
  Files          56       56              
  Lines       17400    17422      +22     
==========================================
- Hits        15139    14978     -161     
- Misses       2261     2444     +183     

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

nibanks
nibanks previously approved these changes Feb 5, 2025
@nibanks
Copy link
Member

nibanks commented Feb 5, 2025

Cargo needs to be updated.

diff --git a/src/ffi/linux_bindings.rs b/src/ffi/linux_bindings.rs
index bca39d7..3[5](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698324675?pr=4757#step:12:6)b5a86 100644
--- a/src/ffi/linux_bindings.rs
+++ b/src/ffi/linux_bindings.rs
@@ -199,[6](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698324675?pr=4757#step:12:7) +199,7 @@ pub const QUIC_PARAM_CONN_TLS_SECRETS: u32 = 83886099;
 pub const QUIC_PARAM_CONN_STATISTICS_V2: u32 = 83886102;
 pub const QUIC_PARAM_CONN_STATISTICS_V2_PLAT: u32 = 83886103;
 pub const QUIC_PARAM_CONN_ORIG_DEST_CID: u32 = 83886104;
+pub const QUIC_PARAM_CONN_SEND_DSCP: u32 = 83886105;
 pub const QUIC_PARAM_TLS_HANDSHAKE_INFO: u32 = 100663296;
 pub const QUIC_PARAM_TLS_NEGOTIATED_ALPN: u32 = 10066329[7](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698324675?pr=4757#step:12:8);
 pub const QUIC_PARAM_STREAM_ID: u32 = 13421772[8](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698324675?pr=4757#step:12:9);

and

diff --git a/src/ffi/win_bindings.rs b/src/ffi/win_bindings.rs
index aa[7](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698342087?pr=4757#step:12:8)b544..df218d8 100644
--- a/src/ffi/win_bindings.rs
+++ b/src/ffi/win_bindings.rs
@@ -193,6 +193,7 @@ pub const QUIC_PARAM_CONN_TLS_SECRETS: u32 = [8](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698342087?pr=4757#step:12:9)3886099;
 pub const QUIC_PARAM_CONN_STATISTICS_V2: u32 = 83886102;
 pub const QUIC_PARAM_CONN_STATISTICS_V2_PLAT: u32 = 83886103;
 pub const QUIC_PARAM_CONN_ORIG_DEST_CID: u32 = 83886104;
+pub const QUIC_PARAM_CONN_SEND_DSCP: u32 = 83886105;
 pub const QUIC_PARAM_TLS_HANDSHAKE_INFO: u32 = 1006632[9](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698342087?pr=4757#step:12:10)6;
 pub const QUIC_PARAM_TLS_NEGOTIATED_ALPN: u32 = [10](https://github.com/microsoft/msquic/actions/runs/13151014603/job/36698342087?pr=4757#step:12:11)0663297;
 pub const QUIC_PARAM_TLS_SCHANNEL_CONTEXT_ATTRIBUTE_W: u32 = 117440512;

Copy link
Member

@nibanks nibanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the CI passes, ship it!

@anrossi anrossi merged commit 8eb966d into main Feb 5, 2025
482 of 485 checks passed
@anrossi anrossi deleted the anrossi/dscp-support branch February 5, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Specifying DSCP for QUIC Connections
3 participants