Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use network helpers, part 4 #6958

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: use network helpers, part 4
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: a9e7715
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 8e6d9ae
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e549b39
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 41b307a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 329a672
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 75b0fbf
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 93d1c2d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 7e2c7a3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e612b5c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 911edc6
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0093670
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

Geliang Tang added 4 commits May 9, 2024 11:32
__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, together with 'struct post_socket_opts cb_opts'
for future extension into struct network_helper_opts. Then '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>
Include network_helpers.h in prog_tests/sockopt_inherit.c, use public
helper start_server_addr() instead of the local defined function
start_server(). This can avoid duplicate code.

Add a helper custom_cb() to set SOL_CUSTOM sockopt looply, set it to
post_socket_cb pointer of struct network_helper_opts, and pass it to
start_server_addr().

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Include network_helpers.h in test_tcp_check_syncookie_user.c, use
public helper start_server_addr() in it instead of the local defined
function start_server(). This can avoid duplicate code.

Add two helpers v6only_true() and v6only_false() to set IPV6_V6ONLY
sockopt to true or false, set them to post_socket_cb pointer of struct
network_helper_opts, and pass it to start_server_setsockopt().

In order to use functions defined in network_helpers.c, Makefile needs
to be updated too.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
This patch uses public helper connect_to_fd() exported in network_helpers.h
instead of the local defined function connect_to_server() in
prog_tests/sockopt_inherit.c. This can avoid duplicate code.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cbe35ad
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534
version: 1

Geliang Tang added 2 commits May 9, 2024 11:32
This patch uses public helper connect_to_fd() exported in network_helpers.h
instead of the local defined function connect_to_server() in
test_tcp_check_syncookie_user.c. This can avoid duplicate code.

Then the arguments "addr" and "len" of run_test() become useless, drop them
too.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
The arguments "addr" and "len" of run_test() have dropped. This makes
function get_port() useless. Drop it from test_tcp_check_syncookie_user.c.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=850534 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/850534=>bpf-next branch May 9, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
0 participants