selftests/bpf: samples/bpf: Split off legacy stuff from bpf_helpers.h
authorAndrii Nakryiko <andriin@fb.com>
Tue, 8 Oct 2019 17:59:37 +0000 (10:59 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 8 Oct 2019 21:16:03 +0000 (23:16 +0200)
commit36b5d471135c3ef5f4922aa23f6566b6a07227f7
treea733b7c1d50baba1c8eb5e3ea86471d43685d20d
parentcf0e9718da214415195a28e5909bd297fb178583
selftests/bpf: samples/bpf: Split off legacy stuff from bpf_helpers.h

Split off few legacy things from bpf_helpers.h into separate
bpf_legacy.h file:
- load_{byte|half|word};
- remove extra inner_idx and numa_node fields from bpf_map_def and
  introduce bpf_map_def_legacy for use in samples;
- move BPF_ANNOTATE_KV_PAIR into bpf_legacy.h.

Adjust samples and selftests accordingly by either including
bpf_legacy.h and using bpf_map_def_legacy, or switching to BTF-defined
maps altogether.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20191008175942.1769476-3-andriin@fb.com
14 files changed:
samples/bpf/hbm_kern.h
samples/bpf/map_perf_test_kern.c
samples/bpf/parse_ldabs.c
samples/bpf/sockex1_kern.c
samples/bpf/sockex2_kern.c
samples/bpf/sockex3_kern.c
samples/bpf/tcbpf1_kern.c
samples/bpf/test_map_in_map_kern.c
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/bpf_legacy.h [new file with mode: 0644]
tools/testing/selftests/bpf/progs/sockopt_sk.c
tools/testing/selftests/bpf/progs/tcp_rtt.c
tools/testing/selftests/bpf/progs/test_btf_haskv.c
tools/testing/selftests/bpf/progs/test_btf_newkv.c