aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorQuentin Monnet <[email protected]>2021-07-30 21:54:31 +0000
committerAndrii Nakryiko <[email protected]>2021-07-30 22:40:27 +0000
commitb544342e52fc3dfcc1d430fff8d1a7a3be920ffd (patch)
treee5849e1f2eddcdb279c3633c829c6cc085be5323 /tools/bpf/bpftool/common.c
parentselftests/bpf: Check consistency between bpftool source, doc, completion (diff)
downloadkernel-b544342e52fc3dfcc1d430fff8d1a7a3be920ffd.tar.gz
kernel-b544342e52fc3dfcc1d430fff8d1a7a3be920ffd.zip
tools: bpftool: Complete and synchronise attach or map types
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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/common.c')
-rw-r--r--tools/bpf/bpftool/common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index 1828bba19020..c5e57cce887a 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -67,6 +67,12 @@ const char * const attach_type_name[__MAX_BPF_ATTACH_TYPE] = {
[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, ...)