]> git.proxmox.com Git - mirror_iproute2.git/commit
bpf: consolidate dumps to use bpf_dump_prog_info
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 5 Sep 2017 00:24:32 +0000 (02:24 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 5 Sep 2017 16:26:34 +0000 (09:26 -0700)
commita0b5b7cf5c05c7aa29c683c52f896c74ab7924b0
treef4cc68aacb9c6e212e1e2c3126194b760478c715
parent1b736dc469dcabd4180848a1f1b3d1fef2b84dbc
bpf: consolidate dumps to use bpf_dump_prog_info

Consolidate dump of prog info to use bpf_dump_prog_info() when possible.
Moving forward, we want to have a consistent output for BPF progs when
being dumped. E.g. in cls/act case we used to dump tag as a separate
netlink attribute before we had BPF_OBJ_GET_INFO_BY_FD bpf(2) command.

Move dumping tag into bpf_dump_prog_info() as well, and only dump the
netlink attribute for older kernels. Also, reuse bpf_dump_prog_info()
for XDP case, so we can dump tag and whether program was jited, which
we currently don't show.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/bpf_util.h
ip/ipaddress.c
ip/iplink_xdp.c
ip/xdp.h
lib/bpf.c
tc/f_bpf.c
tc/m_bpf.c