diff options
author | Geliang Tang <tanggeliang@kylinos.cn> | 2024-05-05 19:35:08 +0800 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2024-05-09 13:40:29 -0700 |
commit | 20434d2d896f85b38fa1fe91b8739afcd9cde3b3 (patch) | |
tree | 3b55f7de36502ae460b7b7418222b99c9c5c9dd1 /tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c | |
parent | cbe35adf691a3227b11131a922245c4d6409d2d6 (diff) | |
download | linux-20434d2d896f85b38fa1fe91b8739afcd9cde3b3.tar.gz linux-20434d2d896f85b38fa1fe91b8739afcd9cde3b3.tar.bz2 linux-20434d2d896f85b38fa1fe91b8739afcd9cde3b3.zip |
selftests/bpf: Add post_socket_cb for network_helper_opts
__start_server() sets SO_REUSPORT through setsockopt() when the parameter
'reuseport' is set. This patch makes it more flexible by adding a function
pointer post_socket_cb into struct network_helper_opts. The
'const struct post_socket_opts *cb_opts' args in the post_socket_cb is
for the future extension.
The 'reuseport' parameter can be dropped.
Now the original start_reuseport_server() can be implemented by setting a
newly defined reuseport_cb() function pointer to post_socket_cb filed of
struct network_helper_opts.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/470cb82f209f055fc7fb39c66c6b090b5b7ed2b2.1714907662.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c')
0 files changed, 0 insertions, 0 deletions