Home
last modified time | relevance | path

Searched refs:bpf (Results 1 – 25 of 149) sorted by relevance

123456

/tools/tracing/rtla/src/
A Dtimerlat_bpf.c8 static struct timerlat_bpf *bpf; variable
19 bpf = timerlat_bpf__open(); in timerlat_bpf_init()
20 if (!bpf) in timerlat_bpf_init()
53 err = timerlat_bpf__load(bpf); in timerlat_bpf_init()
55 timerlat_bpf__destroy(bpf); in timerlat_bpf_init()
77 timerlat_bpf__detach(bpf); in timerlat_bpf_detach()
85 timerlat_bpf__destroy(bpf); in timerlat_bpf_destroy()
161 bpf->maps.hist_thread, in timerlat_bpf_get_hist_value()
162 bpf->maps.hist_user, in timerlat_bpf_get_hist_value()
176 bpf->maps.summary_thread, in timerlat_bpf_get_summary_value()
[all …]
/tools/testing/selftests/bpf/
A Dtest_bpftool_build.sh23 if [ ! -e tools/bpf/bpftool/Makefile ]; then
92 make_and_clean tools/bpf
96 make -C tools/bpf/runqslower OUTPUT=${KDIR_ROOT_DIR}/tools/bpf/runqslower/ clean
104 make_with_tmpdir tools/bpf O
113 make_and_clean -C tools/bpf/bpftool
115 make_with_tmpdir -C tools/bpf/bpftool OUTPUT
117 make_with_tmpdir -C tools/bpf/bpftool O
122 make_and_clean bpf
142 make_with_tmpdir bpf O
145 cd bpf/bpftool
A DMakefile.docs15 SYSCALL_RST = bpf-syscall.rst
18 HELPERS_RST = bpf-helpers.rst
41 $(OUTPUT)bpf-$1.rst: ../../../../include/uapi/linux/bpf.h
54 $(Q)$(RM) $$(DOC_MAN$2) $(OUTPUT)bpf-$1.rst
A DDENYLIST3 get_stack_raw_tp # spams with kernel warnings until next bpf -> bpf-next merge
A DMakefile11 BPFDIR := $(LIBDIR)/bpf
14 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
28 BPF_GCC ?= $(shell command -v bpf-gcc;)
101 TEST_GEN_FILES = test_tc_edt.bpf.o
509 test_static_linked.skel.h-deps := test_static_linked1.bpf.o test_static_linked2.bpf.o
510 linked_funcs.skel.h-deps := linked_funcs1.bpf.o linked_funcs2.bpf.o
511 linked_vars.skel.h-deps := linked_vars1.bpf.o linked_vars2.bpf.o
512 linked_maps.skel.h-deps := linked_maps1.bpf.o linked_maps2.bpf.o
515 …_subskeleton.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o test_subskeleto…
516 test_subskeleton_lib.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o
[all …]
/tools/bpf/bpftool/Documentation/
A Dbpftool-iter.rst35 A bpf iterator combines a kernel iterating of particular kernel data (e.g.,
40 The *pin* command creates a bpf iterator from *OBJ*, and pin it to *PATH*.
44 Map element bpf iterator requires an additional parameter *MAP* so bpf
45 program can iterate over map elements for that map. User can have a bpf
49 User can then *cat PATH* to see the bpf iterator output.
60 **# bpftool iter pin bpf_iter_netlink.o /sys/fs/bpf/my_netlink**
64 Create a file-based bpf iterator from bpf_iter_netlink.o and pin it
65 to /sys/fs/bpf/my_netlink
67 **# bpftool iter pin bpf_iter_hashmap.o /sys/fs/bpf/my_hashmap map id 20**
71 Create a file-based bpf iterator from bpf_iter_hashmap.o and map with
[all …]
A Dbpftool-net.rst7 tool for inspection of networking related bpf prog attachments
37 List bpf program attachments in the kernel networking subsystem.
49 msg, reuseport} and lwt/seg6 bpf programs, users should consult other
53 all tcx, netkit, then tc class/qdisc bpf program attachments, then
55 tcx/netkit/tc programs are ordered based on ifindex number. If multiple bpf
57 will be first all bpf programs attached to tcx, netkit, then tc classes,
58 then all bpf programs attached to non clsact qdiscs, and finally all bpf
62 Attach bpf program *PROG* to network interface *NAME* with type specified
63 by *ATTACH_TYPE*. Previously attached bpf program can be replaced by the
76 Detach bpf program attached to network interface *NAME* with type specified
[all …]
A Dbpftool-gen.rst191 **$ cat example1.bpf.c**
197 #include <linux/bpf.h>
215 **$ cat example2.bpf.c**
220 #include <linux/bpf.h>
238 **$ cat example3.bpf.c**
243 #include <linux/bpf.h>
269 **$ clang --target=bpf -g example1.bpf.c -o example1.bpf.o**
271 **$ clang --target=bpf -g example2.bpf.c -o example2.bpf.o**
273 **$ clang --target=bpf -g example3.bpf.c -o example3.bpf.o**
275 **$ bpftool gen object example.bpf.o example1.bpf.o example2.bpf.o example3.bpf.o**
[all …]
A Dbpftool-map.rst214 | **# mount -t bpf none /sys/fs/bpf/**
215 | **# bpftool map pin id 10 /sys/fs/bpf/map**
216 | **# bpftool map del pinned /sys/fs/bpf/map key 13 00 07 00**
230 | **# bpftool prog loadall tail_calls.o /sys/fs/bpf/foo type xdp**
238 pinned /sys/fs/bpf/foo/xdp
242 pinned /sys/fs/bpf/foo/process
246 pinned /sys/fs/bpf/foo/debug
257 | **# bpftool map pin id 294 /sys/fs/bpf/bar**
258 | **# bpftool map dump pinned /sys/fs/bpf/bar**
265 | **# bpftool map update pinned /sys/fs/bpf/bar key 0 0 0 0 value pinned /sys/fs/bpf/foo/debug**
[all …]
/tools/sched_ext/
A DMakefile45 BPFDIR := $(LIBDIR)/bpf
47 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
120 -I$(CURDIR)/include -I$(CURDIR)/include/bpf-compat \
137 $(APIDIR)/linux/bpf.h \
146 $(APIDIR)/linux/bpf.h \
173 $(SCXOBJ_DIR)/%.bpf.o: %.bpf.c $(INCLUDE_DIR)/vmlinux.h include/scx/*.h \
176 $(Q)$(CLANG) $(BPF_CFLAGS) -target bpf -c $< -o $@
178 $(INCLUDE_DIR)/%.bpf.skel.h: $(SCXOBJ_DIR)/%.bpf.o $(INCLUDE_DIR)/vmlinux.h $(BPFTOOL)
194 $(filter-out %.bpf.c,%.c) \
195 $(INCLUDE_DIR)/%.bpf.skel.h \
[all …]
/tools/testing/selftests/net/
A Dbpf.mk6 BPFDIR := $(top_srcdir)/tools/lib/bpf
9 CCINCLUDE += -I$(selfdir)/bpf
38 BPF_PROG_OBJS := $(patsubst %.c,$(OUTPUT)/%.o,$(wildcard *.bpf.c))
42 $(Q)$(CLANG) -O2 -g --target=bpf $(CCINCLUDE) $(CLANG_SYS_INCLUDES) \
46 $(APIDIR)/linux/bpf.h \
A Dudpgro_frglist.sh45 …tc -n "${PEER_NS}" filter add dev veth1 ingress prio 4 protocol ipv6 bpf object-file nat6to4.bpf.o…
46 …tc -n "${PEER_NS}" filter add dev veth1 egress prio 4 protocol ip bpf object-file nat6to4.bpf.o se…
92 if [ ! -f nat6to4.bpf.o ]; then
A Dnat6to4.sh12 bpf object-file nat6to4.bpf.o section schedcls/egress4/snat4 direct-action
/tools/tracing/rtla/
A DMakefile37 FEATURE_TESTS += clang-bpf-co-re
43 FEATURE_DISPLAY += clang-bpf-co-re
71 src/timerlat.bpf.o: src/timerlat.bpf.c
72 $(QUIET_CLANG)$(CLANG) -g -O2 -target bpf -c $(filter %.c,$^) -o $@
74 src/timerlat.skel.h: src/timerlat.bpf.o
99 $(Q)rm -f src/timerlat.bpf.o src/timerlat.skel.h
/tools/bpf/runqslower/
A DMakefile9 BPF_TARGET_ENDIAN ?= --target=bpf
10 LIBBPF_SRC := $(abspath ../../lib/bpf)
56 $(OUTPUT)/runqslower.bpf.o | libbpf_hdrs
58 $(OUTPUT)/runqslower.bpf.o: $(OUTPUT)/vmlinux.h runqslower.h | libbpf_hdrs
60 $(OUTPUT)/%.skel.h: $(OUTPUT)/%.bpf.o | $(BPFTOOL)
63 $(OUTPUT)/%.bpf.o: %.bpf.c $(BPFOBJ) | $(OUTPUT)
/tools/testing/selftests/sched_ext/
A DMakefile17 BPFDIR := $(LIBDIR)/bpf
19 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
90 -I$(CURDIR)/include -I$(CURDIR)/include/bpf-compat \
108 $(APIDIR)/linux/bpf.h \
134 $(SCXOBJ_DIR)/%.bpf.o: %.bpf.c $(INCLUDE_DIR)/vmlinux.h | $(BPFOBJ) $(SCXOBJ_DIR)
136 $(Q)$(CLANG) $(BPF_CFLAGS) -target bpf -c $< -o $@
138 $(INCLUDE_DIR)/%.bpf.skel.h: $(SCXOBJ_DIR)/%.bpf.o $(INCLUDE_DIR)/vmlinux.h $(BPFTOOL) | $(INCLUDE_…
145 $(Q)$(BPFTOOL) gen skeleton $(<:.o=.linked3.o) name $(subst .bpf.skel.h,,$(sched)) > $@
146 …$(Q)$(BPFTOOL) gen subskeleton $(<:.o=.linked3.o) name $(subst .bpf.skel.h,,$(sched)) > $(@:.skel.…
160 all_test_bpfprogs := $(foreach prog,$(wildcard *.bpf.c),$(INCLUDE_DIR)/$(patsubst %.c,%.skel.h,$(pr…
/tools/perf/
A DMANIFEST14 tools/lib/bpf
34 tools/bpf/bpftool
35 kernel/bpf/disasm.c
36 kernel/bpf/disasm.h
/tools/perf/tests/shell/
A Dstat_bpf_counters_cgrp.sh15 if ! perf stat -a --bpf-counters --for-each-cgroup / true > /dev/null 2>&1; then
18 perf --no-pager stat -a --bpf-counters --for-each-cgroup / true || true
51 …check_system_wide_counted_output=$(perf stat -a --bpf-counters --for-each-cgroup ${test_cgroups} -…
A Dstat_bpf_counters.sh45 …bpf_instructions=$(perf stat --no-big-num --bpf-counters -e instructions -- $workload 2>&1 | awk …
63 if ! perf stat -e instructions --bpf-counters true > /dev/null 2>&1; then
66 perf --no-pager stat -e instructions --bpf-counters true || true
A Drecord_sideband.sh25 if ! perf record -o ${perfdata} -BN --no-bpf-event -C $1 true > /dev/null 2>&1
42 perf record -BN --no-bpf-event -o ${perfdata} -C 0 -- taskset --cpu-list 1 true
/tools/testing/selftests/hid/
A DMakefile65 BPFDIR := $(LIBDIR)/bpf
67 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
157 $(TOOLSDIR)/bpf/resolve_btfids/main.c \
163 $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/resolve_btfids \
198 $(Q)$(CLANG) $3 -O2 --target=bpf -c $1 -mcpu=v3 -o $2
203 $(Q)$(CLANG) $3 -O2 --target=bpf -c $1 -mcpu=v2 -o $2
214 BPF_OBJS := $(patsubst %.c,$(OUTPUT)/%.bpf.o, $(BPF_SRCS))
219 $(BPF_OBJS): $(OUTPUT)/%.bpf.o: \
224 $(wildcard $(BPFDIR)/*.bpf.h) \
228 $(BPF_SKELS): %.skel.h: %.bpf.o $(BPFTOOL) | $(OUTPUT)
[all …]
/tools/lib/bpf/
A DMakefile138 @(test -f ../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
139 (diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
154 $(BPF_HELPER_DEFS): $(srctree)/tools/include/uapi/linux/bpf.h
156 --file $(srctree)/tools/include/uapi/linux/bpf.h > $(BPF_HELPER_DEFS)
235 SRC_HDRS := bpf.h libbpf.h btf.h libbpf_common.h libbpf_legacy.h \
237 skel_internal.h libbpf_version.h usdt.bpf.h
240 INSTALL_PFX := $(DESTDIR)$(prefix)/include/bpf
246 $(call do_install,$<,$(prefix)/include/bpf,644)
250 $(call do_install,$<,$(prefix)/include/bpf,644)
/tools/testing/selftests/net/lib/
A DMakefile12 TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
19 include ../bpf.mk
/tools/bpf/bpftool/
A DMakefile10 BPF_DIR = $(srctree)/tools/lib/bpf
22 LIBBPF_HDRS_DIR := $(LIBBPF_INCLUDE)/bpf
28 LIBBPF_BOOTSTRAP_HDRS_DIR := $(LIBBPF_BOOTSTRAP_INCLUDE)/bpf
78 -I$(srctree)/kernel/bpf/ \
100 FEATURE_TESTS := clang-bpf-co-re
110 FEATURE_DISPLAY := clang-bpf-co-re
213 ifeq ($(feature-clang-bpf-co-re),1)
225 $(OUTPUT)%.bpf.o: skeleton/%.bpf.c $(OUTPUT)vmlinux.h $(LIBBPF_BOOTSTRAP)
231 --target=bpf -c $< -o $@
234 $(OUTPUT)%.skel.h: $(OUTPUT)%.bpf.o $(BPFTOOL_BOOTSTRAP)
[all …]
/tools/bpf/
A DMakefile30 FEATURE_USER = .bpf
57 $(OUTPUT)%.yacc.c: $(srctree)/tools/bpf/%.y
60 $(OUTPUT)%.lex.c: $(srctree)/tools/bpf/%.l
63 $(OUTPUT)%.o: $(srctree)/tools/bpf/%.c
90 $(call QUIET_CLEAN, bpf-progs)
94 $(Q)$(RM) -- $(OUTPUT)FEATURE-DUMP.bpf

Completed in 160 milliseconds

123456