diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2024-06-21 06:42:45 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2024-06-21 06:42:45 +0300 |
| commit | 1ae7a19e37630d3235bc68cac9da4e032cad8136 (patch) | |
| tree | cc0e37cedfc96abfb9183b0878d6e782c132349a /tools/testing/selftests/bpf/network_helpers.h | |
| parent | bf977ee4a9e2ad8a41b3a2497aada5e7eb09eaea (diff) | |
| parent | 8cab7cdcf5aebec354ede98bca28c08dd9df924c (diff) | |
| download | linux-1ae7a19e37630d3235bc68cac9da4e032cad8136.tar.xz | |
Merge branch 'use-network-helpers-part-7'
Geliang Tang says:
====================
use network helpers, part 7
From: Geliang Tang <tanggeliang@kylinos.cn>
v6:
- update ASSERT strings in patch 4 as Eduard suggested. (thanks)
v5:
- update patch 1, add getsockopt(SO_PROTOCOL) in connect_to_fd() to
fix errors reported by CI.
v4:
- fix errors reported by CI.
v3:
- rename start_client to client_socket
- Use connect_to_addr in connect_to_fd_opt
v2:
- update patch 2, extract a new helper start_client.
- drop patch 3, keep must_fail in network_helper_opts.
Drop type and noconnect from network_helper_opts. And use start_server_str
in mptcp and test_tcp_check_syncookie_user.
Patches 1-4 address Martin's comments in the previous series.
====================
Link: https://lore.kernel.org/r/cover.1718932493.git.tanggeliang@kylinos.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/network_helpers.h')
| -rw-r--r-- | tools/testing/selftests/bpf/network_helpers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/network_helpers.h b/tools/testing/selftests/bpf/network_helpers.h index 11eea8e2e4f1..9ea36524b9db 100644 --- a/tools/testing/selftests/bpf/network_helpers.h +++ b/tools/testing/selftests/bpf/network_helpers.h @@ -24,8 +24,6 @@ typedef __u16 __sum16; struct network_helper_opts { int timeout_ms; bool must_fail; - bool noconnect; - int type; int proto; int (*post_socket_cb)(int fd, void *opts); void *cb_opts; @@ -58,10 +56,12 @@ int *start_reuseport_server(int family, int type, const char *addr_str, int start_server_addr(int type, const struct sockaddr_storage *addr, socklen_t len, const struct network_helper_opts *opts); void free_fds(int *fds, unsigned int nr_close_fds); +int client_socket(int family, int type, + const struct network_helper_opts *opts); int connect_to_addr(int type, const struct sockaddr_storage *addr, socklen_t len, const struct network_helper_opts *opts); int connect_to_fd(int server_fd, int timeout_ms); -int connect_to_fd_opts(int server_fd, const struct network_helper_opts *opts); +int connect_to_fd_opts(int server_fd, int type, const struct network_helper_opts *opts); int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms); int fastopen_connect(int server_fd, const char *data, unsigned int data_len, int timeout_ms); |
