gvisor/pkg/tcpip
Bhasker Hariharan bd12e95247 Fix RTT estimation when timestamp option is enabled.
From RFC7323#Section-4

The [RFC6298] RTT estimator has weighting factors, alpha and beta, based on an
implicit assumption that at most one RTTM will be sampled per RTT.  When
multiple RTTMs per RTT are available to update the RTT estimator, an
implementation SHOULD try to adhere to the spirit of the history specified in
[RFC6298].  An implementation suggestion is detailed in Appendix G.

From RFC7323#appendix-G
Appendix G.  RTO Calculation Modification

   Taking multiple RTT samples per window would shorten the history calculated
   by the RTO mechanism in [RFC6298], and the below algorithm aims to maintain a
   similar history as originally intended by [RFC6298].

   It is roughly known how many samples a congestion window worth of data will
   yield, not accounting for ACK compression, and ACK losses.  Such events will
   result in more history of the path being reflected in the final value for
   RTO, and are uncritical.  This modification will ensure that a similar amount
   of time is taken into account for the RTO estimation, regardless of how many
   samples are taken per window:

      ExpectedSamples = ceiling(FlightSize / (SMSS * 2))

      alpha' = alpha / ExpectedSamples

      beta' = beta / ExpectedSamples

   Note that the factor 2 in ExpectedSamples is due to "Delayed ACKs".

   Instead of using alpha and beta in the algorithm of [RFC6298], use alpha' and
   beta' instead:

      RTTVAR <- (1 - beta') * RTTVAR + beta' * |SRTT - R'|

      SRTT <- (1 - alpha') * SRTT + alpha' * R'

      (for each sample R')

PiperOrigin-RevId: 213644795
Change-Id: I52278b703540408938a8edb8c38be97b37f4a10e
2018-09-19 09:59:12 -07:00
..
adapters/gonet Always pass buffer.VectorisedView by value 2018-09-12 21:57:55 -07:00
buffer Remove buffer.Prependable.UsedBytes 2018-09-14 16:39:56 -07:00
checker Always pass buffer.VectorisedView by value 2018-09-12 21:57:55 -07:00
header Add multicast support 2018-09-12 20:39:24 -07:00
link Remove buffer.Prependable.UsedBytes 2018-09-14 16:39:56 -07:00
network Remove buffer.Prependable.UsedBytes 2018-09-14 16:39:56 -07:00
ports Prevent TCP connect from picking bound ports 2018-09-17 20:44:04 -07:00
sample
seqnum
stack Implement packet forwarding to enable NAT 2018-09-17 13:05:36 -07:00
transport Fix RTT estimation when timestamp option is enabled. 2018-09-19 09:59:12 -07:00
BUILD Plumb monotonic time to netstack 2018-09-13 19:12:15 -07:00
tcpip.go Plumb monotonic time to netstack 2018-09-13 19:12:15 -07:00
tcpip_test.go
time.s Add empty .s file to allow `//go:linkname` 2018-09-17 13:06:55 -07:00
time_unsafe.go Plumb monotonic time to netstack 2018-09-13 19:12:15 -07:00