mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
tools/bpftool: Add documentation and bash-completion for link detach
Add info on link detach sub-command to man page. Add detach to bash-completion as well. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: John Fastabend <john.fastabend@gmail.com. Link: https://lore.kernel.org/bpf/20200731182830.286260-6-andriin@fb.com
This commit is contained in:
parent
0e8c7c07f0
commit
e85f99aa77
2 changed files with 10 additions and 2 deletions
|
@ -21,6 +21,7 @@ LINK COMMANDS
|
||||||
|
|
||||||
| **bpftool** **link { show | list }** [*LINK*]
|
| **bpftool** **link { show | list }** [*LINK*]
|
||||||
| **bpftool** **link pin** *LINK* *FILE*
|
| **bpftool** **link pin** *LINK* *FILE*
|
||||||
|
| **bpftool** **link detach *LINK*
|
||||||
| **bpftool** **link help**
|
| **bpftool** **link help**
|
||||||
|
|
|
|
||||||
| *LINK* := { **id** *LINK_ID* | **pinned** *FILE* }
|
| *LINK* := { **id** *LINK_ID* | **pinned** *FILE* }
|
||||||
|
@ -49,6 +50,13 @@ DESCRIPTION
|
||||||
contain a dot character ('.'), which is reserved for future
|
contain a dot character ('.'), which is reserved for future
|
||||||
extensions of *bpffs*.
|
extensions of *bpffs*.
|
||||||
|
|
||||||
|
**bpftool link detach** *LINK*
|
||||||
|
Force-detach link *LINK*. BPF link and its underlying BPF
|
||||||
|
program will stay valid, but they will be detached from the
|
||||||
|
respective BPF hook and BPF link will transition into
|
||||||
|
a defunct state until last open file descriptor for that
|
||||||
|
link is closed.
|
||||||
|
|
||||||
**bpftool link help**
|
**bpftool link help**
|
||||||
Print short help message.
|
Print short help message.
|
||||||
|
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ _bpftool()
|
||||||
;;
|
;;
|
||||||
link)
|
link)
|
||||||
case $command in
|
case $command in
|
||||||
show|list|pin)
|
show|list|pin|detach)
|
||||||
case $prev in
|
case $prev in
|
||||||
id)
|
id)
|
||||||
_bpftool_get_link_ids
|
_bpftool_get_link_ids
|
||||||
|
@ -1139,7 +1139,7 @@ _bpftool()
|
||||||
COMPREPLY=( $( compgen -W "$LINK_TYPE" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$LINK_TYPE" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
pin)
|
pin|detach)
|
||||||
if [[ $prev == "$command" ]]; then
|
if [[ $prev == "$command" ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$LINK_TYPE" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$LINK_TYPE" -- "$cur" ) )
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue