selftests/bpf: Add bpf_getsockopt() for TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN
authorJason Xing <kerneljasonxing@gmail.com>
Wed, 12 Mar 2025 15:35:23 +0000 (16:35 +0100)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 13 Mar 2025 21:42:53 +0000 (14:42 -0700)
Add selftests for TCP_BPF_DELACK_MAX and TCP_BPF_RTO_MIN BPF socket
cases.

Signed-off-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20250312153523.9860-5-kerneljasonxing@gmail.com
tools/testing/selftests/bpf/progs/setget_sockopt.c

index 106fe430f41b99da0de62310f09772e74ec0d89f..0107a24b7522b3b5e8ed215d481571f534ca1f70 100644 (file)
@@ -61,6 +61,8 @@ 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_BPF_DELACK_MAX, .new = 30000, .expected = 30000, },
+       { .opt = TCP_BPF_RTO_MIN, .new = 30000, .expected = 30000, },
        { .opt = TCP_RTO_MAX_MS, .new = 2000, .expected = 2000, },
        { .opt = 0, },
 };