• Eric Dumazet's avatar
    tcp: adjust rto_base in retransmits_timed_out() · 3256a2d6
    Eric Dumazet authored
    The cited commit exposed an old retransmits_timed_out() bug
    which assumed it could call tcp_model_timeout() with
    TCP_RTO_MIN as rto_base for all states.
    
    But flows in SYN_SENT or SYN_RECV state uses a different
    RTO base (1 sec instead of 200 ms, unless BPF choses
    another value)
    
    This caused a reduction of SYN retransmits from 6 to 4 with
    the default /proc/sys/net/ipv4/tcp_syn_retries value.
    
    Fixes: a41e8a88 ("tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Marek Majkowski <marek@cloudflare.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3256a2d6
tcp_timer.c 22.1 KB