]> Git Repo - J-linux.git/blob - tools/testing/selftests/bpf/progs/tcp_ca_incompl_cong_ops.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / tools / testing / selftests / bpf / progs / tcp_ca_incompl_cong_ops.c
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include "bpf_tracing_net.h"
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
6
7 char _license[] SEC("license") = "GPL";
8
9 SEC("struct_ops")
10 __u32 BPF_PROG(incompl_cong_ops_ssthresh, struct sock *sk)
11 {
12         return tcp_sk(sk)->snd_ssthresh;
13 }
14
15 SEC("struct_ops")
16 __u32 BPF_PROG(incompl_cong_ops_undo_cwnd, struct sock *sk)
17 {
18         return tcp_sk(sk)->snd_cwnd;
19 }
20
21 SEC(".struct_ops")
22 struct tcp_congestion_ops incompl_cong_ops = {
23         /* Intentionally leaving out any of the required cong_avoid() and
24          * cong_control() here.
25          */
26         .ssthresh = (void *)incompl_cong_ops_ssthresh,
27         .undo_cwnd = (void *)incompl_cong_ops_undo_cwnd,
28         .name = "bpf_incompl_ops",
29 };
This page took 0.028706 seconds and 4 git commands to generate.