diff options
author | 2024-05-01 21:23:18 -0700 | |
---|---|---|
committer | 2024-05-02 16:32:04 -0700 | |
commit | 96c3490d6423b7f24d356e24a61c24de69f3de77 (patch) | |
tree | 8e45830a9f0b33c1d5b0f27b746b91ae350d88d6 /tools/testing/selftests/bpf/progs/bpf_tracing_net.h | |
parent | bpf: tcp: Allow to write tp->snd_cwnd_stamp in bpf_tcp_ca (diff) | |
download | wireguard-linux-96c3490d6423b7f24d356e24a61c24de69f3de77.tar.xz wireguard-linux-96c3490d6423b7f24d356e24a61c24de69f3de77.zip |
selftests/bpf: Add test for the use of new args in cong_control
This patch adds a selftest to show the usage of the new arguments in
cong_control. For simplicity's sake, the testing example reuses cubic's
kernel functions.
Signed-off-by: Miao Xu <miaxu@meta.com>
Link: https://lore.kernel.org/r/20240502042318.801932-4-miaxu@meta.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/selftests/bpf/progs/bpf_tracing_net.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/bpf_tracing_net.h b/tools/testing/selftests/bpf/progs/bpf_tracing_net.h index 7001965d1cc3..f9ec630dfcd5 100644 --- a/tools/testing/selftests/bpf/progs/bpf_tracing_net.h +++ b/tools/testing/selftests/bpf/progs/bpf_tracing_net.h @@ -80,6 +80,14 @@ #define TCP_INFINITE_SSTHRESH 0x7fffffff #define TCP_PINGPONG_THRESH 3 +#define FLAG_DATA_ACKED 0x04 /* This ACK acknowledged new data. */ +#define FLAG_SYN_ACKED 0x10 /* This ACK acknowledged SYN. */ +#define FLAG_DATA_SACKED 0x20 /* New SACK. */ +#define FLAG_SND_UNA_ADVANCED \ + 0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */ +#define FLAG_ACKED (FLAG_DATA_ACKED | FLAG_SYN_ACKED) +#define FLAG_FORWARD_PROGRESS (FLAG_ACKED | FLAG_DATA_SACKED) + #define fib_nh_dev nh_common.nhc_dev #define fib_nh_gw_family nh_common.nhc_gw_family #define fib_nh_gw6 nh_common.nhc_gw.ipv6 @@ -119,4 +127,6 @@ #define tw_v6_daddr __tw_common.skc_v6_daddr #define tw_v6_rcv_saddr __tw_common.skc_v6_rcv_saddr +#define tcp_jiffies32 ((__u32)bpf_jiffies64()) + #endif |