Skip to content

Commit 4ce420d

Browse files
rameezrehman408qmonnet
authored andcommitted
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 <[email protected]> Signed-off-by: Quentin Monnet <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 214eb3e commit 4ce420d

File tree

3 files changed

+35
-40
lines changed

3 files changed

+35
-40
lines changed

docs/bpftool-cgroup.rst

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -90,41 +90,36 @@ bpftool cgroup attach *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
9090

9191
Non-default *ATTACH_FLAGS* are supported by kernel version 4.14 and later.
9292

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)
128123

129124
bpftool cgroup detach *CGROUP* *ATTACH_TYPE* *PROG*
130125
Detach *PROG* from the cgroup *CGROUP* and attach type *ATTACH_TYPE*.

docs/bpftool-gen.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bpftool gen skeleton *FILE*
110110
- **example__open_and_load** combines **example__open** and
111111
**example__load** invocations in one commonly used operation.
112112

113-
- **example__attach** and **example__detach**
113+
- **example__attach** and **example__detach**.
114114
This pair of functions allow to attach and detach, correspondingly,
115115
already loaded BPF object. Only BPF programs of types supported by libbpf
116116
for auto-attachment will be auto-attached and their corresponding BPF
@@ -119,7 +119,7 @@ bpftool gen skeleton *FILE*
119119
**example__detach** will detach both links created automatically, as well
120120
as those populated by user manually.
121121

122-
- **example__destroy**
122+
- **example__destroy**.
123123
Detach and unload BPF programs, free up all the resources used by
124124
skeleton and BPF object.
125125

@@ -146,11 +146,11 @@ bpftool gen subskeleton *FILE*
146146

147147
Consequently, there are only two functions defined for subskeletons:
148148

149-
- **example__open(bpf_object\*)**
149+
- **example__open(bpf_object\*)**.
150150
Instantiates a subskeleton from an already opened (but not necessarily
151151
loaded) **bpf_object**.
152152

153-
- **example__destroy()**
153+
- **example__destroy()**.
154154
Frees the storage for the subskeleton but *does not* unload any BPF
155155
programs or maps.
156156

docs/bpftool-iter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SYNOPSIS
2121
*COMMANDS* := { **pin** | **help** }
2222

2323
ITER COMMANDS
24-
===================
24+
=============
2525

2626
| **bpftool** **iter pin** *OBJ* *PATH* [**map** *MAP*]
2727
| **bpftool** **iter help**

0 commit comments

Comments
 (0)