1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-08 09:42:06 +03:00

Round up Quic congestion control writable bytes to nearest multiple of packet

Summary:
Currently we return the exact writable bytes number from a real
congestion controller or Path Challenger. This diff round the number up to the
nearest multiple of packet length. Doing so can greatly reduce weird bytes
counting/checking bugs we have around packet writing.

Reviewed By: mjoras

Differential Revision: D20265678

fbshipit-source-id: 2973dde3acc4b2008337127482185f34e16efb43
This commit is contained in:
Yang Chi
2020-03-05 12:39:54 -08:00
committed by Facebook Github Bot
parent bbb8cb8218
commit df865c4e34
4 changed files with 47 additions and 31 deletions

View File

@@ -2505,6 +2505,7 @@ TEST_F(QuicTransportTest, PacingWillBurstFirst) {
TEST_F(QuicTransportTest, AlreadyScheduledPacingNoWrite) {
transport_->setPacingTimer(TimerHighRes::newTimer(&evb_, 1ms));
auto& conn = transport_->getConnectionState();
conn.udpSendPacketLen = 100;
auto mockCongestionController =
std::make_unique<NiceMock<MockCongestionController>>();
auto rawCongestionController = mockCongestionController.get();