-
Notifications
You must be signed in to change notification settings - Fork 94
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
Conversation
Upstream branch: a9e7715 |
e62ff75
to
4e2f259
Compare
Upstream branch: 8e6d9ae |
f2dba94
to
1a8ef63
Compare
4e2f259
to
2139529
Compare
Upstream branch: e549b39 |
1a8ef63
to
c2851ed
Compare
2139529
to
2ae8bbc
Compare
Upstream branch: 41b307a |
c2851ed
to
0931acb
Compare
2ae8bbc
to
459d932
Compare
Upstream branch: 329a672 |
0931acb
to
228bd8d
Compare
459d932
to
ba083f5
Compare
Upstream branch: 75b0fbf |
228bd8d
to
53786f3
Compare
ba083f5
to
20150dc
Compare
Upstream branch: 93d1c2d |
53786f3
to
bff2b2a
Compare
20150dc
to
606f72a
Compare
Upstream branch: 7e2c7a3 |
bff2b2a
to
d5bab96
Compare
606f72a
to
041b1be
Compare
Upstream branch: e612b5c |
d5bab96
to
2e9a1d0
Compare
041b1be
to
63334d2
Compare
Upstream branch: 911edc6 |
2e9a1d0
to
fa5dbcd
Compare
63334d2
to
2a4c29b
Compare
Upstream branch: 0093670 |
fa5dbcd
to
8294271
Compare
2a4c29b
to
9fdc018
Compare
__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>
Upstream branch: cbe35ad |
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>
8294271
to
c3f9b17
Compare
9fdc018
to
0ce10a8
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=850534 irrelevant now. Closing PR. |
Pull request for series with
subject: use network helpers, part 4
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=850534