diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2021-05-12 16:04:51 +0530 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-05-17 17:52:20 +0200 |
commit | f18ba26da88a89db9b50cb4ff47fadb159f2810b (patch) | |
tree | aac2019ec3a59f3580ecc8c02020006e990749a6 /tools/testing/selftests/bpf/progs/test_tc_bpf.c | |
parent | 715c5ce454a6a9b94a1a4a3360de6a87eaf0d833 (diff) |
libbpf: Add selftests for TC-BPF management API
This adds some basic tests for the low level bpf_tc_* API.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20210512103451.989420-4-memxor@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_tc_bpf.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_tc_bpf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_tc_bpf.c b/tools/testing/selftests/bpf/progs/test_tc_bpf.c new file mode 100644 index 000000000000..18a3a7ed924a --- /dev/null +++ b/tools/testing/selftests/bpf/progs/test_tc_bpf.c @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/bpf.h> +#include <bpf/bpf_helpers.h> + +/* Dummy prog to test TC-BPF API */ + +SEC("classifier") +int cls(struct __sk_buff *skb) +{ + return 0; +} |