selftest/bpf: Use global variables instead of maps for test_tcpbpf_kern
authorAlexander Duyck <alexanderduyck@fb.com>
Tue, 3 Nov 2020 21:35:19 +0000 (13:35 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 4 Nov 2020 01:52:37 +0000 (17:52 -0800)
commit21b5177e997c98643eaabd4b917f2e287395af86
tree0be3b5fecc5789017fb95e9e3acff9ac7b23e96b
parent0a099d1429c709020277d24a460d11ff8356a080
selftest/bpf: Use global variables instead of maps for test_tcpbpf_kern

Use global variables instead of global_map and sockopt_results_map to track
test data. Doing this greatly simplifies the code as there is not need to
take the extra steps of updating the maps or looking up elements.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/160443931900.1086697.6588858453575682351.stgit@localhost.localdomain
tools/testing/selftests/bpf/prog_tests/tcpbpf_user.c
tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c
tools/testing/selftests/bpf/test_tcpbpf.h