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
This commit is contained in:
Alexander Duyck 2020-11-03 13:35:19 -08:00 • committed by Alexei Starovoitov
commit 21b5177e99
3 changed files with 31 additions and 108 deletions