bpf: bpftool, fix documentation for attach types
authorAlban Crequy <alban@kinvolk.io>
Tue, 19 Feb 2019 14:13:32 +0000 (15:13 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 19 Feb 2019 16:23:18 +0000 (17:23 +0100)
bpftool has support for attach types "stream_verdict" and
"stream_parser" but the documentation was referring to them as
"skb_verdict" and "skb_parse". The inconsistency comes from commit
b7d3826c2ed6 ("bpf: bpftool, add support for attaching programs to
maps").

This patch changes the documentation to match the implementation:
- "bpftool prog help"
- man pages
- bash completion

Signed-off-by: Alban Crequy <alban@kinvolk.io>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/bash-completion/bpftool
tools/bpf/bpftool/prog.c

index 7e59495cb02841e0b2272b2375b38e5f56927ca2..12bc1e2d4b461d8977e2de54952ae42df1d954f1 100644 (file)
@@ -42,7 +42,7 @@ PROG COMMANDS
 |              **cgroup/connect4** | **cgroup/connect6** | **cgroup/sendmsg4** | **cgroup/sendmsg6**
 |      }
 |       *ATTACH_TYPE* := {
-|              **msg_verdict** | **skb_verdict** | **skb_parse** | **flow_dissector**
+|              **msg_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector**
 |      }
 
 
index 763dd12482aac67730c72c71a467450d6ce473ca..b803827d01e8843941d40de02e819a3af8eee079 100644 (file)
@@ -311,8 +311,8 @@ _bpftool()
                             return 0
                             ;;
                         5)
-                            COMPREPLY=( $( compgen -W 'msg_verdict skb_verdict \
-                                skb_parse flow_dissector' -- "$cur" ) )
+                            COMPREPLY=( $( compgen -W 'msg_verdict stream_verdict \
+                                stream_parser flow_dissector' -- "$cur" ) )
                             return 0
                             ;;
                         6)
index 33ed0806ccc0cfc11a90361d0a823f622c69ad11..db978c8d76a84b76568f34b7531a956c741bd995 100644 (file)
@@ -1199,7 +1199,7 @@ static int do_help(int argc, char **argv)
                "                 cgroup/bind4 | cgroup/bind6 | cgroup/post_bind4 |\n"
                "                 cgroup/post_bind6 | cgroup/connect4 | cgroup/connect6 |\n"
                "                 cgroup/sendmsg4 | cgroup/sendmsg6 }\n"
-               "       ATTACH_TYPE := { msg_verdict | skb_verdict | skb_parse |\n"
+               "       ATTACH_TYPE := { msg_verdict | stream_verdict | stream_parser |\n"
                "                        flow_dissector }\n"
                "       " HELP_SPEC_OPTIONS "\n"
                "",