]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Drop type of connect_to_fd_opts
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 18 Jul 2024 06:22:29 +0000 (14:22 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 29 Jul 2024 19:52:24 +0000 (12:52 -0700)
commita63507f3b11de30fd7711ec244fe354fb4a01a09
treea23b7388669035267777cf0d6127ff2c7a92965a
parent1722389b0d863056d78287a120a1d6cadb8d4f7b
selftests/bpf: Drop type of connect_to_fd_opts

The "type" parameter of connect_to_fd_opts() is redundant of "server_fd".
Since the "type" can be obtained inside by invoking getsockopt(SO_TYPE),
without passing it in as a parameter.

This patch drops the "type" parameter of connect_to_fd_opts() and updates
its callers.

Suggested-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/50d8ce7ab7ab0c0f4d211fc7cc4ebe3d3f63424c.1721282219.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c