]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpf: don't complain about no kernel version for networking code
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 May 2018 17:24:42 +0000 (10:24 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 May 2018 23:40:52 +0000 (01:40 +0200)
commitb7b017df2da9fd697f9c0463f228d17fb83cd629
tree3eff4d0d19a8bfc59266fd2ca56fce6eeb818517
parent23fc3571de38bdd116c4d715557ce3b82e9e89a7
tools: bpf: don't complain about no kernel version for networking code

BPF programs only have to specify the target kernel version for
tracing related hooks, in networking world that requirement does
not really apply.  Loosen the checks in libbpf to reflect that.

bpf_object__open() users will continue to see the error for backward
compatibility (and because prog_type is not available there).

Error code for NULL file name is changed from ENOENT to EINVAL,
as it seems more appropriate, hopefully, that's an OK change.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c