bpftool: Add missing commands to documentation synopses
PATCH 1/1 bpftool: Add missing commands to documentation synopses
Several commands and objects implemented in bpftool are currently missing from the SYNOPSIS sections in the man pages, causing documentation drift.
Update the documentation across bpftool man pages:
- Add the missing 'token' object and its commands to bpftool.rst.
- Add missing subcommands to the SYNOPSIS blocks of btf, feature, gen, link, map, net, and prog man pages to reflect existing implementations.
- Update help command headings in the cgroup and token documentation to reference their respective objects instead of prog.
--- tools/bpf/bpftool/Documentation/bpftool-btf.rst | 2 +- .../bpftool/Documentation/bpftool-cgroup.rst | 2 +- .../bpftool/Documentation/bpftool-feature.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-gen.rst | 2 +- .../bpf/bpftool/Documentation/bpftool-link.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- .../bpf/bpftool/Documentation/bpftool-prog.rst | 2 +- .../bpf/bpftool/Documentation/bpftool-token.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool.rst | 17 ++++++++++------- 9 files changed, 19 insertions(+), 15 deletions(-)
tools/bpf/bpftool/Documentation/bpftool-btf.rst +1 -1
@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| | [{ **-B** | **--base-btf**} *FILE*]... } -*COMMANDS* := { **dump** | **help** } +*COMMANDS* := { **show** | **list** | **dump** | **help** } BTF COMMANDS =============
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst +1 -1
@@ -131,7 +131,7 @@ bpftool cgroup attach *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] bpftool cgroup detach *CGROUP* *ATTACH_TYPE* *PROG* Detach *PROG* from the cgroup *CGROUP* and attach type *ATTACH_TYPE*. -bpftool prog help +bpftool cgroup help Print short help message. OPTIONS
tools/bpf/bpftool/Documentation/bpftool-feature.rst +1 -1
@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| } -*COMMANDS* := { **probe** | **help** } +*COMMANDS* := { **probe** | **list_builtins** | **help** } FEATURE COMMANDS ================
tools/bpf/bpftool/Documentation/bpftool-gen.rst +1 -1
@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| | { **-L** | **--use-loader** } | [ { **-S** | **--sign** } {**-k** <private_key.pem>} **-i** <certificate.x509> ] } -*COMMAND* := { **object** | **skeleton** | **help** } +*COMMAND* := { **object** | **skeleton** | **subskeleton** | **min_core_btf** | **help** } GEN COMMANDS =============
tools/bpf/bpftool/Documentation/bpftool-link.rst +1 -1
@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| | { **-f** | **--bpffs** } | { **-n** | **--nomount** } } -*COMMANDS* := { **show** | **list** | **pin** | **help** } +*COMMANDS* := { **show** | **list** | **pin** | **detach** | **help** } LINK COMMANDS =============
tools/bpf/bpftool/Documentation/bpftool-map.rst +2 -1
@@ -20,7 +20,8 @@ SYNOPSIS *COMMANDS* := { **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** | -**delete** | **pin** | **help** } +**delete** | **pin** | **event_pipe** | **peek** | **push** | **pop** | **enqueue** | **dequeue** | +**freeze** | **help** } MAP COMMANDS =============
tools/bpf/bpftool/Documentation/bpftool-prog.rst +1 -1
@@ -23,7 +23,7 @@ SYNOPSIS *COMMANDS* := { **show** | **list** | **dump xlated** | **dump jited** | **pin** | **load** | -**loadall** | **help** } +**loadall** | **attach** | **detach** | **tracelog** | **run** | **profile** | **help** } PROG COMMANDS =============
tools/bpf/bpftool/Documentation/bpftool-token.rst +1 -1
@@ -35,7 +35,7 @@ bpftool token { show | list } **bpf**\ () system call commands, maps, programs, and attach types for the token. -bpftool prog help +bpftool token help Print short help message. OPTIONS
tools/bpf/bpftool/Documentation/bpftool.rst +10 -7
@@ -21,35 +21,38 @@ SYNOPSIS **bpftool** **version** *OBJECT* := { **map** | **prog** | **link** | **cgroup** | **perf** | **net** | **feature** | -**btf** | **gen** | **struct_ops** | **iter** } +**btf** | **gen** | **struct_ops** | **iter** | **token** } *OPTIONS* := { { **-V** | **--version** } | |COMMON_OPTIONS| } *MAP-COMMANDS* := { **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** | -**delete** | **pin** | **event_pipe** | **help** } +**delete** | **pin** | **event_pipe** | **peek** | **push** | **pop** | **enqueue** | **dequeue** | +**freeze** | **help** } *PROG-COMMANDS* := { **show** | **list** | **dump jited** | **dump xlated** | **pin** | -**load** | **attach** | **detach** | **help** } +**load** | **loadall** | **attach** | **detach** | **run** | **profile** | **tracelog** | **help** } *LINK-COMMANDS* := { **show** | **list** | **pin** | **detach** | **help** } -*CGROUP-COMMANDS* := { **show** | **list** | **attach** | **detach** | **help** } +*CGROUP-COMMANDS* := { **show** | **list** | **tree** | **attach** | **detach** | **help** } *PERF-COMMANDS* := { **show** | **list** | **help** } -*NET-COMMANDS* := { **show** | **list** | **help** } +*NET-COMMANDS* := { **show** | **list** | **attach** | **detach** | **help** } -*FEATURE-COMMANDS* := { **probe** | **help** } +*FEATURE-COMMANDS* := { **probe** | **list_builtins** | **help** } *BTF-COMMANDS* := { **show** | **list** | **dump** | **help** } -*GEN-COMMANDS* := { **object** | **skeleton** | **min_core_btf** | **help** } +*GEN-COMMANDS* := { **object** | **skeleton** | **subskeleton** | **min_core_btf** | **help** } *STRUCT-OPS-COMMANDS* := { **show** | **list** | **dump** | **register** | **unregister** | **help** } *ITER-COMMANDS* := { **pin** | **help** } +*TOKEN-COMMANDS* := { **show** | **list** | **help** } + DESCRIPTION =========== *bpftool* allows for inspection and simple modification of BPF objects on the
Quentin Monnet
maintainerQuoted 7 lines · Dhanush Arivappagari
Several commands and objects implemented in bpftool are currently missing from the SYNOPSIS sections in the man pages, causing documentation drift.
Update the documentation across bpftool man pages:
- Add the missing 'token' object and its commands tobpftool.rst.
- Add missing subcommands to the SYNOPSIS blocks of btf, feature, gen, link, map, net, and prog man pages to reflect existing implementations.
Thanks for this! It looks good, I just have a few minor comments.
Nit: The description is not entirely accurate, there's no change in the SYNOPSIS blocks for -net and -cgroup pages. You can keep the mention of the objects you add, but I'd just remove the list of updated pages, we can look at the diff for that.
Quoted 60 lines
- Update help command headings in the cgroup and token documentation to reference their respective objects instead of prog.
Signed-off-by Dhanush Arivappagari <[email protected]>--- tools/bpf/bpftool/Documentation/bpftool-btf.rst | 2 +- .../bpftool/Documentation/bpftool-cgroup.rst | 2 +- .../bpftool/Documentation/bpftool-feature.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-gen.rst | 2 +- .../bpf/bpftool/Documentation/bpftool-link.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- .../bpf/bpftool/Documentation/bpftool-prog.rst | 2 +- .../bpf/bpftool/Documentation/bpftool-token.rst | 2 +- tools/bpf/bpftool/Documentation/bpftool.rst | 17 ++++++++++------- 9 files changed, 19 insertions(+), 15 deletions(-)tools/bpf/bpftool/Documentation/bpftool-btf.rst +1
-1@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| | [{ **-B** | **--base-btf**} *FILE*]... } -*COMMANDS* := { **dump** | **help** } +*COMMANDS* := { **show** | **list** | **dump** | **help** } BTF COMMANDS =============tools/bpf/bpftool/Documentation/bpftool-cgroup.rst +1
-1@@ -131,7 +131,7 @@ bpftool cgroup attach *CGROUP* *ATTACH_TYPE* *PROG* [*ATTACH_FLAGS*] bpftool cgroup detach *CGROUP* *ATTACH_TYPE* *PROG* Detach *PROG* from the cgroup *CGROUP* and attach type *ATTACH_TYPE*. -bpftool prog help +bpftool cgroup help Print short help message. OPTIONStools/bpf/bpftool/Documentation/bpftool-feature.rst +1
-1@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| } -*COMMANDS* := { **probe** | **help** } +*COMMANDS* := { **probe** | **list_builtins** | **help** } FEATURE COMMANDS ================tools/bpf/bpftool/Documentation/bpftool-gen.rst +0
-0
tools/bpf/bpftool/Documentation/bpftool-gen.rst SYNOPSIS · line 21
Quoted 5 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +1
-1@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| | { **-L** | **--use-loader** } | [ { **-S** | **--sign** } {**-k** <private_key.pem>} **-i** <certificate.x509> ] } -*COMMAND* := { **object** | **skeleton** | **help** } +*COMMAND* := { **object** | **skeleton** | **subskeleton** | **min_core_btf** | **help** }
Since you're touching this line, can we please fix the first word to make it "COMMANDS" (plural) instead of "COMMAND", for consistency?
Quoted 35 lines
tools/bpf/bpftool/Documentation/bpftool-gen.rst +0
-0GEN COMMANDS =============tools/bpf/bpftool/Documentation/bpftool-link.rst +1
-1@@ -18,7 +18,7 @@ SYNOPSIS *OPTIONS* := { |COMMON_OPTIONS| | { **-f** | **--bpffs** } | { **-n** | **--nomount** } } -*COMMANDS* := { **show** | **list** | **pin** | **help** } +*COMMANDS* := { **show** | **list** | **pin** | **detach** | **help** } LINK COMMANDS =============tools/bpf/bpftool/Documentation/bpftool-map.rst +2
-1@@ -20,7 +20,8 @@ SYNOPSIS *COMMANDS* := { **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** | -**delete** | **pin** | **help** } +**delete** | **pin** | **event_pipe** | **peek** | **push** | **pop** | **enqueue** | **dequeue** | +**freeze** | **help** } MAP COMMANDS =============tools/bpf/bpftool/Documentation/bpftool-prog.rst +0
-0
tools/bpf/bpftool/Documentation/bpftool-prog.rst SYNOPSIS · line 26
Quoted 5 lines
tools/bpf/bpftool/Documentation/bpftool-prog.rst +1
-1@@ -23,7 +23,7 @@ SYNOPSIS *COMMANDS* := { **show** | **list** | **dump xlated** | **dump jited** | **pin** | **load** | -**loadall** | **help** } +**loadall** | **attach** | **detach** | **tracelog** | **run** | **profile** | **help** }
Another nit: In bpftool.rst's PROG-COMMANDS you add tracelog at the end of the list (like in do_help() in prog.c); but here, and in the command description in the same bpftool-prog.rst page, it's before run/profile. Could you please make it consistent in all four locations ("tracelog" at the end, to avoid changing do_help())?
Quoted 28 lines
tools/bpf/bpftool/Documentation/bpftool-prog.rst +0
-0PROG COMMANDS =============tools/bpf/bpftool/Documentation/bpftool-token.rst +1
-1@@ -35,7 +35,7 @@ bpftool token { show | list } **bpf**\ () system call commands, maps, programs, and attach types for the token. -bpftool prog help +bpftool token help Print short help message. OPTIONStools/bpf/bpftool/Documentation/bpftool.rst +1
-1@@ -21,35 +21,38 @@ SYNOPSIS **bpftool** **version** *OBJECT* := { **map** | **prog** | **link** | **cgroup** | **perf** | **net** | **feature** | -**btf** | **gen** | **struct_ops** | **iter** } +**btf** | **gen** | **struct_ops** | **iter** | **token** } *OPTIONS* := { { **-V** | **--version** } | |COMMON_OPTIONS| }
tools/bpf/bpftool/Documentation/bpftool.rst SYNOPSIS · line 34
Quoted 10 lines
tools/bpf/bpftool/Documentation/bpftool.rst +3
-2*MAP-COMMANDS* := { **show** | **list** | **create** | **dump** | **update** | **lookup** | **getnext** | -**delete** | **pin** | **event_pipe** | **help** } +**delete** | **pin** | **event_pipe** | **peek** | **push** | **pop** | **enqueue** | **dequeue** | +**freeze** | **help** } *PROG-COMMANDS* := { **show** | **list** | **dump jited** | **dump xlated** | **pin** | -**load** | **attach** | **detach** | **help** } +**load** | **loadall** | **attach** | **detach** | **run** | **profile** | **tracelog** | **help** }
(This is what I was referring to earlier: run/profile/tracelog)
pw-bot: cr
Thanks,
Quentin