bpftool: Clean-up typos, punctuation, list formatting in docs
authorRameez Rehman <rameezrehman408@hotmail.com>
Sun, 31 Mar 2024 20:03:46 +0000 (21:03 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Apr 2024 13:50:23 +0000 (15:50 +0200)
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
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
tools/bpf/bpftool/Documentation/bpftool-gen.rst
tools/bpf/bpftool/Documentation/bpftool-iter.rst

index 1acf9f58fca2ec39a6fddd3e8cfc7ba4fce7076a..b2610d169e6055048f0de8156ac521b52239bdbe 100644 (file)
@@ -90,41 +90,36 @@ bpftool cgroup attach *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*]
 
     Non-default *ATTACH_FLAGS* are supported by kernel version 4.14 and later.
 
-    *ATTACH_TYPE* can be on of:
-    **ingress** ingress path of the inet socket (since 4.10);
-    **egress** egress path of the inet socket (since 4.10);
-    **sock_create** opening of an inet socket (since 4.10);
-    **sock_ops** various socket operations (since 4.12);
-    **device** device access (since 4.15);
-    **bind4** call to bind(2) for an inet4 socket (since 4.17);
-    **bind6** call to bind(2) for an inet6 socket (since 4.17);
-    **post_bind4** return from bind(2) for an inet4 socket (since 4.17);
-    **post_bind6** return from bind(2) for an inet6 socket (since 4.17);
-    **connect4** call to connect(2) for an inet4 socket (since 4.17);
-    **connect6** call to connect(2) for an inet6 socket (since 4.17);
-    **connect_unix** call to connect(2) for a unix socket (since 6.7);
-    **sendmsg4** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected
-    udp4 socket (since 4.18);
-    **sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected
-    udp6 socket (since 4.18);
-    **sendmsg_unix** call to sendto(2), sendmsg(2), sendmmsg(2) for an
-    unconnected unix socket (since 6.7);
-    **recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an
-    unconnected udp4 socket (since 5.2);
-    **recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an
-    unconnected udp6 socket (since 5.2);
-    **recvmsg_unix** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an
-    unconnected unix socket (since 6.7);
-    **sysctl** sysctl access (since 5.2);
-    **getsockopt** call to getsockopt (since 5.3);
-    **setsockopt** call to setsockopt (since 5.3);
-    **getpeername4** call to getpeername(2) for an inet4 socket (since 5.8);
-    **getpeername6** call to getpeername(2) for an inet6 socket (since 5.8);
-    **getpeername_unix** call to getpeername(2) for a unix socket (since 6.7);
-    **getsockname4** call to getsockname(2) for an inet4 socket (since 5.8);
-    **getsockname6** call to getsockname(2) for an inet6 socket (since 5.8).
-    **getsockname_unix** call to getsockname(2) for a unix socket (since 6.7);
-    **sock_release** closing an userspace inet socket (since 5.9).
+    *ATTACH_TYPE* can be one of:
+
+    - **ingress** ingress path of the inet socket (since 4.10)
+    - **egress** egress path of the inet socket (since 4.10)
+    - **sock_create** opening of an inet socket (since 4.10)
+    - **sock_ops** various socket operations (since 4.12)
+    - **device** device access (since 4.15)
+    - **bind4** call to bind(2) for an inet4 socket (since 4.17)
+    - **bind6** call to bind(2) for an inet6 socket (since 4.17)
+    - **post_bind4** return from bind(2) for an inet4 socket (since 4.17)
+    - **post_bind6** return from bind(2) for an inet6 socket (since 4.17)
+    - **connect4** call to connect(2) for an inet4 socket (since 4.17)
+    - **connect6** call to connect(2) for an inet6 socket (since 4.17)
+    - **connect_unix** call to connect(2) for a unix socket (since 6.7)
+    - **sendmsg4** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected udp4 socket (since 4.18)
+    - **sendmsg6** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected udp6 socket (since 4.18)
+    - **sendmsg_unix** call to sendto(2), sendmsg(2), sendmmsg(2) for an unconnected unix socket (since 6.7)
+    - **recvmsg4** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an unconnected udp4 socket (since 5.2)
+    - **recvmsg6** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an unconnected udp6 socket (since 5.2)
+    - **recvmsg_unix** call to recvfrom(2), recvmsg(2), recvmmsg(2) for an unconnected unix socket (since 6.7)
+    - **sysctl** sysctl access (since 5.2)
+    - **getsockopt** call to getsockopt (since 5.3)
+    - **setsockopt** call to setsockopt (since 5.3)
+    - **getpeername4** call to getpeername(2) for an inet4 socket (since 5.8)
+    - **getpeername6** call to getpeername(2) for an inet6 socket (since 5.8)
+    - **getpeername_unix** call to getpeername(2) for a unix socket (since 6.7)
+    - **getsockname4** call to getsockname(2) for an inet4 socket (since 5.8)
+    - **getsockname6** call to getsockname(2) for an inet6 socket (since 5.8)
+    - **getsockname_unix** call to getsockname(2) for a unix socket (since 6.7)
+    - **sock_release** closing a userspace inet socket (since 5.9)
 
 bpftool cgroup detach *CGROUP* *ATTACH_TYPE* *PROG*
     Detach *PROG* from the cgroup *CGROUP* and attach type *ATTACH_TYPE*.
index e9589c21e9c35cb3aa2dbfe808b4645f6689980c..c768e6d4ae09c472b5c13304ade6612a9e1b1aa1 100644 (file)
@@ -110,7 +110,7 @@ bpftool gen skeleton *FILE*
     - **example__open_and_load** combines **example__open** and
       **example__load** invocations in one commonly used operation.
 
-    - **example__attach** and **example__detach**
+    - **example__attach** and **example__detach**.
       This pair of functions allow to attach and detach, correspondingly,
       already loaded BPF object. Only BPF programs of types supported by libbpf
       for auto-attachment will be auto-attached and their corresponding BPF
@@ -119,7 +119,7 @@ bpftool gen skeleton *FILE*
       **example__detach** will detach both links created automatically, as well
       as those populated by user manually.
 
-    - **example__destroy**
+    - **example__destroy**.
       Detach and unload BPF programs, free up all the resources used by
       skeleton and BPF object.
 
@@ -146,11 +146,11 @@ bpftool gen subskeleton *FILE*
 
     Consequently, there are only two functions defined for subskeletons:
 
-    - **example__open(bpf_object\*)**
+    - **example__open(bpf_object\*)**.
       Instantiates a subskeleton from an already opened (but not necessarily
       loaded) **bpf_object**.
 
-    - **example__destroy()**
+    - **example__destroy()**.
       Frees the storage for the subskeleton but *does not* unload any BPF
       programs or maps.
 
index 7bcb4e993d7d3e1ee1550199891e79babe6d982c..2e5d81c906dc63401b9d12a9ef7285dfc6c7179a 100644 (file)
@@ -21,7 +21,7 @@ SYNOPSIS
 *COMMANDS* := { **pin** | **help** }
 
 ITER COMMANDS
-===================
+=============
 
 | **bpftool** **iter pin** *OBJ* *PATH* [**map** *MAP*]
 | **bpftool** **iter help**