diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2023-08-16 11:56:51 +0200 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2023-08-16 10:14:17 -0700 |
commit | 053bbf9bff58864be880d7e9a5af586793dbb7de (patch) | |
tree | 0c687e9ba2d3c6b02448639a49b805b274a320d1 /block/blk-pm.h | |
parent | e16e6c6df475b10b1ed933a6827798312612358f (diff) | |
download | lwn-053bbf9bff58864be880d7e9a5af586793dbb7de.tar.gz lwn-053bbf9bff58864be880d7e9a5af586793dbb7de.zip |
bpftool: Implement link show support for xdp
Add support to dump XDP link information to bpftool. This reuses the
recently added show_link_ifindex_{plain,json}(). The XDP link info only
exposes the ifindex.
Below shows an example link dump output, and a cgroup link is included
for comparison, too:
# bpftool link
[...]
10: cgroup prog 2466
cgroup_id 1 attach_type cgroup_inet6_post_bind
[...]
16: xdp prog 2477
ifindex enp5s0(3)
[...]
Equivalent json output:
# bpftool link --json
[...]
{
"id": 10,
"type": "cgroup",
"prog_id": 2466,
"cgroup_id": 1,
"attach_type": "cgroup_inet6_post_bind"
},
[...]
{
"id": 16,
"type": "xdp",
"prog_id": 2477,
"devname": "enp5s0",
"ifindex": 3
}
[...]
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/r/20230816095651.10014-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'block/blk-pm.h')
0 files changed, 0 insertions, 0 deletions