]> git.ipfire.org Git - thirdparty/iproute2.git/commit
lib/bpf: fix verbose flag when using libbpf
authorPaul Chaignon <paul@isovalent.com>
Thu, 16 Dec 2021 15:33:36 +0000 (16:33 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 17 Dec 2021 23:21:19 +0000 (15:21 -0800)
commitc04e45d083e82f3842f3661d5340a863b8e296a5
tree5af0bd0e70bc3fd68c1e7d3ba4b464564dfc11bd
parent73590d9573148804034a88ceb2f6b7ca1545561f
lib/bpf: fix verbose flag when using libbpf

Since commit 6d61a2b55799 ("lib: add libbpf support"), passing the
verbose flag to tc filter doesn't dump the verifier logs anymore in case
of successful loading.

This commit fixes it by setting the log_level attribute before loading.
To that end, we need to call bpf_object__load_xattr directly instead of
relying on bpf_object__load.

Fixes: 6d61a2b55799 ("lib: add libbpf support")
Signed-off-by: Paul Chaignon <paul@isovalent.com>
Acked-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
lib/bpf_libbpf.c