]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: offload: don't use prog->aux->offload as boolean
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 28 Dec 2017 02:39:04 +0000 (18:39 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Sun, 31 Dec 2017 15:12:22 +0000 (16:12 +0100)
commite19c68a6d8e2ea3f26518fe9c7bc9a68514506e9
tree088372c4392d04fc95231543f338c8a1cc73cb9b
parenta8c32e7761ae56d07fe63b1d84b3040902112e3d
bpf: offload: don't use prog->aux->offload as boolean

We currently use aux->offload to indicate that program is bound
to a specific device.  This forces us to keep the offload structure
around even after the device is gone.  Add a bool member to
struct bpf_prog_aux to indicate if offload was requested.

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf.h
kernel/bpf/syscall.c