]> asedeno.scripts.mit.edu Git - linux.git/commit
bpf: offload: keep the offload state per-ASIC
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 17 Jul 2018 17:53:25 +0000 (10:53 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Jul 2018 13:10:34 +0000 (15:10 +0200)
commit602144c224604f1cbff02ee2d1cf46825269ecbd
tree8de28d85871da8fd3d49865568fccfca8ab2cbd0
parent9fd7c5559165f4c679b40c5e6ad442955832dfad
bpf: offload: keep the offload state per-ASIC

Create a higher-level entity to represent a device/ASIC to allow
programs and maps to be shared between device ports.  The extra
work is required to make sure we don't destroy BPF objects as
soon as the netdev for which they were loaded gets destroyed,
as other ports may still be using them.  When netdev goes away
all of its BPF objects will be moved to other netdevs of the
device, and only destroyed when last netdev is unregistered.

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>
drivers/net/ethernet/netronome/nfp/bpf/main.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/netdevsim/bpf.c
drivers/net/netdevsim/netdevsim.h
include/linux/bpf.h
kernel/bpf/offload.c