bpf: Implement BPF XDP link-specific introspection APIs

Implement XDP link-specific show_fdinfo and link_info to emit ifindex.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200722064603.3350758-7-andriin@fb.com
This commit is contained in:
Andrii Nakryiko
2020-07-21 23:45:59 -07:00
committed by Alexei Starovoitov
parent 026a4c28e1
commit c1931c9784
2 changed files with 34 additions and 0 deletions

View File

@@ -4069,6 +4069,9 @@ struct bpf_link_info {
__u32 netns_ino;
__u32 attach_type;
} netns;
struct {
__u32 ifindex;
} xdp;
};
} __attribute__((aligned(8)));