]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tc, bpf: further improve error reporting
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 8 Apr 2016 22:32:04 +0000 (00:32 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 11 Apr 2016 21:53:58 +0000 (21:53 +0000)
commitafc1a2000b6f991587c815076941385c259e21ed
tree1bf9806ee2edbc351a86004013158e5f132fbb85
parent0395711c52260c3a1cb0984948c3db56c69a073b
tc, bpf: further improve error reporting

Make it easier to spot issues when loading the object file fails. This
includes reporting in what pinned object specs differ, better indication
when we've reached instruction limits. Don't retry to load a non relo
program once we failed with bpf(2), and report out of bounds tail call key.

Also, add truncation of huge log outputs by default. Sometimes errors are
quite easy to spot by only looking at the tail of the verifier log, but
logs can get huge in size e.g. up to few MB (due to verifier checking all
possible program paths). Thus, by default limit output to the last 4096
bytes and indicate that it's truncated. For the full log, the verbose option
can be used.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tc/tc_bpf.c
tc/tc_bpf.h