Jakub Sitnicki
e948947a6e
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 <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200531082846.2117903-9-jakub@cloudflare.com
2020-06-01 15:21:03 -07:00
..
2020-04-03 13:12:26 -07:00
2020-05-26 16:42:43 +02:00
2020-05-11 17:00:26 -04:00
2020-06-01 15:21:03 -07:00
2020-04-21 11:11:55 -07:00
2020-05-05 09:23:18 -06:00
2020-02-19 04:10:32 -07:00
2020-04-04 10:27:00 -07:00
2020-01-26 22:10:10 -05:00
2020-03-25 11:50:48 +01:00
2020-06-01 15:21:03 -07:00
2020-03-23 15:44:21 -04:00
2020-04-10 15:36:22 -07:00
2020-03-25 11:50:48 +01:00
2020-06-01 15:21:03 -07:00
2020-03-25 11:50:48 +01:00
2020-05-10 11:59:53 -07:00
2020-04-02 17:57:10 +01:00
2020-03-25 11:50:48 +01:00
2020-04-16 12:19:06 -03:00
2020-04-20 10:37:02 +02:00
2020-03-25 18:58:11 -07:00
2020-04-03 13:12:26 -07:00
2020-06-01 14:57:14 -07:00
2020-04-07 20:00:16 -07:00
2020-03-25 11:50:48 +01:00
2020-04-17 06:05:29 -04:00
2020-04-21 11:11:56 -07:00
2020-01-13 13:19:39 -05:00