Home
last modified time | relevance | path

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

1234

/tools/testing/selftests/bpf/
Dtest_bpftool_build.sh23 if [ ! -e tools/bpf/bpftool/Makefile ]; then
109 make_and_clean tools/bpf
117 make_with_tmpdir tools/bpf O
126 make_and_clean -C tools/bpf/bpftool
128 make_with_tmpdir -C tools/bpf/bpftool OUTPUT
130 make_with_tmpdir -C tools/bpf/bpftool O
135 make_and_clean bpf
155 make_with_tmpdir bpf O
158 cd bpf/bpftool
Dtest_flow_dissector.sh25 $bpftool prog loadall ./bpf_flow.o /sys/fs/bpf/flow \
29 /sys/fs/bpf/flow/flow_dissector flow_dissector; then
34 $bpftool prog attach pinned /sys/fs/bpf/flow/flow_dissector \
38 /sys/fs/bpf/flow/flow_dissector flow_dissector; then
44 /sys/fs/bpf/flow/flow_dissector flow_dissector; then
49 rm -rf /sys/fs/bpf/flow
89 if /bin/mount | grep /sys/fs/bpf > /dev/null; then
94 /bin/mount bpffs /sys/fs/bpf -t bpf
DMakefile10 BPFDIR := $(LIBDIR)/bpf
12 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
24 BPF_GCC ?= $(shell command -v bpf-gcc;)
154 $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/runqslower \
188 ../../../include/uapi/linux/bpf.h \
207 $(TOOLSDIR)/bpf/resolve_btfids/main.c \
213 $(Q)$(MAKE) $(submake_extras) -C $(TOOLSDIR)/bpf/resolve_btfids \
253 $(Q)($(CLANG) $3 -O2 -target bpf -emit-llvm \
255 $(LLC) -mattr=dwarfris -march=bpf -mcpu=v3 $4 -filetype=obj -o $2
260 $(Q)($(CLANG) $3 -O2 -target bpf -emit-llvm \
[all …]
/tools/bpf/bpftool/Documentation/
Dbpftool-iter.rst29 A bpf iterator combines a kernel iterating of
31 and a bpf program called for each kernel data object
35 The *pin* command creates a bpf iterator from *OBJ*,
41 Map element bpf iterator requires an additional parameter
42 *MAP* so bpf program can iterate over map elements for
43 that map. User can have a bpf program in kernel to run
47 User can then *cat PATH* to see the bpf iterator output.
58 **# bpftool iter pin bpf_iter_netlink.o /sys/fs/bpf/my_netlink**
62 Create a file-based bpf iterator from bpf_iter_netlink.o and pin it
63 to /sys/fs/bpf/my_netlink
[all …]
Dbpftool-net.rst5 tool for inspection of netdev/tc related bpf prog attachments
34 List bpf program attachments in the kernel networking subsystem.
45 bpf programs, users should consult other tools, e.g., iproute2.
48 all tc class/qdisc bpf program attachments. Both xdp programs and
49 tc programs are ordered based on ifindex number. If multiple bpf
51 the order will be first all bpf programs attached to tc classes, then
52 all bpf programs attached to non clsact qdiscs, and finally all
53 bpf programs attached to root and clsact qdisc.
56 Attach bpf program *PROG* to network interface *NAME* with
57 type specified by *ATTACH_TYPE*. Previously attached bpf program
[all …]
Dbpftool-map.rst76 desired flags, e.g. 1024 for **BPF_F_MMAPABLE** (see bpf.h
154 **bpf**\ () system call. This operation is not reversible,
215 | **# mount -t bpf none /sys/fs/bpf/**
216 | **# bpftool map pin id 10 /sys/fs/bpf/map**
217 | **# bpftool map del pinned /sys/fs/bpf/map key 13 00 07 00**
231 | **# bpftool prog loadall tail_calls.o /sys/fs/bpf/foo type xdp**
239 pinned /sys/fs/bpf/foo/xdp
243 pinned /sys/fs/bpf/foo/process
247 pinned /sys/fs/bpf/foo/debug
258 | **# bpftool map pin id 294 /sys/fs/bpf/bar**
[all …]
/tools/lib/bpf/
DMakefile161 @(test -f ../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
162 (diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
181 $(BPF_HELPER_DEFS): $(srctree)/tools/include/uapi/linux/bpf.h
183 --file $(srctree)/tools/include/uapi/linux/bpf.h > $(BPF_HELPER_DEFS)
249 $(call do_install,bpf.h,$(prefix)/include/bpf,644); \
250 $(call do_install,libbpf.h,$(prefix)/include/bpf,644); \
251 $(call do_install,btf.h,$(prefix)/include/bpf,644); \
252 $(call do_install,libbpf_util.h,$(prefix)/include/bpf,644); \
253 $(call do_install,libbpf_common.h,$(prefix)/include/bpf,644); \
254 $(call do_install,xsk.h,$(prefix)/include/bpf,644); \
[all …]
/tools/bpf/runqslower/
DMakefile8 LIBBPF_SRC := $(abspath ../../lib/bpf)
48 $(OUTPUT)/runqslower.bpf.o
50 $(OUTPUT)/runqslower.bpf.o: $(OUTPUT)/vmlinux.h runqslower.h
52 $(OUTPUT)/%.skel.h: $(OUTPUT)/%.bpf.o | $(BPFTOOL)
56 $(OUTPUT)/%.bpf.o: %.bpf.c $(BPFOBJ) | $(OUTPUT)
58 $(Q)$(CLANG) -g -O2 -target bpf $(INCLUDES) \
/tools/testing/selftests/tc-testing/
DMakefile12 PROBE := $(shell $(LLC) -march=bpf -mcpu=probe -filetype=null /dev/null 2>&1)
29 -O2 -target bpf -emit-llvm -c $< -o - | \
30 $(LLC) -march=bpf -mcpu=$(CPU) $(LLC_FLAGS) -filetype=obj -o $@
/tools/bpf/
DMakefile36 FEATURE_USER = .bpf
60 $(OUTPUT)%.yacc.c: $(srctree)/tools/bpf/%.y
63 $(OUTPUT)%.lex.c: $(srctree)/tools/bpf/%.l
66 $(OUTPUT)%.o: $(srctree)/tools/bpf/%.c
93 $(call QUIET_CLEAN, bpf-progs)
97 $(Q)$(RM) -- $(OUTPUT)FEATURE-DUMP.bpf
DMakefile.helpers26 HELPERS_RST = bpf-helpers.rst
37 $(OUTPUT)$(HELPERS_RST): $(UP2DIR)../../include/uapi/linux/bpf.h
D.gitignore2 FEATURE-DUMP.bpf
/tools/bpf/bpftool/
DMakefile16 BPF_DIR = $(srctree)/tools/lib/bpf/
45 -I$(srctree)/kernel/bpf/ \
65 clang-bpf-co-re
67 clang-bpf-co-re
133 ifeq ($(feature-clang-bpf-co-re),1)
144 $(OUTPUT)%.bpf.o: skeleton/%.bpf.c $(OUTPUT)vmlinux.h $(LIBBPF)
150 -g -O2 -target bpf -c $< -o $@ && $(LLVM_STRIP) -g $@
152 $(OUTPUT)%.skel.h: $(OUTPUT)%.bpf.o $(BPFTOOL_BOOTSTRAP)
164 $(OUTPUT)disasm.o: $(srctree)/kernel/bpf/disasm.c
/tools/perf/
Dcheck-headers.sh160 check_2 tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h
161 check_2 tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c
/tools/
DMakefile67 cgroup firewire hv guest bootconfig spi usb virtio vm bpf iio gpio objtool leds wmi pci firmware de… target
70 bpf/%: FORCE
104 virtio vm bpf x86_energy_perf_policy \
158 $(call descend,lib/bpf,clean)
/tools/perf/tests/attr/
Dtest-record-basic3 args = --no-bpf-event kill >/dev/null 2>&1
Dtest-record-raw3 args = --no-bpf-event -R kill >/dev/null 2>&1
Dtest-record-graph-default3 args = --no-bpf-event -g kill >/dev/null 2>&1
Dtest-record-no-samples3 args = --no-bpf-event -n kill >/dev/null 2>&1
Dtest-record-freq3 args = --no-bpf-event -F 100 kill >/dev/null 2>&1
Dtest-record-branch-any3 args = --no-bpf-event -b kill >/dev/null 2>&1
Dtest-record-no-inherit3 args = --no-bpf-event -i kill >/dev/null 2>&1
Dtest-record-period3 args = --no-bpf-event -c 100 -P kill >/dev/null 2>&1
Dtest-record-branch-filter-ind_call3 args = --no-bpf-event -j ind_call kill >/dev/null 2>&1
/tools/perf/util/
Dbpf-event.c43 int id = event->bpf.id; in machine__process_bpf_event_load()
76 switch (event->bpf.type) { in machine__process_bpf()
88 pr_debug("unexpected bpf event type of %d\n", event->bpf.type); in machine__process_bpf()
170 struct perf_record_bpf_event *bpf_event = &event->bpf; in perf_event__synthesize_one_bpf_prog()
381 event = malloc(sizeof(event->bpf) + KSYM_NAME_LEN + machine->id_hdr_size); in perf_event__synthesize_bpf_events()
497 switch (event->bpf.type) { in bpf_event__sb_cb()
499 perf_env__add_bpf_info(env, event->bpf.id); in bpf_event__sb_cb()
509 pr_debug("unexpected bpf event type of %d\n", event->bpf.type); in bpf_event__sb_cb()

1234