summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2023-08-16 11:56:50 +0200
committerMartin KaFai Lau <martin.lau@kernel.org>2023-08-16 10:14:17 -0700
commite16e6c6df475b10b1ed933a6827798312612358f (patch)
tree14a1179fabb61db2bd47432a06140a274f705e8f /kernel
parent23cf7aa539dc26f45e42ef6303613f03f4ae2142 (diff)
downloadlinux-stable-e16e6c6df475b10b1ed933a6827798312612358f.tar.gz
linux-stable-e16e6c6df475b10b1ed933a6827798312612358f.tar.bz2
linux-stable-e16e6c6df475b10b1ed933a6827798312612358f.zip
bpftool: Implement link show support for tcx
Add support to dump tcx link information to bpftool. This adds a common helper show_link_ifindex_{plain,json}() which can be reused also for other link types. The plain text and json device output is the same format as in bpftool net dump. Below shows an example link dump output along with a cgroup link for comparison: # bpftool link [...] 10: cgroup prog 1977 cgroup_id 1 attach_type cgroup_inet6_post_bind [...] 13: tcx prog 2053 ifindex enp5s0(3) attach_type tcx_ingress 14: tcx prog 2080 ifindex enp5s0(3) attach_type tcx_egress [...] Equivalent json output: # bpftool link --json [...] { "id": 10, "type": "cgroup", "prog_id": 1977, "cgroup_id": 1, "attach_type": "cgroup_inet6_post_bind" }, [...] { "id": 13, "type": "tcx", "prog_id": 2053, "devname": "enp5s0", "ifindex": 3, "attach_type": "tcx_ingress" }, { "id": 14, "type": "tcx", "prog_id": 2080, "devname": "enp5s0", "ifindex": 3, "attach_type": "tcx_egress" } [...] Suggested-by: Yafang Shao <laoar.shao@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Acked-by: Yafang Shao <laoar.shao@gmail.com> Link: https://lore.kernel.org/r/20230816095651.10014-1-daniel@iogearbox.net Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions