logging: pass the packet number to ConnectionTracer.DroppedPacket (#4171)

In most cases the packet number is not known when a packet is dropped,
but it's useful to log the packet number when dropping a duplicate
packet.
This commit is contained in:
Marten Seemann
2023-11-17 13:11:16 +01:00
committed by GitHub
parent 96ab48eb7d
commit 3bf2e19d0d
11 changed files with 95 additions and 70 deletions

View File

@@ -56,8 +56,8 @@ func NewMockConnectionTracer(ctrl *gomock.Controller) (*logging.ConnectionTracer
BufferedPacket: func(typ logging.PacketType, size logging.ByteCount) {
t.BufferedPacket(typ, size)
},
DroppedPacket: func(typ logging.PacketType, size logging.ByteCount, reason logging.PacketDropReason) {
t.DroppedPacket(typ, size, reason)
DroppedPacket: func(typ logging.PacketType, pn logging.PacketNumber, size logging.ByteCount, reason logging.PacketDropReason) {
t.DroppedPacket(typ, pn, size, reason)
},
UpdatedMetrics: func(rttStats *logging.RTTStats, cwnd, bytesInFlight logging.ByteCount, packetsInFlight int) {
t.UpdatedMetrics(rttStats, cwnd, bytesInFlight, packetsInFlight)