Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools: bpftool: document restriction on '.' in names to pin in bpffs

Names used to pin eBPF programs and maps under the eBPF virtual file
system cannot contain a dot character, which is reserved for future
extensions of this file system.

Document this in bpftool man pages to avoid users getting confused if
pinning fails because of a dot.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

authored by

Quentin Monnet and committed by
Daniel Borkmann
882731e0 c5fa5d60

+9 -3
+3 -1
tools/bpf/bpftool/Documentation/bpftool-map.rst
··· 86 86 **bpftool map pin** *MAP* *FILE* 87 87 Pin map *MAP* as *FILE*. 88 88 89 - Note: *FILE* must be located in *bpffs* mount. 89 + Note: *FILE* must be located in *bpffs* mount. It must not 90 + contain a dot character ('.'), which is reserved for future 91 + extensions of *bpffs*. 90 92 91 93 **bpftool** **map event_pipe** *MAP* [**cpu** *N* **index** *M*] 92 94 Read events from a BPF_MAP_TYPE_PERF_EVENT_ARRAY map.
+6 -2
tools/bpf/bpftool/Documentation/bpftool-prog.rst
··· 75 75 **bpftool prog pin** *PROG* *FILE* 76 76 Pin program *PROG* as *FILE*. 77 77 78 - Note: *FILE* must be located in *bpffs* mount. 78 + Note: *FILE* must be located in *bpffs* mount. It must not 79 + contain a dot character ('.'), which is reserved for future 80 + extensions of *bpffs*. 79 81 80 82 **bpftool prog load** *OBJ* *FILE* [**type** *TYPE*] [**map** {**idx** *IDX* | **name** *NAME*} *MAP*] [**dev** *NAME*] 81 83 Load bpf program from binary *OBJ* and pin as *FILE*. ··· 93 91 If **dev** *NAME* is specified program will be loaded onto 94 92 given networking device (offload). 95 93 96 - Note: *FILE* must be located in *bpffs* mount. 94 + Note: *FILE* must be located in *bpffs* mount. It must not 95 + contain a dot character ('.'), which is reserved for future 96 + extensions of *bpffs*. 97 97 98 98 **bpftool prog attach** *PROG* *ATTACH_TYPE* *MAP* 99 99 Attach bpf program *PROG* (with type specified by *ATTACH_TYPE*)