Skip to content
Commit 57a1a067 authored by Akhmat Karakotov's avatar Akhmat Karakotov Committed by Greg Kroah-Hartman
Browse files

tcp: Use BPF timeout setting for SYN ACK RTO

[ Upstream commit 5903123f

 ]

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>
Stable-dep-of: ff46e3b4

 ("Fix race for duplicate reqsk on identical SYN")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1d3e3b3a
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