Message ID | 20220331154555.422506-3-milan@mdaverde.com (mailing list archive) |
---|---|
State | Accepted |
Commit | fff3dfab17866f6ac5c5666839f6132b6c52f306 |
Delegated to: | BPF |
Headers | show |
Series | bpf/bpftool: add program & link type names | expand |
2022-03-31 11:45 UTC-0400 ~ Milan Landaverde <milan@mdaverde.com> > Will display the link type names in bpftool link show output > > Signed-off-by: Milan Landaverde <milan@mdaverde.com> > --- > tools/bpf/bpftool/link.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c > index 97dec81950e5..9392ef390828 100644 > --- a/tools/bpf/bpftool/link.c > +++ b/tools/bpf/bpftool/link.c > @@ -20,6 +20,8 @@ static const char * const link_type_name[] = { > [BPF_LINK_TYPE_CGROUP] = "cgroup", > [BPF_LINK_TYPE_ITER] = "iter", > [BPF_LINK_TYPE_NETNS] = "netns", > + [BPF_LINK_TYPE_XDP] = "xdp", > + [BPF_LINK_TYPE_PERF_EVENT] = "perf_event", Since this goes into bpf-next, we should add BPF_LINK_TYPE_KPROBE_MULTI as well. Quentin
On Fri, Apr 1, 2022 at 9:05 AM Quentin Monnet <quentin@isovalent.com> wrote: > > 2022-03-31 11:45 UTC-0400 ~ Milan Landaverde <milan@mdaverde.com> > > Will display the link type names in bpftool link show output > > > > Signed-off-by: Milan Landaverde <milan@mdaverde.com> > > --- > > tools/bpf/bpftool/link.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c > > index 97dec81950e5..9392ef390828 100644 > > --- a/tools/bpf/bpftool/link.c > > +++ b/tools/bpf/bpftool/link.c > > @@ -20,6 +20,8 @@ static const char * const link_type_name[] = { > > [BPF_LINK_TYPE_CGROUP] = "cgroup", > > [BPF_LINK_TYPE_ITER] = "iter", > > [BPF_LINK_TYPE_NETNS] = "netns", > > + [BPF_LINK_TYPE_XDP] = "xdp", fixed indentation here and added KPROBE_MULTI while applying > > + [BPF_LINK_TYPE_PERF_EVENT] = "perf_event", > > Since this goes into bpf-next, we should add BPF_LINK_TYPE_KPROBE_MULTI > as well. > > Quentin
diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c index 97dec81950e5..9392ef390828 100644 --- a/tools/bpf/bpftool/link.c +++ b/tools/bpf/bpftool/link.c @@ -20,6 +20,8 @@ static const char * const link_type_name[] = { [BPF_LINK_TYPE_CGROUP] = "cgroup", [BPF_LINK_TYPE_ITER] = "iter", [BPF_LINK_TYPE_NETNS] = "netns", + [BPF_LINK_TYPE_XDP] = "xdp", + [BPF_LINK_TYPE_PERF_EVENT] = "perf_event", }; static struct hashmap *link_table;
Will display the link type names in bpftool link show output Signed-off-by: Milan Landaverde <milan@mdaverde.com> --- tools/bpf/bpftool/link.c | 2 ++ 1 file changed, 2 insertions(+)