[PATCH bpf-next v3 0/8] use network helpers, part 5

Geliang Tang
2024-05-22T09:24:03Z

This patchset uses post_socket_cb and post_connect_cb callbacks of struct
network_helper_opts to refactor do_test() in bpf_tcp_ca.c to move dctcp
test dedicated code out of do_test() into test_dctcp().

v3:
- Add 4 new patches, 1-3 are cleanups. 4 adds a new helper.
- address Martin's comments in v2.

v2:
- rebased on commit "selftests/bpf: Add test for the use of new args in
cong_control"

Geliang Tang (8):
selftests/bpf: Drop struct post_socket_opts
selftests/bpf: Drop type parameter of start_server_addr
selftests/bpf: Drop type parameter of connect_to_addr
selftests/bpf: Add start_server_str helper
selftests/bpf: Use post_socket_cb in connect_to_fd_opts
selftests/bpf: Use start_server_str in bpf_tcp_ca
selftests/bpf: Use connect_to_fd_opts in do_test in bpf_tcp_ca
selftests/bpf: Add post_connect_cb callback

tools/testing/selftests/bpf/network_helpers.c | 56 ++++---
tools/testing/selftests/bpf/network_helpers.h | 13 +-
.../selftests/bpf/prog_tests/bpf_tcp_ca.c | 138 +++++++++++++-----
.../selftests/bpf/prog_tests/cls_redirect.c | 7 +-
.../testing/selftests/bpf/prog_tests/mptcp.c | 2 +-
.../selftests/bpf/prog_tests/sk_assign.c | 13 +-
.../selftests/bpf/prog_tests/sock_addr.c | 23 ++-
.../bpf/prog_tests/sockopt_inherit.c | 4 +-
.../bpf/test_tcp_check_syncookie_user.c | 10 +-
9 files changed, 179 insertions(+), 87 deletions(-)

--
2.43.0