Message ID | 20210729162932.30365-4-quentin@isovalent.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | tools: bpftool: update, synchronise and | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for bpf-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 12 maintainers not CCed: yhs@fb.com hawk@kernel.org kpsingh@kernel.org kafai@fb.com cong.wang@bytedance.com john.fastabend@gmail.com kuba@kernel.org songliubraving@fb.com lmb@cloudflare.com davem@davemloft.net liujian56@huawei.com zhuyifei@google.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | warning | WARNING: line length of 87 exceeds 80 columns |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Thu, Jul 29, 2021 at 9:29 AM Quentin Monnet <quentin@isovalent.com> wrote: > > Update bpftool's list of attach type names to tell it about the latest > attach types, or the "ringbuf" map. Also update the documentation, help > messages, and bash completion when relevant. > > These missing items were reported by the newly added Python script used > to help maintain consistency in bpftool. > > Signed-off-by: Quentin Monnet <quentin@isovalent.com> > --- > .../bpftool/Documentation/bpftool-prog.rst | 2 +- > tools/bpf/bpftool/bash-completion/bpftool | 5 +- > tools/bpf/bpftool/common.c | 76 ++++++++++--------- > tools/bpf/bpftool/prog.c | 4 +- > 4 files changed, 47 insertions(+), 40 deletions(-) > > diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst > index fe1b38e7e887..abf5f4cd7d3e 100644 > --- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst > +++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst > @@ -48,7 +48,7 @@ PROG COMMANDS > | **struct_ops** | **fentry** | **fexit** | **freplace** | **sk_lookup** > | } > | *ATTACH_TYPE* := { > -| **msg_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector** > +| **msg_verdict** | **skb_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector** > | } > | *METRICs* := { > | **cycles** | **instructions** | **l1d_loads** | **llc_misses** > diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool > index b2e33a2d8524..69d018474537 100644 > --- a/tools/bpf/bpftool/bash-completion/bpftool > +++ b/tools/bpf/bpftool/bash-completion/bpftool > @@ -405,7 +405,8 @@ _bpftool() > ;; > 5) > local BPFTOOL_PROG_ATTACH_TYPES='msg_verdict \ > - stream_verdict stream_parser flow_dissector' > + skb_verdict stream_verdict stream_parser \ > + flow_dissector' > COMPREPLY=( $( compgen -W \ > "$BPFTOOL_PROG_ATTACH_TYPES" -- "$cur" ) ) > return 0 > @@ -708,7 +709,7 @@ _bpftool() > hash_of_maps devmap devmap_hash sockmap cpumap \ > xskmap sockhash cgroup_storage reuseport_sockarray \ > percpu_cgroup_storage queue stack sk_storage \ > - struct_ops inode_storage task_storage' > + struct_ops inode_storage task_storage ringbuf' > COMPREPLY=( $( compgen -W \ > "$BPFTOOL_MAP_CREATE_TYPES" -- "$cur" ) ) > return 0 > diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c > index 1828bba19020..b47797cac64f 100644 > --- a/tools/bpf/bpftool/common.c > +++ b/tools/bpf/bpftool/common.c > @@ -31,42 +31,48 @@ > #endif > > const char * const attach_type_name[__MAX_BPF_ATTACH_TYPE] = { > - [BPF_CGROUP_INET_INGRESS] = "ingress", > - [BPF_CGROUP_INET_EGRESS] = "egress", > - [BPF_CGROUP_INET_SOCK_CREATE] = "sock_create", > - [BPF_CGROUP_INET_SOCK_RELEASE] = "sock_release", > - [BPF_CGROUP_SOCK_OPS] = "sock_ops", > - [BPF_CGROUP_DEVICE] = "device", > - [BPF_CGROUP_INET4_BIND] = "bind4", > - [BPF_CGROUP_INET6_BIND] = "bind6", > - [BPF_CGROUP_INET4_CONNECT] = "connect4", > - [BPF_CGROUP_INET6_CONNECT] = "connect6", > - [BPF_CGROUP_INET4_POST_BIND] = "post_bind4", > - [BPF_CGROUP_INET6_POST_BIND] = "post_bind6", > - [BPF_CGROUP_INET4_GETPEERNAME] = "getpeername4", > - [BPF_CGROUP_INET6_GETPEERNAME] = "getpeername6", > - [BPF_CGROUP_INET4_GETSOCKNAME] = "getsockname4", > - [BPF_CGROUP_INET6_GETSOCKNAME] = "getsockname6", > - [BPF_CGROUP_UDP4_SENDMSG] = "sendmsg4", > - [BPF_CGROUP_UDP6_SENDMSG] = "sendmsg6", > - [BPF_CGROUP_SYSCTL] = "sysctl", > - [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", > - [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", > - [BPF_CGROUP_GETSOCKOPT] = "getsockopt", > - [BPF_CGROUP_SETSOCKOPT] = "setsockopt", > + [BPF_CGROUP_INET_INGRESS] = "ingress", > + [BPF_CGROUP_INET_EGRESS] = "egress", > + [BPF_CGROUP_INET_SOCK_CREATE] = "sock_create", > + [BPF_CGROUP_INET_SOCK_RELEASE] = "sock_release", > + [BPF_CGROUP_SOCK_OPS] = "sock_ops", > + [BPF_CGROUP_DEVICE] = "device", > + [BPF_CGROUP_INET4_BIND] = "bind4", > + [BPF_CGROUP_INET6_BIND] = "bind6", > + [BPF_CGROUP_INET4_CONNECT] = "connect4", > + [BPF_CGROUP_INET6_CONNECT] = "connect6", > + [BPF_CGROUP_INET4_POST_BIND] = "post_bind4", > + [BPF_CGROUP_INET6_POST_BIND] = "post_bind6", > + [BPF_CGROUP_INET4_GETPEERNAME] = "getpeername4", > + [BPF_CGROUP_INET6_GETPEERNAME] = "getpeername6", > + [BPF_CGROUP_INET4_GETSOCKNAME] = "getsockname4", > + [BPF_CGROUP_INET6_GETSOCKNAME] = "getsockname6", > + [BPF_CGROUP_UDP4_SENDMSG] = "sendmsg4", > + [BPF_CGROUP_UDP6_SENDMSG] = "sendmsg6", > + [BPF_CGROUP_SYSCTL] = "sysctl", > + [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", > + [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", > + [BPF_CGROUP_GETSOCKOPT] = "getsockopt", > + [BPF_CGROUP_SETSOCKOPT] = "setsockopt", > > - [BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser", > - [BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict", > - [BPF_SK_SKB_VERDICT] = "sk_skb_verdict", > - [BPF_SK_MSG_VERDICT] = "sk_msg_verdict", > - [BPF_LIRC_MODE2] = "lirc_mode2", > - [BPF_FLOW_DISSECTOR] = "flow_dissector", > - [BPF_TRACE_RAW_TP] = "raw_tp", > - [BPF_TRACE_FENTRY] = "fentry", > - [BPF_TRACE_FEXIT] = "fexit", > - [BPF_MODIFY_RETURN] = "mod_ret", > - [BPF_LSM_MAC] = "lsm_mac", > - [BPF_SK_LOOKUP] = "sk_lookup", > + [BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser", > + [BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict", > + [BPF_SK_SKB_VERDICT] = "sk_skb_verdict", > + [BPF_SK_MSG_VERDICT] = "sk_msg_verdict", > + [BPF_LIRC_MODE2] = "lirc_mode2", > + [BPF_FLOW_DISSECTOR] = "flow_dissector", > + [BPF_TRACE_RAW_TP] = "raw_tp", > + [BPF_TRACE_FENTRY] = "fentry", > + [BPF_TRACE_FEXIT] = "fexit", > + [BPF_MODIFY_RETURN] = "mod_ret", > + [BPF_LSM_MAC] = "lsm_mac", > + [BPF_SK_LOOKUP] = "sk_lookup", > + [BPF_TRACE_ITER] = "trace_iter", > + [BPF_XDP_DEVMAP] = "xdp_devmap", > + [BPF_XDP_CPUMAP] = "xdp_cpumap", > + [BPF_XDP] = "xdp", > + [BPF_SK_REUSEPORT_SELECT] = "sk_skb_reuseport_select", > + [BPF_SK_REUSEPORT_SELECT_OR_MIGRATE] = "sk_skb_reuseport_select_or_migrate", > }; > you are ruining Git blaming abilities for purely aesthetic reasons, which are not good enough reasons, IMO. Please don't do this, this nice alignment is nice, but definitely not necessary. So whatever is longer then the "default indentation", just add another tab or two and be done with it. That way we can actually see what was added in this patch, btw. > void p_err(const char *fmt, ...) > diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c > index cc48726740ad..1ee87225543b 100644 > --- a/tools/bpf/bpftool/prog.c > +++ b/tools/bpf/bpftool/prog.c > @@ -2245,8 +2245,8 @@ static int do_help(int argc, char **argv) > " cgroup/sendmsg6 | cgroup/recvmsg4 | cgroup/recvmsg6 |\n" > " cgroup/getsockopt | cgroup/setsockopt | cgroup/sock_release |\n" > " struct_ops | fentry | fexit | freplace | sk_lookup }\n" > - " ATTACH_TYPE := { msg_verdict | stream_verdict | stream_parser |\n" > - " flow_dissector }\n" > + " ATTACH_TYPE := { msg_verdict | skb_verdict | stream_verdict |\n" > + " stream_parser | flow_dissector }\n" > " METRIC := { cycles | instructions | l1d_loads | llc_misses | itlb_misses | dtlb_misses }\n" > " " HELP_SPEC_OPTIONS "\n" > "", > -- > 2.30.2 >
2021-07-30 11:52 UTC-0700 ~ Andrii Nakryiko <andrii.nakryiko@gmail.com> > On Thu, Jul 29, 2021 at 9:29 AM Quentin Monnet <quentin@isovalent.com> wrote: >> >> Update bpftool's list of attach type names to tell it about the latest >> attach types, or the "ringbuf" map. Also update the documentation, help >> messages, and bash completion when relevant. >> >> These missing items were reported by the newly added Python script used >> to help maintain consistency in bpftool. >> >> Signed-off-by: Quentin Monnet <quentin@isovalent.com> >> --- >> .../bpftool/Documentation/bpftool-prog.rst | 2 +- >> tools/bpf/bpftool/bash-completion/bpftool | 5 +- >> tools/bpf/bpftool/common.c | 76 ++++++++++--------- >> tools/bpf/bpftool/prog.c | 4 +- >> 4 files changed, 47 insertions(+), 40 deletions(-) >> >> diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c >> index 1828bba19020..b47797cac64f 100644 >> --- a/tools/bpf/bpftool/common.c >> +++ b/tools/bpf/bpftool/common.c >> @@ -31,42 +31,48 @@ >> #endif >> >> const char * const attach_type_name[__MAX_BPF_ATTACH_TYPE] = { >> - [BPF_CGROUP_INET_INGRESS] = "ingress", >> - [BPF_CGROUP_INET_EGRESS] = "egress", >> - [BPF_CGROUP_INET_SOCK_CREATE] = "sock_create", >> - [BPF_CGROUP_INET_SOCK_RELEASE] = "sock_release", >> - [BPF_CGROUP_SOCK_OPS] = "sock_ops", >> - [BPF_CGROUP_DEVICE] = "device", >> - [BPF_CGROUP_INET4_BIND] = "bind4", >> - [BPF_CGROUP_INET6_BIND] = "bind6", >> - [BPF_CGROUP_INET4_CONNECT] = "connect4", >> - [BPF_CGROUP_INET6_CONNECT] = "connect6", >> - [BPF_CGROUP_INET4_POST_BIND] = "post_bind4", >> - [BPF_CGROUP_INET6_POST_BIND] = "post_bind6", >> - [BPF_CGROUP_INET4_GETPEERNAME] = "getpeername4", >> - [BPF_CGROUP_INET6_GETPEERNAME] = "getpeername6", >> - [BPF_CGROUP_INET4_GETSOCKNAME] = "getsockname4", >> - [BPF_CGROUP_INET6_GETSOCKNAME] = "getsockname6", >> - [BPF_CGROUP_UDP4_SENDMSG] = "sendmsg4", >> - [BPF_CGROUP_UDP6_SENDMSG] = "sendmsg6", >> - [BPF_CGROUP_SYSCTL] = "sysctl", >> - [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", >> - [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", >> - [BPF_CGROUP_GETSOCKOPT] = "getsockopt", >> - [BPF_CGROUP_SETSOCKOPT] = "setsockopt", >> + [BPF_CGROUP_INET_INGRESS] = "ingress", >> + [BPF_CGROUP_INET_EGRESS] = "egress", >> + [BPF_CGROUP_INET_SOCK_CREATE] = "sock_create", >> + [BPF_CGROUP_INET_SOCK_RELEASE] = "sock_release", >> + [BPF_CGROUP_SOCK_OPS] = "sock_ops", >> + [BPF_CGROUP_DEVICE] = "device", >> + [BPF_CGROUP_INET4_BIND] = "bind4", >> + [BPF_CGROUP_INET6_BIND] = "bind6", >> + [BPF_CGROUP_INET4_CONNECT] = "connect4", >> + [BPF_CGROUP_INET6_CONNECT] = "connect6", >> + [BPF_CGROUP_INET4_POST_BIND] = "post_bind4", >> + [BPF_CGROUP_INET6_POST_BIND] = "post_bind6", >> + [BPF_CGROUP_INET4_GETPEERNAME] = "getpeername4", >> + [BPF_CGROUP_INET6_GETPEERNAME] = "getpeername6", >> + [BPF_CGROUP_INET4_GETSOCKNAME] = "getsockname4", >> + [BPF_CGROUP_INET6_GETSOCKNAME] = "getsockname6", >> + [BPF_CGROUP_UDP4_SENDMSG] = "sendmsg4", >> + [BPF_CGROUP_UDP6_SENDMSG] = "sendmsg6", >> + [BPF_CGROUP_SYSCTL] = "sysctl", >> + [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", >> + [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", >> + [BPF_CGROUP_GETSOCKOPT] = "getsockopt", >> + [BPF_CGROUP_SETSOCKOPT] = "setsockopt", >> >> - [BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser", >> - [BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict", >> - [BPF_SK_SKB_VERDICT] = "sk_skb_verdict", >> - [BPF_SK_MSG_VERDICT] = "sk_msg_verdict", >> - [BPF_LIRC_MODE2] = "lirc_mode2", >> - [BPF_FLOW_DISSECTOR] = "flow_dissector", >> - [BPF_TRACE_RAW_TP] = "raw_tp", >> - [BPF_TRACE_FENTRY] = "fentry", >> - [BPF_TRACE_FEXIT] = "fexit", >> - [BPF_MODIFY_RETURN] = "mod_ret", >> - [BPF_LSM_MAC] = "lsm_mac", >> - [BPF_SK_LOOKUP] = "sk_lookup", >> + [BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser", >> + [BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict", >> + [BPF_SK_SKB_VERDICT] = "sk_skb_verdict", >> + [BPF_SK_MSG_VERDICT] = "sk_msg_verdict", >> + [BPF_LIRC_MODE2] = "lirc_mode2", >> + [BPF_FLOW_DISSECTOR] = "flow_dissector", >> + [BPF_TRACE_RAW_TP] = "raw_tp", >> + [BPF_TRACE_FENTRY] = "fentry", >> + [BPF_TRACE_FEXIT] = "fexit", >> + [BPF_MODIFY_RETURN] = "mod_ret", >> + [BPF_LSM_MAC] = "lsm_mac", >> + [BPF_SK_LOOKUP] = "sk_lookup", >> + [BPF_TRACE_ITER] = "trace_iter", >> + [BPF_XDP_DEVMAP] = "xdp_devmap", >> + [BPF_XDP_CPUMAP] = "xdp_cpumap", >> + [BPF_XDP] = "xdp", >> + [BPF_SK_REUSEPORT_SELECT] = "sk_skb_reuseport_select", >> + [BPF_SK_REUSEPORT_SELECT_OR_MIGRATE] = "sk_skb_reuseport_select_or_migrate", >> }; >> > > you are ruining Git blaming abilities for purely aesthetic reasons, > which are not good enough reasons, IMO. Please don't do this, this > nice alignment is nice, but definitely not necessary. So whatever is > longer then the "default indentation", just add another tab or two and > be done with it. I think I've been asked to do the opposite in the past. And I wouldn't be ruining much in the current case, the array has been moved from another location and nearly all types were added here in the same commit. But OK. > That way we can actually see what was added in this > patch, btw. On this one I agree :)
diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst index fe1b38e7e887..abf5f4cd7d3e 100644 --- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst +++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst @@ -48,7 +48,7 @@ PROG COMMANDS | **struct_ops** | **fentry** | **fexit** | **freplace** | **sk_lookup** | } | *ATTACH_TYPE* := { -| **msg_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector** +| **msg_verdict** | **skb_verdict** | **stream_verdict** | **stream_parser** | **flow_dissector** | } | *METRICs* := { | **cycles** | **instructions** | **l1d_loads** | **llc_misses** diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool index b2e33a2d8524..69d018474537 100644 --- a/tools/bpf/bpftool/bash-completion/bpftool +++ b/tools/bpf/bpftool/bash-completion/bpftool @@ -405,7 +405,8 @@ _bpftool() ;; 5) local BPFTOOL_PROG_ATTACH_TYPES='msg_verdict \ - stream_verdict stream_parser flow_dissector' + skb_verdict stream_verdict stream_parser \ + flow_dissector' COMPREPLY=( $( compgen -W \ "$BPFTOOL_PROG_ATTACH_TYPES" -- "$cur" ) ) return 0 @@ -708,7 +709,7 @@ _bpftool() hash_of_maps devmap devmap_hash sockmap cpumap \ xskmap sockhash cgroup_storage reuseport_sockarray \ percpu_cgroup_storage queue stack sk_storage \ - struct_ops inode_storage task_storage' + struct_ops inode_storage task_storage ringbuf' COMPREPLY=( $( compgen -W \ "$BPFTOOL_MAP_CREATE_TYPES" -- "$cur" ) ) return 0 diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c index 1828bba19020..b47797cac64f 100644 --- a/tools/bpf/bpftool/common.c +++ b/tools/bpf/bpftool/common.c @@ -31,42 +31,48 @@ #endif const char * const attach_type_name[__MAX_BPF_ATTACH_TYPE] = { - [BPF_CGROUP_INET_INGRESS] = "ingress", - [BPF_CGROUP_INET_EGRESS] = "egress", - [BPF_CGROUP_INET_SOCK_CREATE] = "sock_create", - [BPF_CGROUP_INET_SOCK_RELEASE] = "sock_release", - [BPF_CGROUP_SOCK_OPS] = "sock_ops", - [BPF_CGROUP_DEVICE] = "device", - [BPF_CGROUP_INET4_BIND] = "bind4", - [BPF_CGROUP_INET6_BIND] = "bind6", - [BPF_CGROUP_INET4_CONNECT] = "connect4", - [BPF_CGROUP_INET6_CONNECT] = "connect6", - [BPF_CGROUP_INET4_POST_BIND] = "post_bind4", - [BPF_CGROUP_INET6_POST_BIND] = "post_bind6", - [BPF_CGROUP_INET4_GETPEERNAME] = "getpeername4", - [BPF_CGROUP_INET6_GETPEERNAME] = "getpeername6", - [BPF_CGROUP_INET4_GETSOCKNAME] = "getsockname4", - [BPF_CGROUP_INET6_GETSOCKNAME] = "getsockname6", - [BPF_CGROUP_UDP4_SENDMSG] = "sendmsg4", - [BPF_CGROUP_UDP6_SENDMSG] = "sendmsg6", - [BPF_CGROUP_SYSCTL] = "sysctl", - [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", - [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", - [BPF_CGROUP_GETSOCKOPT] = "getsockopt", - [BPF_CGROUP_SETSOCKOPT] = "setsockopt", + [BPF_CGROUP_INET_INGRESS] = "ingress", + [BPF_CGROUP_INET_EGRESS] = "egress", + [BPF_CGROUP_INET_SOCK_CREATE] = "sock_create", + [BPF_CGROUP_INET_SOCK_RELEASE] = "sock_release", + [BPF_CGROUP_SOCK_OPS] = "sock_ops", + [BPF_CGROUP_DEVICE] = "device", + [BPF_CGROUP_INET4_BIND] = "bind4", + [BPF_CGROUP_INET6_BIND] = "bind6", + [BPF_CGROUP_INET4_CONNECT] = "connect4", + [BPF_CGROUP_INET6_CONNECT] = "connect6", + [BPF_CGROUP_INET4_POST_BIND] = "post_bind4", + [BPF_CGROUP_INET6_POST_BIND] = "post_bind6", + [BPF_CGROUP_INET4_GETPEERNAME] = "getpeername4", + [BPF_CGROUP_INET6_GETPEERNAME] = "getpeername6", + [BPF_CGROUP_INET4_GETSOCKNAME] = "getsockname4", + [BPF_CGROUP_INET6_GETSOCKNAME] = "getsockname6", + [BPF_CGROUP_UDP4_SENDMSG] = "sendmsg4", + [BPF_CGROUP_UDP6_SENDMSG] = "sendmsg6", + [BPF_CGROUP_SYSCTL] = "sysctl", + [BPF_CGROUP_UDP4_RECVMSG] = "recvmsg4", + [BPF_CGROUP_UDP6_RECVMSG] = "recvmsg6", + [BPF_CGROUP_GETSOCKOPT] = "getsockopt", + [BPF_CGROUP_SETSOCKOPT] = "setsockopt", - [BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser", - [BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict", - [BPF_SK_SKB_VERDICT] = "sk_skb_verdict", - [BPF_SK_MSG_VERDICT] = "sk_msg_verdict", - [BPF_LIRC_MODE2] = "lirc_mode2", - [BPF_FLOW_DISSECTOR] = "flow_dissector", - [BPF_TRACE_RAW_TP] = "raw_tp", - [BPF_TRACE_FENTRY] = "fentry", - [BPF_TRACE_FEXIT] = "fexit", - [BPF_MODIFY_RETURN] = "mod_ret", - [BPF_LSM_MAC] = "lsm_mac", - [BPF_SK_LOOKUP] = "sk_lookup", + [BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser", + [BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict", + [BPF_SK_SKB_VERDICT] = "sk_skb_verdict", + [BPF_SK_MSG_VERDICT] = "sk_msg_verdict", + [BPF_LIRC_MODE2] = "lirc_mode2", + [BPF_FLOW_DISSECTOR] = "flow_dissector", + [BPF_TRACE_RAW_TP] = "raw_tp", + [BPF_TRACE_FENTRY] = "fentry", + [BPF_TRACE_FEXIT] = "fexit", + [BPF_MODIFY_RETURN] = "mod_ret", + [BPF_LSM_MAC] = "lsm_mac", + [BPF_SK_LOOKUP] = "sk_lookup", + [BPF_TRACE_ITER] = "trace_iter", + [BPF_XDP_DEVMAP] = "xdp_devmap", + [BPF_XDP_CPUMAP] = "xdp_cpumap", + [BPF_XDP] = "xdp", + [BPF_SK_REUSEPORT_SELECT] = "sk_skb_reuseport_select", + [BPF_SK_REUSEPORT_SELECT_OR_MIGRATE] = "sk_skb_reuseport_select_or_migrate", }; void p_err(const char *fmt, ...) diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index cc48726740ad..1ee87225543b 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -2245,8 +2245,8 @@ static int do_help(int argc, char **argv) " cgroup/sendmsg6 | cgroup/recvmsg4 | cgroup/recvmsg6 |\n" " cgroup/getsockopt | cgroup/setsockopt | cgroup/sock_release |\n" " struct_ops | fentry | fexit | freplace | sk_lookup }\n" - " ATTACH_TYPE := { msg_verdict | stream_verdict | stream_parser |\n" - " flow_dissector }\n" + " ATTACH_TYPE := { msg_verdict | skb_verdict | stream_verdict |\n" + " stream_parser | flow_dissector }\n" " METRIC := { cycles | instructions | l1d_loads | llc_misses | itlb_misses | dtlb_misses }\n" " " HELP_SPEC_OPTIONS "\n" "",
Update bpftool's list of attach type names to tell it about the latest attach types, or the "ringbuf" map. Also update the documentation, help messages, and bash completion when relevant. These missing items were reported by the newly added Python script used to help maintain consistency in bpftool. Signed-off-by: Quentin Monnet <quentin@isovalent.com> --- .../bpftool/Documentation/bpftool-prog.rst | 2 +- tools/bpf/bpftool/bash-completion/bpftool | 5 +- tools/bpf/bpftool/common.c | 76 ++++++++++--------- tools/bpf/bpftool/prog.c | 4 +- 4 files changed, 47 insertions(+), 40 deletions(-)