selftests/bpf: Update arguments of connect_to_addr
authorGeliang Tang <tanggeliang@kylinos.cn>
Thu, 18 Apr 2024 08:09:10 +0000 (16:09 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Sat, 20 Apr 2024 00:13:28 +0000 (17:13 -0700)
commitdb9994d022ecd42006354609f6e4e3f57e5a4b03
tree9211f503d5d85c9add809589018f514f7e71b6f4
parenta2e4979536c440838794ee292955ce9ed55ad181
selftests/bpf: Update arguments of connect_to_addr

Move the third argument "int type" of connect_to_addr() to the first one
which is closer to how the socket syscall is doing it. And add a
network_helper_opts argument as the fourth one. Then change its usages in
sock_addr.c too.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/088ea8a95055f93409c5f57d12f0e58d43059ac4.1713427236.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/sock_addr.c