• Akhmat Karakotov's avatar
    tcp: Use BPF timeout setting for SYN ACK RTO · 5903123f
    Akhmat Karakotov authored
    When setting RTO through BPF program, some SYN ACK packets were unaffected
    and continued to use TCP_TIMEOUT_INIT constant. This patch adds timeout
    option to struct request_sock. Option is initialized with TCP_TIMEOUT_INIT
    and is reassigned through BPF using tcp_timeout_init call. SYN ACK
    retransmits now use newly added timeout option.
    Signed-off-by: default avatarAkhmat Karakotov <hmukos@yandex-team.ru>
    Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
    
    v2:
    	- Add timeout option to struct request_sock. Do not call
    	  tcp_timeout_init on every syn ack retransmit.
    
    v3:
    	- Use unsigned long for min. Bound tcp_timeout_init to TCP_RTO_MAX.
    
    v4:
    	- Refactor duplicate code by adding reqsk_timeout function.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5903123f
inet_connection_sock.h 11.3 KB