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

bpftool: Clean-up typos, punctuation, list formatting in docs

Improve the formatting of the attach flags for cgroup programs in the
relevant man page, and fix typos ("can be on of", "an userspace inet
socket") when introducing that list. Also fix a couple of other trivial
issues in docs.

[ Quentin: Fixed trival issues in bpftool-gen.rst and bpftool-iter.rst ]

Signed-off-by: Rameez Rehman <rameezrehman408@hotmail.com>
Signed-off-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240331200346.29118-4-qmo@kernel.org

authored by

Rameez Rehman and committed by
Daniel Borkmann
a70f5d84 ea379b3c

+35 -40
+30 -35
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
··· 90 90 91 91 Non-default *ATTACH_FLAGS* are supported by kernel version 4.14 and later. 92 92 93 - *ATTACH_TYPE* can be on of: 94 - **ingress** ingress path of the inet socket (since 4.10); 95 - **egress** egress path of the inet socket (since 4.10); 96 - **sock_create** opening of an inet socket (since 4.10); 97 - **sock_ops** various socket operations (since 4.12); 98 - **device** device access (since 4.15); 99 - **bind4** call to bind(2) for an inet4 socket (since 4.17); 100 - **bind6** call to bind(2) for an inet6 socket (since 4.17); 101 - **post_bind4** return from bind(2) for an inet4 socket (since 4.17); 102 - **post_bind6** return from bind(2) for an inet6 socket (since 4.17); 103 - **connect4** call to connect(2) for an inet4 socket (since 4.17); 104 - **connect6** call to connect(2) for an inet6 socket (since 4.17); 105 - **connect_unix** call to connect(2) for a unix socket (since 6.7); 106 - **sendmsg4** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected 107 - udp4 socket (since 4.18); 108 - **sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected 109 - udp6 socket (since 4.18); 110 - **sendmsg_unix** call to sendto(2), sendmsg(2), sendmmsg(2) for an 111 - unconnected unix socket (since 6.7); 112 - **recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an 113 - unconnected udp4 socket (since 5.2); 114 - **recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an 115 - unconnected udp6 socket (since 5.2); 116 - **recvmsg_unix** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an 117 - unconnected unix socket (since 6.7); 118 - **sysctl** sysctl access (since 5.2); 119 - **getsockopt** call to getsockopt (since 5.3); 120 - **setsockopt** call to setsockopt (since 5.3); 121 - **getpeername4** call to getpeername(2) for an inet4 socket (since 5.8); 122 - **getpeername6** call to getpeername(2) for an inet6 socket (since 5.8); 123 - **getpeername_unix** call to getpeername(2) for a unix socket (since 6.7); 124 - **getsockname4** call to getsockname(2) for an inet4 socket (since 5.8); 125 - **getsockname6** call to getsockname(2) for an inet6 socket (since 5.8). 126 - **getsockname_unix** call to getsockname(2) for a unix socket (since 6.7); 127 - **sock_release** closing an userspace inet socket (since 5.9). 93 + *ATTACH_TYPE* can be one of: 94 + 95 + - **ingress** ingress path of the inet socket (since 4.10) 96 + - **egress** egress path of the inet socket (since 4.10) 97 + - **sock_create** opening of an inet socket (since 4.10) 98 + - **sock_ops** various socket operations (since 4.12) 99 + - **device** device access (since 4.15) 100 + - **bind4** call to bind(2) for an inet4 socket (since 4.17) 101 + - **bind6** call to bind(2) for an inet6 socket (since 4.17) 102 + - **post_bind4** return from bind(2) for an inet4 socket (since 4.17) 103 + - **post_bind6** return from bind(2) for an inet6 socket (since 4.17) 104 + - **connect4** call to connect(2) for an inet4 socket (since 4.17) 105 + - **connect6** call to connect(2) for an inet6 socket (since 4.17) 106 + - **connect_unix** call to connect(2) for a unix socket (since 6.7) 107 + - **sendmsg4** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected udp4 socket (since 4.18) 108 + - **sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected udp6 socket (since 4.18) 109 + - **sendmsg_unix** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected unix socket (since 6.7) 110 + - **recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an unconnected udp4 socket (since 5.2) 111 + - **recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an unconnected udp6 socket (since 5.2) 112 + - **recvmsg_unix** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an unconnected unix socket (since 6.7) 113 + - **sysctl** sysctl access (since 5.2) 114 + - **getsockopt** call to getsockopt (since 5.3) 115 + - **setsockopt** call to setsockopt (since 5.3) 116 + - **getpeername4** call to getpeername(2) for an inet4 socket (since 5.8) 117 + - **getpeername6** call to getpeername(2) for an inet6 socket (since 5.8) 118 + - **getpeername_unix** call to getpeername(2) for a unix socket (since 6.7) 119 + - **getsockname4** call to getsockname(2) for an inet4 socket (since 5.8) 120 + - **getsockname6** call to getsockname(2) for an inet6 socket (since 5.8) 121 + - **getsockname_unix** call to getsockname(2) for a unix socket (since 6.7) 122 + - **sock_release** closing a userspace inet socket (since 5.9) 128 123 129 124 bpftool cgroup detach *CGROUP* *ATTACH_TYPE* *PROG* 130 125 Detach *PROG* from the cgroup *CGROUP* and attach type *ATTACH_TYPE*.
+4 -4
tools/bpf/bpftool/Documentation/bpftool-gen.rst
··· 110 110 - **example__open_and_load** combines **example__open** and 111 111 **example__load** invocations in one commonly used operation. 112 112 113 - - **example__attach** and **example__detach** 113 + - **example__attach** and **example__detach**. 114 114 This pair of functions allow to attach and detach, correspondingly, 115 115 already loaded BPF object. Only BPF programs of types supported by libbpf 116 116 for auto-attachment will be auto-attached and their corresponding BPF ··· 119 119 **example__detach** will detach both links created automatically, as well 120 120 as those populated by user manually. 121 121 122 - - **example__destroy** 122 + - **example__destroy**. 123 123 Detach and unload BPF programs, free up all the resources used by 124 124 skeleton and BPF object. 125 125 ··· 146 146 147 147 Consequently, there are only two functions defined for subskeletons: 148 148 149 - - **example__open(bpf_object\*)** 149 + - **example__open(bpf_object\*)**. 150 150 Instantiates a subskeleton from an already opened (but not necessarily 151 151 loaded) **bpf_object**. 152 152 153 - - **example__destroy()** 153 + - **example__destroy()**. 154 154 Frees the storage for the subskeleton but *does not* unload any BPF 155 155 programs or maps. 156 156
+1 -1
tools/bpf/bpftool/Documentation/bpftool-iter.rst
··· 21 21 *COMMANDS* := { **pin** | **help** } 22 22 23 23 ITER COMMANDS 24 - =================== 24 + ============= 25 25 26 26 | **bpftool** **iter pin** *OBJ* *PATH* [**map** *MAP*] 27 27 | **bpftool** **iter help**