summaryrefslogtreecommitdiffstats
path: root/samples/bpf/sockex1_kern.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-10-08 10:59:37 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-10-08 23:16:03 +0200
commit36b5d471135c3ef5f4922aa23f6566b6a07227f7 (patch)
treea733b7c1d50baba1c8eb5e3ea86471d43685d20d /samples/bpf/sockex1_kern.c
parentcf0e9718da214415195a28e5909bd297fb178583 (diff)
downloadlinux-36b5d471135c3ef5f4922aa23f6566b6a07227f7.tar.bz2
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
Diffstat (limited to 'samples/bpf/sockex1_kern.c')
-rw-r--r--samples/bpf/sockex1_kern.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/bpf/sockex1_kern.c b/samples/bpf/sockex1_kern.c
index ed18e9a4909c..f96943f443ab 100644
--- a/samples/bpf/sockex1_kern.c
+++ b/samples/bpf/sockex1_kern.c
@@ -3,6 +3,7 @@
#include <uapi/linux/if_packet.h>
#include <uapi/linux/ip.h>
#include "bpf_helpers.h"
+#include "bpf_legacy.h"
struct bpf_map_def SEC("maps") my_map = {
.type = BPF_MAP_TYPE_ARRAY,