Skip to content

Careful resume structs + encode/decode code #5131

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 19 commits into from
Jun 21, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ For more info, take a look at the [build.ps1](../scripts/build.ps1) script.

By default the build output will go in the `build` folder and the final build binaries in the `artifacts` folder. Under that it will create per-platform folders with subfolders for architecture/tls combinations. This allows for building different platforms and configurations at the same time.

## Updating Clog Sidecar

Some code changes such as adding/updating new MsQuic traces require updating the CLOG sidecar for successful Linux builds. This is done by running the following command:
```PowerShell
./scripts/update-sidecar.ps1
```
This makes any necessary updates to the clog sidecar manifest and the generated files under `src/generated/` folder. The modified files must be committed along with the rest of the code changes for addressing the Linux build failures.

# Building with CMake

The following section details how to build MsQuic purely with CMake commands.
Expand Down
26 changes: 26 additions & 0 deletions src/core/congestion_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,32 @@ typedef struct QUIC_CONGESTION_CONTROL {

} QUIC_CONGESTION_CONTROL;


//
// V1 supports careful resume on 1 path per remote endpoint
//
typedef struct QUIC_CONN_CAREFUL_RESUME_V1 {

// Path RTT parameters
uint64_t SmoothedRtt;
uint64_t MinRtt;

// Remote endpoint and the Path RTT parameters help match the path during Careful Resume
QUIC_ADDR RemoteEndpoint;

// Future Expiration Time in Unix Epoch microsecond units
uint64_t Expiration;

// Congestion algorithm last used
QUIC_CONGESTION_CONTROL_ALGORITHM Algorithm;

// CWND size in bytes for Careful Resume
uint32_t CongestionWindow;

} QUIC_CONN_CAREFUL_RESUME_V1;

typedef struct QUIC_CONN_CAREFUL_RESUME_V1 QUIC_CONN_CAREFUL_RESUME_STATE;

//
// Initializes the algorithm specific congestion control algorithm.
//
Expand Down
2 changes: 2 additions & 0 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,7 @@ QuicConnSendResumptionTicket(
AppDataLength,
AppResumptionData,
Connection->HandshakeTP,
NULL, // No Careful Resumption data
AlpnLength,
Connection->Crypto.TlsState.NegotiatedAlpn + 1,
&TicketBuffer,
Expand Down Expand Up @@ -2112,6 +2113,7 @@ QuicConnRecvResumptionTicket(
Connection->Configuration->AlpnList,
Connection->Configuration->AlpnListLength,
&ResumedTP,
NULL, // No Careful Resumption data
&AppData,
&AppDataLength);
if (QUIC_FAILED(Status)) {
Expand Down
Loading
Loading