Home
last modified time | relevance | path

Searched full:bpftool (Results 1 – 25 of 56) sorted by relevance

123

/external/bpftool/docs/
Dbpftool-map.rst4 bpftool-map
17 **bpftool** [*OPTIONS*] **map** *COMMAND*
28 | **bpftool** **map** { **show** | **list** } [*MAP*]
29 | **bpftool** **map create** *FILE* **type** *TYPE* **key** *KEY_SIZE* **value** *VALUE_SIZE* \
32 | **bpftool** **map dump** *MAP*
33 | **bpftool** **map update** *MAP* [**key** *DATA*] [**value** *VALUE*] [*UPDATE_FLAGS*]
34 | **bpftool** **map lookup** *MAP* [**key** *DATA*]
35 | **bpftool** **map getnext** *MAP* [**key** *DATA*]
36 | **bpftool** **map delete** *MAP* **key** *DATA*
37 | **bpftool** **map pin** *MAP* *FILE*
[all …]
Dbpftool-prog.rst4 bpftool-prog
17 **bpftool** [*OPTIONS*] **prog** *COMMAND*
30 | **bpftool** **prog** { **show** | **list** } [*PROG*]
31 | **bpftool** **prog dump xlated** *PROG* [{**file** *FILE* | **opcodes** | **visual** | **linum**}]
32 | **bpftool** **prog dump jited** *PROG* [{**file** *FILE* | **opcodes** | **linum**}]
33 | **bpftool** **prog pin** *PROG* *FILE*
34 | **bpftool** **prog** { **load** | **loadall** } *OBJ* *PATH* [**type** *TYPE*] [**map** {**idx** …
35 | **bpftool** **prog attach** *PROG* *ATTACH_TYPE* [*MAP*]
36 | **bpftool** **prog detach** *PROG* *ATTACH_TYPE* [*MAP*]
37 | **bpftool** **prog tracelog**
[all …]
Dbpftool-net.rst4 bpftool-net
17 **bpftool** [*OPTIONS*] **net** *COMMAND*
27 | **bpftool** **net** { **show** | **list** } [ **dev** *NAME* ]
28 | **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
29 | **bpftool** **net detach** *ATTACH_TYPE* **dev** *NAME*
30 | **bpftool** **net help**
37 **bpftool net { show | list }** [ **dev** *NAME* ]
47 users can use **bpftool cgroup** to dump cgroup attachments.
59 **bpftool** **net attach** *ATTACH_TYPE* *PROG* **dev** *NAME* [ **overwrite** ]
71 **bpftool** **net detach** *ATTACH_TYPE* **dev** *NAME*
[all …]
Dbpftool-struct_ops.rst4 bpftool-struct_ops
17 **bpftool** [*OPTIONS*] **struct_ops** *COMMAND*
27 | **bpftool** **struct_ops { show | list }** [*STRUCT_OPS_MAP*]
28 | **bpftool** **struct_ops dump** [*STRUCT_OPS_MAP*]
29 | **bpftool** **struct_ops register** *OBJ*
30 | **bpftool** **struct_ops unregister** *STRUCT_OPS_MAP*
31 | **bpftool** **struct_ops help**
39 **bpftool struct_ops { show | list }** [*STRUCT_OPS_MAP*]
48 **bpftool struct_ops dump** [*STRUCT_OPS_MAP*]
54 **bpftool struct_ops register** *OBJ*
[all …]
Dbpftool-btf.rst4 bpftool-btf
17 **bpftool** [*OPTIONS*] **btf** *COMMAND*
26 | **bpftool** **btf** { **show** | **list** } [**id** *BTF_ID*]
27 | **bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
28 | **bpftool** **btf help**
37 **bpftool btf { show | list }** [**id** *BTF_ID*]
43 Since Linux 5.8 bpftool is able to discover information about
45 objects. On such kernels bpftool will automatically emit this
48 **bpftool btf dump** *BTF_SRC*
73 **bpftool btf help**
[all …]
Dbpftool-link.rst4 bpftool-link
17 **bpftool** [*OPTIONS*] **link** *COMMAND*
26 | **bpftool** **link { show | list }** [*LINK*]
27 | **bpftool** **link pin** *LINK* *FILE*
28 | **bpftool** **link detach** *LINK*
29 | **bpftool** **link help**
36 **bpftool link { show | list }** [*LINK*]
45 Since Linux 5.8 bpftool is able to discover information about
47 links. On such kernels bpftool will automatically emit this
50 **bpftool link pin** *LINK* *FILE*
[all …]
Dbpftool-cgroup.rst4 bpftool-cgroup
17 **bpftool** [*OPTIONS*] **cgroup** *COMMAND*
27 | **bpftool** **cgroup** { **show** | **list** } *CGROUP* [**effective**]
28 | **bpftool** **cgroup tree** [*CGROUP_ROOT*] [**effective**]
29 | **bpftool** **cgroup attach** *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
30 | **bpftool** **cgroup detach** *CGROUP* *ATTACH_TYPE* *PROG*
31 | **bpftool** **cgroup help**
43 **bpftool cgroup { show | list }** *CGROUP* [**effective**]
53 **bpftool cgroup tree** [*CGROUP_ROOT*] [**effective**]
56 bpftool uses cgroup v2 mountpoint.
[all …]
Dbpftool-feature.rst4 bpftool-feature
17 **bpftool** [*OPTIONS*] **feature** *COMMAND*
26 | **bpftool** **feature probe** [*COMPONENT*] [**full**] [**unprivileged**] [**macros** [**prefix**…
27 | **bpftool** **feature help**
33 **bpftool feature probe** [**kernel**] [**full**] [**macros** [**prefix** *PREFIX*]]
39 By default, bpftool **does not run probes** for
56 When the **unprivileged** keyword is used, bpftool will dump
62 bpftool is inadvertently run as non-root, for example. This
63 keyword is unavailable if bpftool was compiled without
66 **bpftool feature probe dev** *NAME* [**full**] [**macros** [**prefix** *PREFIX*]]
[all …]
Dbpftool-perf.rst4 bpftool-perf
17 **bpftool** [*OPTIONS*] **perf** *COMMAND*
27 | **bpftool** **perf** { **show** | **list** }
28 | **bpftool** **perf help**
32 **bpftool perf { show | list }**
42 **bpftool perf help**
52 | **# bpftool perf**
62 | **# bpftool -j perf**
Dbpftool-iter.rst4 bpftool-iter
17 **bpftool** [*OPTIONS*] **iter** *COMMAND*
26 | **bpftool** **iter pin** *OBJ* *PATH* [**map** *MAP*]
27 | **bpftool** **iter help**
34 **bpftool iter pin** *OBJ* *PATH* [**map** *MAP*]
55 **bpftool iter help**
64 **# bpftool iter pin bpf_iter_netlink.o /sys/fs/bpf/my_netlink**
71 **# bpftool iter pin bpf_iter_hashmap.o /sys/fs/bpf/my_hashmap map id 20**
Dcommon_options.rst4 Print short help message (similar to **bpftool help**).
7 Print version number (similar to **bpftool version**), and optional
8 features that were included when bpftool was compiled. Optional
10 for JIT-ted programs (**bpftool prog dump jited**) and usage of BPF
11 skeletons (some features like **bpftool prog profile** or showing
28 requirements. By default, bpftool has more strict requirements
Dbpftool-gen.rst4 bpftool-gen
17 **bpftool** [*OPTIONS*] **gen** *COMMAND*
26 | **bpftool** **gen object** *OUTPUT_FILE* *INPUT_FILE* [*INPUT_FILE*...]
27 | **bpftool** **gen skeleton** *FILE* [**name** *OBJECT_NAME*]
28 | **bpftool** **gen help**
32 **bpftool gen object** *OUTPUT_FILE* *INPUT_FILE* [*INPUT_FILE*...]
52 **bpftool gen skeleton** *FILE*
152 **bpftool gen help**
219 **$ bpftool gen object example.bpf.o example1.bpf.o example2.bpf.o**
225 **$ bpftool gen skeleton example.bpf.o name example | tee example.skel.h**
Dbpftool.rst4 BPFTOOL title
17 **bpftool** [*OPTIONS*] *OBJECT* { *COMMAND* | **help** }
19 **bpftool** **batch file** *FILE*
21 **bpftool** **version**
44 *bpftool* allows for inspection and simple modification of BPF objects
/external/bpftool/
DREADME.md1 bpftool chapter
5 `tools/bpf/bpftool`](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/bp…
17 BPF/bpftool usage and questions
20 Please check out [the manual pages](docs) for documentation about bpftool. A
22 post](https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/bpf/bpftool).
24 All general BPF questions, including kernel functionality, bpftool features and
34 bpftool mirror repo is set up and organized.
53 …![build](https://github.com/libbpf/bpftool/actions/workflows/build.yaml/badge.svg)](https://github…
59 bpftool:
62 $ git clone --recurse-submodules https://github.com/libbpf/bpftool.git
[all …]
/external/bpftool/scripts/
Dsync-kernel.sh4 echo "USAGE: ./sync-kernel.sh <bpftool-repo> <kernel-repo>"
6 …echo "This script synchronizes the mirror with upstream bpftool sources from the kernel repository…
8 … - Update the libbpf submodule, commit, and use its new checkpoints as target commits for bpftool."
11 echo " - Update bpftool's version number based on bpf-next's kernel version and target commit."
15 …echo "Set BPF_NEXT_BASELINE to override bpf-next tree commit, otherwise read from <bpftool-repo>/C…
16 …echo "Set BPF_BASELINE to override bpf tree commit, otherwise read from <bpftool-repo>/BPF-CHECKPO…
17 …TIP_COMMIT to override bpf-next tree target commit, otherwise read from <bpftool-repo>/libbpf/CHEC…
18 …echo "Set BPF_TIP_COMMIT to override bpf tree target commit, otherwise read from <bpftool-repo>/li…
30 echo "Error: bpftool or linux repos are not specified"
48 BPFTOOL_SRC_DIR="tools/bpf/bpftool"
[all …]
/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_bpftool_build.sh7 echo -e "\tTest the different ways of building bpftool."
23 if [ ! -e tools/bpf/bpftool/Makefile ]; then
24 echo -e "skip: bpftool files not found!\n"
45 find $dir -type f -executable -name bpftool -print -exec false {} + && \
46 ERROR=1 && printf "FAILURE: Did not find bpftool\n"
88 echo "Trying to build bpftool"
99 ## down from toplevel Makefile to bpftool's Makefile.
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
[all …]
Dtest_bpftool_metadata.sh45 if ! bpftool version > /dev/null 2>&1; then
46 echo "selftests: $TESTNAME [SKIP] Could not run test without bpftool"
58 bpftool prog load metadata_unused.o $BPF_DIR/unused
60 METADATA_PLAIN="$(bpftool prog)"
64 bpftool prog --json | grep '"metadata":{"a":"foo","b":1}' > /dev/null
66 bpftool map | grep 'metadata.rodata' > /dev/null
70 bpftool prog load metadata_used.o $BPF_DIR/used
72 METADATA_PLAIN="$(bpftool prog)"
76 bpftool prog --json | grep '"metadata":{"a":"bar","b":2}' > /dev/null
78 bpftool map | grep 'metadata.rodata' > /dev/null
Dtest_bpftool_synctypes.py13 os.path.join(LINUX_ROOT, 'tools/bpf/bpftool'))
218 bpftool, for example:
237 a macro in bpftool, for example:
283 An extractor for bpftool's main.h
332 An extractor for bpftool's prog.c.
347 An extractor for bpftool's map.c.
359 An extractor for bpftool's cgroup.c.
368 An extractor for bpftool's common.c.
426 An extractor for bpftool-prog.rst.
428 filename = os.path.join(BPFTOOL_DOC_DIR, 'bpftool-prog.rst')
[all …]
DMakefile13 BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool
157 $(HOST_BUILD_DIR)/bpftool $(HOST_BUILD_DIR)/resolve_btfids \
181 DEFAULT_BPFTOOL := $(HOST_SCRATCH_DIR)/sbin/bpftool
186 BPFTOOL_OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \
216 BPFTOOL ?= $(DEFAULT_BPFTOOL) macro
218 $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/bpftool
222 OUTPUT=$(HOST_BUILD_DIR)/bpftool/ \
256 $(INCLUDE_DIR)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL) | $(INCLUDE_DIR)
259 $(Q)$(BPFTOOL) btf dump file $(VMLINUX_BTF) format c > $@
400 $(TRUNNER_BPF_SKELS): %.skel.h: %.o $(BPFTOOL) | $(TRUNNER_OUTPUT)
[all …]
Dtest_flow_dissector.sh22 if bpftool="$(which bpftool)"; then
25 $bpftool prog loadall ./bpf_flow.o /sys/fs/bpf/flow \
28 if ! unshare --net $bpftool prog attach pinned \
34 $bpftool prog attach pinned /sys/fs/bpf/flow/_dissect \
37 if unshare --net $bpftool prog attach pinned \
43 if ! $bpftool prog detach pinned \
51 echo "Skipping root flow dissector test, bpftool not found" >&2
Dtest_xdp_veth.sh71 if ! bpftool version > /dev/null 2>&1; then
72 echo "selftests: $TESTNAME [SKIP] Could not run test without bpftool"
100 bpftool prog loadall \
103 bpftool map update pinned $BPF_DIR/maps/tx_port key 0 0 0 0 value 122 0 0 0
104 bpftool map update pinned $BPF_DIR/maps/tx_port key 1 0 0 0 value 133 0 0 0
105 bpftool map update pinned $BPF_DIR/maps/tx_port key 2 0 0 0 value 111 0 0 0
Dtest_offload.py168 def bpftool(args, JSON=True, ns="", fail=True, include_stderr=False): function
169 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns,
173 _, progs = bpftool("prog show", JSON=True, ns=ns, fail=True)
185 _, maps = bpftool("map show", JSON=True, ns=ns, fail=True)
220 res = bpftool(args, fail=fail, include_stderr=include_stderr)
600 bpftool("prog pin id %d %s" % (prog["id"], file_name))
608 bpftool("map pin id %d %s" % (m["id"], file_name))
615 ret, err = bpftool("prog show pin %s" % (prog_file), fail=False)
622 ret, err = bpftool("map show pin %s" % (map_file), fail=False)
767 ret, progs = bpftool("prog", fail=False)
[all …]
/external/bpftool/.github/workflows/
Dbuild.yaml24 - name: Build bpftool
27 ./src/bpftool 2>&1 | grep -q Usage
28 ./src/bpftool -p version | \
32 - name: Build bpftool, with clang
36 ./src/bpftool 2>&1 | grep -q Usage
37 ./src/bpftool -p version | \
41 - name: Build bpftool's documentation
44 grep -q ".TH BPFTOOL 8" ./docs/bpftool.8
/external/bpftool/src/
DMakefile36 # libbpf, but still required by bpftool.
78 CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
95 FEATURE_USER = .bpftool
130 all: $(OUTPUT)bpftool
152 BPFTOOL_BOOTSTRAP := $(BOOTSTRAP_OUTPUT)bpftool
215 $(OUTPUT)bpftool: $(OBJS) $(LIBBPF)
229 $(call QUIET_CLEAN, bpftool)
230 $(Q)$(RM) -- $(OUTPUT)bpftool $(OUTPUT)*.o $(OUTPUT)*.d
234 $(Q)$(RM) -- $(OUTPUT)FEATURE-DUMP.bpftool
237 install-bin: $(OUTPUT)bpftool
[all …]
/external/linux-kselftest/tools/testing/selftests/bpf/progs/
Dbpf_iter_bpf_hash_map.c86 * below bpftool command sequence: in dump_bpf_hash_map()
87 * bpftool map create /sys/fs/bpf/m1 type hash \ in dump_bpf_hash_map()
89 * bpftool map update id 77 key 0 0 0 1 0 0 0 0 0 0 0 1 \ in dump_bpf_hash_map()
91 * bpftool map update id 77 key 0 0 0 1 0 0 0 0 0 0 0 2 \ in dump_bpf_hash_map()
93 * The bpftool iter command line: in dump_bpf_hash_map()
94 * bpftool iter pin ./bpf_iter_bpf_hash_map.o /sys/fs/bpf/p1 \ in dump_bpf_hash_map()

123