Skip to content

Commit

Permalink
Write ACK_EXTENDED frame when supported by peer
Browse files Browse the repository at this point in the history
Summary:
Write the new ACK_EXTENDED frame. When any of the ACK_EXTENDED features are enabled locally and supported by the peer, this frame type will take precedence over ACK_ECN and ACK_RECEIVETIMESTAMPS. See first diff in the stack for the features.

Frame format:
```
ACK_EXTENDED Frame {
  Type (i) = 0xB1
  // Fields of the existing ACK (type=0x02) frame:
  Largest Acknowledged (i),
  ACK Delay (i),
  ACK Range Count (i),
  First ACK Range (i),
  ACK Range (..) ...,
  Extended Ack Features (i),
  // Optional ECN counts (if bit 0 is set in Features)
  [ECN Counts (..)],
  // Optional Receive Timestamps (if bit 1 is set in Features)
  [Receive Timestamps (..)]
}
// Fields from the existing ACK_ECN frame
ECN Counts {
  ECT0 Count (i),
  ECT1 Count (i),
  ECN-CE Count (i),
}
// Fields from the existing ACK_RECEIVE_TIMESTAMPS frame
Receive Timestamps {
  Timestamp Range Count (i),
  Timestamp Ranges (..) ...,
}
Timestamp Range {
  Gap (i),
  Timestamp Delta Count (i),
  Timestamp Delta (i) ...,
}
```

Reviewed By: sharmafb

Differential Revision: D68931148

fbshipit-source-id: 0fb4bac23e121f82a11602daabc1ec7084db43dd
  • Loading branch information
jbeshay authored and facebook-github-bot committed Feb 24, 2025
1 parent 622d9d7 commit f991c3f
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions proxygen/httpserver/samples/hq/HQCommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,20 @@ DEFINE_uint32(
max_ack_receive_timestamps_to_send,
quic::kMaxReceivedPktsTimestampsStored,
"Controls how many packet receieve timestamps the peer should send");
DEFINE_uint32(
extended_ack_features,
0,
"Replace the ACK frame with ACK_EXTENDED with the following features."
"The bitwise values can be ORed together."
"bit 1 - ECN support"
"bit 2 - Receive timestamps support"
"Example: 3 means both ECN and receive timestamps are supported");
DEFINE_uint32(advertise_extended_ack_features,
0,
"Advertise ACK_EXTENDED frame support to the peer. The following"
"bitwise values can be ORed together:"
"bit 1 - ECN support"
"bit 2 - Receive timestamps support"
"Example: 3 means both ECN and receive timestamps are supported");
DEFINE_uint32(enable_extended_ack_features,
0,
"Replace the ACK frame with ACK_EXTENDED when supported by the "
"peer. The following bitwise values can be ORed together:"
"bit 1 - ECN support"
"bit 2 - Receive timestamps support"
"Example: 3 means both ECN and receive timestamps are supported");
DEFINE_bool(initiate_key_updates,
false,
"Whether to initiate periodic key updates");
Expand Down Expand Up @@ -316,7 +322,9 @@ void initializeTransportSettings(HQToolParams& hqUberParams) {
hqParams.transportSettings.disableMigration = false;

hqParams.transportSettings.advertisedExtendedAckFeatures =
FLAGS_extended_ack_features;
FLAGS_advertise_extended_ack_features;
hqParams.transportSettings.enableExtendedAckFeatures =
FLAGS_enable_extended_ack_features;
} // initializeTransportSettings

void initializeHttpServerSettings(HQToolServerParams& hqParams) {
Expand Down

0 comments on commit f991c3f

Please sign in to comment.