summaryrefslogtreecommitdiffstats
path: root/tools/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorJohn Fastabend2018-04-23 23:30:38 +0200
committerDaniel Borkmann2018-04-25 00:06:20 +0200
commit16962b2404ac88cde0281fe2176d6ae3820ed320 (patch)
tree954672926f41481d6cd3af9517c99a15359e0416 /tools/include/uapi/linux/bpf.h
parentbpf: sockmap, add a set of tests to run by default (diff)
downloadkernel-qcow2-linux-16962b2404ac88cde0281fe2176d6ae3820ed320.tar.gz
kernel-qcow2-linux-16962b2404ac88cde0281fe2176d6ae3820ed320.tar.xz
kernel-qcow2-linux-16962b2404ac88cde0281fe2176d6ae3820ed320.zip
bpf: sockmap, add selftests
This adds a new test program test_sockmap which is the old sample sockmap program. By moving the sample program here we can now run it as part of the self tests suite. To support this a populate_progs() routine is added to load programs and maps which was previously done with load_bpf_file(). This is needed because self test libs do not provide a similar routine. Also we now use the cgroup_helpers routines to manage cgroup use instead of manually creating one and supplying it to the CLI. Notice we keep the CLI around though because it is useful for dbg and specialized testing. To run use ./test_sockmap and the result should be, Summary 660 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
-rw-r--r--tools/include/uapi/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 5841ed41b30c..e6679393b687 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -894,6 +894,7 @@ enum bpf_func_id {
/* BPF_FUNC_skb_set_tunnel_key flags. */
#define BPF_F_ZERO_CSUM_TX (1ULL << 1)
#define BPF_F_DONT_FRAGMENT (1ULL << 2)
+#define BPF_F_SEQ_NUMBER (1ULL << 3)
/* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and
* BPF_FUNC_perf_event_read_value flags.