mbox series

[bpf-next,v2,0/4] use network helpers, part 5

Message ID cover.1715745588.git.tanggeliang@kylinos.cn (mailing list archive)
Headers show
Series use network helpers, part 5 | expand

Message

Geliang Tang May 15, 2024, 4:20 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

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().

Patch 3 adds a new member in post_socket_opts and patch 4 adds a new
callback in network_helper_opts. I'm not sure if this is going too far.

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

Geliang Tang (4):
  selftests/bpf: Use post_socket_cb in connect_to_fd_opts
  selftests/bpf: Use start_server_addr 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 |  13 +-
 tools/testing/selftests/bpf/network_helpers.h |   8 +-
 .../selftests/bpf/prog_tests/bpf_tcp_ca.c     | 111 ++++++++++++------
 3 files changed, 86 insertions(+), 46 deletions(-)