1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2026-01-06 03:41:10 +03:00

Packets inflight, packets sent in OutstandingPacketMetadata

Summary:
- Adds counter of the number of ack-eliciting packets sent; useful for understanding lost / retransmission numbers
- Adds the following to `OutstandingPacketMetadata`
  - # of packets sent and # of ack-eliciting packets sent; this enables indexing of each packet when processed by an observer on loss / RTT event, including understanding its ordering in the flow of sent packets.
  - # of packets in flight; useful during loss analysis to understand if self-induced congestion could be culprit
- Fixes the inflightBytes counter in `OutstandingPacketMetadata`; it was previously _not_ including the packets own bytes, despite saying that it was.

Right now we are passing multiple integers into the `OutstandingPacket` constructor. I've switched to passing in `LossState` to avoid passing in two more integers, although I will need to come back and clean up the existing ones.

Differential Revision: D25861702

fbshipit-source-id: e34c0edcb136bc1a2a6aeb898ecbb4cf11d0aa2c
This commit is contained in:
Brandon Schlinker
2021-01-21 21:10:07 -08:00
committed by Facebook GitHub Bot
parent 4c5874e062
commit f206c5125b
18 changed files with 356 additions and 150 deletions

View File

@@ -667,6 +667,7 @@ void updateConnection(
DCHECK(!packetEvent);
return;
}
conn.lossState.totalAckElicitingPacketsSent++;
auto packetIt =
std::find_if(
conn.outstandings.packets.rbegin(),
@@ -679,12 +680,18 @@ void updateConnection(
auto& pkt = *conn.outstandings.packets.emplace(
packetIt,
std::move(packet),
std::move(sentTime),
sentTime,
encodedSize,
isHandshake,
isD6DProbe,
// these numbers should all _include_ the current packet
// conn.lossState.inflightBytes isn't updated until below
// conn.outstandings.numOutstanding() + 1 since we're emplacing here
conn.lossState.totalBytesSent,
conn.lossState.inflightBytes);
conn.lossState.inflightBytes + encodedSize,
conn.outstandings.numOutstanding() + 1,
conn.lossState);
if (isD6DProbe) {
++conn.d6d.outstandingProbes;
++conn.d6d.meta.totalTxedProbes;