aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/tc-testing/bpf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/tc-testing/bpf')
-rw-r--r--tools/testing/selftests/tc-testing/bpf/Makefile30
-rw-r--r--tools/testing/selftests/tc-testing/bpf/action.c23
2 files changed, 0 insertions, 53 deletions
diff --git a/tools/testing/selftests/tc-testing/bpf/Makefile b/tools/testing/selftests/tc-testing/bpf/Makefile
deleted file mode 100644
index be5a5e542804..000000000000
--- a/tools/testing/selftests/tc-testing/bpf/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-
-APIDIR := ../../../../include/uapi
-TEST_GEN_FILES = action.o
-
-top_srcdir = ../../../../..
-KSFT_KHDR_INSTALL := 1
-include ../../lib.mk
-
-CLANG ?= clang
-LLC ?= llc
-PROBE := $(shell $(LLC) -march=bpf -mcpu=probe -filetype=null /dev/null 2>&1)
-
-ifeq ($(PROBE),)
- CPU ?= probe
-else
- CPU ?= generic
-endif
-
-CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
- | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')
-
-CLANG_FLAGS = -I. -I$(APIDIR) \
- $(CLANG_SYS_INCLUDES) \
- -Wno-compare-distinct-pointer-types
-
-$(OUTPUT)/%.o: %.c
- $(CLANG) $(CLANG_FLAGS) \
- -O2 -target bpf -emit-llvm -c $< -o - | \
- $(LLC) -march=bpf -mcpu=$(CPU) $(LLC_FLAGS) -filetype=obj -o $@
diff --git a/tools/testing/selftests/tc-testing/bpf/action.c b/tools/testing/selftests/tc-testing/bpf/action.c
deleted file mode 100644
index c32b99b80e19..000000000000
--- a/tools/testing/selftests/tc-testing/bpf/action.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0
- * Copyright (c) 2018 Davide Caratti, Red Hat inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- */
-
-#include <linux/bpf.h>
-#include <linux/pkt_cls.h>
-
-__attribute__((section("action-ok"),used)) int action_ok(struct __sk_buff *s)
-{
- return TC_ACT_OK;
-}
-
-__attribute__((section("action-ko"),used)) int action_ko(struct __sk_buff *s)
-{
- s->data = 0x0;
- return TC_ACT_OK;
-}
-
-char _license[] __attribute__((section("license"),used)) = "GPL";