Skip to content

Commit

Permalink
bpf: selftests: Add non function pointer test to struct_ops
Browse files Browse the repository at this point in the history
This patch adds a "void *owner" member.  The existing
bpf_tcp_ca test will ensure the bpf_cubic.o and bpf_dctcp.o
can be loaded.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210212021037.267278-1-kafai@fb.com
  • Loading branch information
Martin KaFai Lau authored and Andrii Nakryiko committed Feb 12, 2021
1 parent d2836dd commit a79e88d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/bpf/bpf_tcp_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ struct tcp_congestion_ops {
* after all the ca_state processing. (optional)
*/
void (*cong_control)(struct sock *sk, const struct rate_sample *rs);
void *owner;
};

#define min(a, b) ((a) < (b) ? (a) : (b))
Expand Down

0 comments on commit a79e88d

Please sign in to comment.