diff options
| author | Geliang Tang <[email protected]> | 2024-05-05 11:35:08 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2024-05-09 20:40:29 +0000 |
| commit | 20434d2d896f85b38fa1fe91b8739afcd9cde3b3 (patch) | |
| tree | 3b55f7de36502ae460b7b7418222b99c9c5c9dd1 /tools/testing/selftests/bpf/prog_tests/obj_name.c | |
| parent | Merge branch 'selftests-bpf-retire-bpf_tcp_helpers-h' (diff) | |
| download | kernel-20434d2d896f85b38fa1fe91b8739afcd9cde3b3.tar.gz kernel-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 <[email protected]>
Link: https://lore.kernel.org/r/470cb82f209f055fc7fb39c66c6b090b5b7ed2b2.1714907662.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/obj_name.c')
0 files changed, 0 insertions, 0 deletions
