diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-11-20 18:21:58 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-11-20 18:37:35 -0500 |
commit | 51aa423959b0ab62169c98b90566a0628ba096b8 (patch) | |
tree | e8b7178d056a1dda080b9192f65b063c7d79bf3e /tools/bpf/bpftool/prog.c | |
parent | 62c71b45e8537b8cb746cc929ea05ba0258e0b5a (diff) |
bpftool: revert printing program device bound info
This reverts commit 928631e05495 ("bpftool: print program device bound
info"). We will remove this API and redo it right in -next.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r-- | tools/bpf/bpftool/prog.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index f45c44ef9bec..ad619b96c276 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <string.h> | 41 | #include <string.h> |
42 | #include <time.h> | 42 | #include <time.h> |
43 | #include <unistd.h> | 43 | #include <unistd.h> |
44 | #include <net/if.h> | ||
45 | #include <sys/types.h> | 44 | #include <sys/types.h> |
46 | #include <sys/stat.h> | 45 | #include <sys/stat.h> |
47 | 46 | ||
@@ -230,21 +229,6 @@ static void print_prog_json(struct bpf_prog_info *info, int fd) | |||
230 | info->tag[0], info->tag[1], info->tag[2], info->tag[3], | 229 | info->tag[0], info->tag[1], info->tag[2], info->tag[3], |
231 | info->tag[4], info->tag[5], info->tag[6], info->tag[7]); | 230 | info->tag[4], info->tag[5], info->tag[6], info->tag[7]); |
232 | 231 | ||
233 | if (info->status & BPF_PROG_STATUS_DEV_BOUND) { | ||
234 | jsonw_name(json_wtr, "dev"); | ||
235 | if (info->ifindex) { | ||
236 | char name[IF_NAMESIZE]; | ||
237 | |||
238 | if (!if_indextoname(info->ifindex, name)) | ||
239 | jsonw_printf(json_wtr, "\"ifindex:%d\"", | ||
240 | info->ifindex); | ||
241 | else | ||
242 | jsonw_printf(json_wtr, "\"%s\"", name); | ||
243 | } else { | ||
244 | jsonw_printf(json_wtr, "\"unknown\""); | ||
245 | } | ||
246 | } | ||
247 | |||
248 | if (info->load_time) { | 232 | if (info->load_time) { |
249 | char buf[32]; | 233 | char buf[32]; |
250 | 234 | ||
@@ -302,21 +286,6 @@ static void print_prog_plain(struct bpf_prog_info *info, int fd) | |||
302 | 286 | ||
303 | printf("tag "); | 287 | printf("tag "); |
304 | fprint_hex(stdout, info->tag, BPF_TAG_SIZE, ""); | 288 | fprint_hex(stdout, info->tag, BPF_TAG_SIZE, ""); |
305 | printf(" "); | ||
306 | |||
307 | if (info->status & BPF_PROG_STATUS_DEV_BOUND) { | ||
308 | printf("dev "); | ||
309 | if (info->ifindex) { | ||
310 | char name[IF_NAMESIZE]; | ||
311 | |||
312 | if (!if_indextoname(info->ifindex, name)) | ||
313 | printf("ifindex:%d ", info->ifindex); | ||
314 | else | ||
315 | printf("%s ", name); | ||
316 | } else { | ||
317 | printf("unknown "); | ||
318 | } | ||
319 | } | ||
320 | printf("\n"); | 289 | printf("\n"); |
321 | 290 | ||
322 | if (info->load_time) { | 291 | if (info->load_time) { |