Commit 09bc97bc authored by Martin KaFai Lau's avatar Martin KaFai Lau
Browse files

Merge branch 'bpf-support-setting-max-rto-for-bpf_setsockopt'

Jason Xing says:

====================
Support max RTO set by BPF program calling bpf_setsockopt().
Add corresponding selftests.
====================

Link: https://patch.msgid.link/20250219081333.56378-1-kerneljasonxing@gmail.com


Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
parents 7a7e0197 7a93ba80
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5382,6 +5382,7 @@ static int sol_tcp_sockopt(struct sock *sk, int optname,
	case TCP_USER_TIMEOUT:
	case TCP_NOTSENT_LOWAT:
	case TCP_SAVE_SYN:
	case TCP_RTO_MAX_MS:
		if (*optlen != sizeof(int))
			return -EINVAL;
		break;
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
#define TCP_SAVED_SYN		28
#define TCP_CA_NAME_MAX		16
#define TCP_NAGLE_OFF		1
#define TCP_RTO_MAX_MS		44

#define TCP_ECN_OK              1
#define TCP_ECN_QUEUE_CWR       2
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ static const struct sockopt_test sol_tcp_tests[] = {
	{ .opt = TCP_NOTSENT_LOWAT, .new = 1314, .expected = 1314, },
	{ .opt = TCP_BPF_SOCK_OPS_CB_FLAGS, .new = BPF_SOCK_OPS_ALL_CB_FLAGS,
	  .expected = BPF_SOCK_OPS_ALL_CB_FLAGS, },
	{ .opt = TCP_RTO_MAX_MS, .new = 2000, .expected = 2000, },
	{ .opt = 0, },
};