bpf: Print function name in addition to function id
authorThomas Graf <tgraf@suug.ch>
Thu, 27 Oct 2016 09:23:51 +0000 (11:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 19:55:13 +0000 (15:55 -0400)
commitebb676daa1a340ccef25eb769aefc09b79c01f8a
tree3a12499230e97b4cd2d2b00a140e9fcc62ad7a2e
parent46b5ab1a7cfef72cc15e9de135650851619bc406
bpf: Print function name in addition to function id

The verifier currently prints raw function ids when printing CALL
instructions or when complaining:

5: (85) call 23
unknown func 23

print a meaningful function name instead:

5: (85) call bpf_redirect#23
unknown func bpf_redirect#23

Moves the function documentation to a single comment and renames all
helpers names in the list to conform to the bpf_ prefix notation so
they can be greped in the kernel source.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/bpf.h
kernel/bpf/verifier.c