Skip to content
Commit 5903123f authored by Akhmat Karakotov's avatar Akhmat Karakotov Committed by David S. Miller
Browse files

tcp: Use BPF timeout setting for SYN ACK RTO



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>
parent 0b6b0d31
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment