Skip to content

Commit

Permalink
Add a transport setting to diable time based flow control updates
Browse files Browse the repository at this point in the history
Summary: to experiment with

Reviewed By: sharmafb

Differential Revision: D60847248

fbshipit-source-id: 8e6b873331edfb87319e0758c6946461647c288f
  • Loading branch information
kvtsoy authored and facebook-github-bot committed Aug 7, 2024
1 parent 0801517 commit 6652c38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quic/flowcontrol/QuicFlowController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Optional<uint64_t> calculateNewWindowUpdate(
(updateTime - *lastSendTime) >
transportSettings.flowControlRttFrequency * srtt;
// If we are autotuning then frequent updates aren't required.
if (enoughTimeElapsed && !transportSettings.autotuneReceiveConnFlowControl) {
if (transportSettings.enableFlowControlTimeBasedUpdates &&
enoughTimeElapsed && !transportSettings.autotuneReceiveConnFlowControl) {
return nextAdvertisedOffset;
}
bool enoughWindowElapsed = (curAdvertisedOffset - curReadOffset) *
Expand Down
3 changes: 3 additions & 0 deletions quic/state/TransportSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ struct TransportSettings {
bool enableWriterBackpressure{false};
// Ack timeout = SRTT * ackTimerFactor
double ackTimerFactor{kAckTimerFactor};
// If flow control updates should be sent based on time passed since last
// update.
bool enableFlowControlTimeBasedUpdates{true};
};

} // namespace quic

0 comments on commit 6652c38

Please sign in to comment.