aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/recursive_attach.c
diff options
context:
space:
mode:
authorGeliang Tang <tanggeliang@kylinos.cn>2024-07-09 17:16:20 +0800
committerMartin KaFai Lau <martin.lau@kernel.org>2024-07-10 11:56:22 -0700
commit14fc6fcd35e7dde6d1de062b6711476b3050b22e (patch)
tree8750d217282a68aee7a2bf32b1d9c2b9eac8ace6 /tools/testing/selftests/bpf/prog_tests/recursive_attach.c
parentadae187ebedcd95d02f045bc37dfecfd5b29434b (diff)
selftests/bpf: Use start_server_str in sk_lookup
This patch uses public helper start_server_str() to simplify make_server() in prog_tests/sk_lookup.c. Add a callback setsockopts() to do all sockopts, set it to post_socket_cb pointer of struct network_helper_opts. And add a new struct cb_opts to save the data needed to pass to the callback. Then pass this network_helper_opts to start_server_str(). Also use ASSERT_OK_FD() to check fd returned by start_server_str(). Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Link: https://lore.kernel.org/r/5981539f5591d2c4998c962ef2bf45f34c940548.1720515893.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursive_attach.c')
0 files changed, 0 insertions, 0 deletions