Skip to content
  • Yuchung Cheng's avatar
    tcp: measure RTT from new SACK · 59c9af42
    Yuchung Cheng authored
    
    
    Take RTT sample if an ACK selectively acks some sequences that
    have never been retransmitted. The Karn's algorithm does not apply
    even if that ACK (s)acks other retransmitted sequences, because it
    must been generated by an original but perhaps out-of-order packet.
    There is no ambiguity. In case when multiple blocks are newly
    sacked because of ACK losses the earliest block is used to
    measure RTT, similar to cummulative ACKs.
    
    Such RTT samples allow the sender to estimate the RTO during loss
    recovery and packet reordering events. It is still useful even with
    TCP timestamps. That's because during these events the SND.UNA may
    not advance preventing RTT samples from TS ECR (thus the FLAG_ACKED
    check before calling tcp_ack_update_rtt()).  Therefore this new
    RTT source is complementary to existing ACK and TS RTT mechanisms.
    
    This patch does not update the RTO. It is done in the next patch.
    
    Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    59c9af42