Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 14fc6fcd authored by Geliang Tang's avatar Geliang Tang Committed by Martin KaFai Lau
Browse files

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: default avatarEduard Zingerman <eddyz87@gmail.com>
Signed-off-by: default avatarGeliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/5981539f5591d2c4998c962ef2bf45f34c940548.1720515893.git.tanggeliang@kylinos.cn


Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
parent adae187e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment