diff options
| author | Jakub Sitnicki <[email protected]> | 2020-05-31 08:28:42 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-06-01 22:21:03 +0000 |
| commit | e948947a6e111b3d4bbe538105ee2f3611e032ad (patch) | |
| tree | 819624d6f0c4dd42ee070ce3f2340274b0b0139d /net/tipc/node.c | |
| parent | bpftool: Extract helpers for showing link attach type (diff) | |
| download | kernel-e948947a6e111b3d4bbe538105ee2f3611e032ad.tar.gz kernel-e948947a6e111b3d4bbe538105ee2f3611e032ad.zip | |
bpftool: Support link show for netns-attached links
Make `bpf link show` aware of new link type, that is links attached to
netns. When listing netns-attached links, display netns inode number as its
identifier and link attach type.
Sample session:
# readlink /proc/self/ns/net
net:[4026532251]
# bpftool prog show
357: flow_dissector tag a04f5eef06a7f555 gpl
loaded_at 2020-05-30T16:53:51+0200 uid 0
xlated 16B jited 37B memlock 4096B
358: flow_dissector tag a04f5eef06a7f555 gpl
loaded_at 2020-05-30T16:53:51+0200 uid 0
xlated 16B jited 37B memlock 4096B
# bpftool link show
108: netns prog 357
netns_ino 4026532251 attach_type flow_dissector
# bpftool link -jp show
[{
"id": 108,
"type": "netns",
"prog_id": 357,
"netns_ino": 4026532251,
"attach_type": "flow_dissector"
}
]
(... after netns is gone ...)
# bpftool link show
108: netns prog 357
netns_ino 0 attach_type flow_dissector
# bpftool link -jp show
[{
"id": 108,
"type": "netns",
"prog_id": 357,
"netns_ino": 0,
"attach_type": "flow_dissector"
}
]
Signed-off-by: Jakub Sitnicki <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/tipc/node.c')
0 files changed, 0 insertions, 0 deletions
