• Yuchung Cheng's avatar
    tcp: check undo conditions before detecting losses · 98e36d44
    Yuchung Cheng authored
    Currently RACK would mark loss before the undo operations in TCP
    loss recovery. This could incorrectly identify real losses as
    spurious. For example a sender first experiences a delay spike and
    then eventually some packets were lost due to buffer overrun.
    In this case, the sender should perform fast recovery b/c not all
    the packets were lost.
    
    But the sender may first trigger a (spurious) RTO and reset
    cwnd to 1. The following ACKs may used to mark real losses by
    tcp_rack_mark_lost. Then in tcp_process_loss this ACK could trigger
    F-RTO undo condition and unmark real losses and revert the cwnd
    reduction. If there are no more ACKs coming back, eventually the
    sender would timeout again instead of performing fast recovery.
    
    The patch fixes this incorrect process by always performing
    the undo checks before detecting losses.
    
    Fixes: 4f41b1c5 ("tcp: use RACK to detect losses")
    Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
    Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
    Acked-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    98e36d44
tcp_input.c 184 KB