diff options
author | Geliang Tang <[email protected]> | 2024-05-25 20:08:17 +0800 |
---|---|---|
committer | Martin KaFai Lau <[email protected]> | 2024-05-28 17:53:04 -0700 |
commit | e078255abd53ac44c9133fd98d51645dbd196123 (patch) | |
tree | 1046081598c5ee4209a49cd82b4a5aadb55b565f /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 6f802cb8988e8e41f2fdb74ac949d3a0ef9a9594 (diff) |
selftests/bpf: Use post_socket_cb in connect_to_fd_opts
Since the post_socket_cb() callback is added in struct network_helper_opts,
it's make sense to use it not only in __start_server(), but also in
connect_to_fd_opts(). Then it can be used to set TCP_CONGESTION sockopt.
Add a "void *" type member cb_opts into struct network_helper_opts, and add
a new struct named cb_opts in prog_tests/bpf_tcp_ca.c, then cc can be moved
into struct cb_opts from network_helper_opts. Define a new callback cc_cb()
to set TCP_CONGESTION sockopt, and set it to post_socket_cb pointer of opts.
Define a new cb_opts cubic, set it to cb_opts of opts. Pass this opts to
connect_to_fd_opts() in test_dctcp_fallback().
Signed-off-by: Geliang Tang <[email protected]>
Link: https://lore.kernel.org/r/b512bb8d8f6854c9ea5c409b69d1bf37c6f272c6.1716638248.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions