mirror-linux/include
Jakub Kicinski a38845729e bpf: offload: add map offload infrastructure
BPF map offload follow similar path to program offload.  At creation
time users may specify ifindex of the device on which they want to
create the map.  Map will be validated by the kernel's
.map_alloc_check callback and device driver will be called for the
actual allocation.  Map will have an empty set of operations
associated with it (save for alloc and free callbacks).  The real
device callbacks are kept in map->offload->dev_ops because they
have slightly different signatures.  Map operations are called in
process context so the driver may communicate with HW freely,
msleep(), wait() etc.

Map alloc and free callbacks are muxed via existing .ndo_bpf, and
are always called with rtnl lock held.  Maps and programs are
guaranteed to be destroyed before .ndo_uninit (i.e. before
unregister_netdev() returns).  Map callbacks are invoked with
bpf_devs_lock *read* locked, drivers must take care of exclusive
locking if necessary.

All offload-specific branches are marked with unlikely() (through
bpf_map_is_dev_bound()), given that branch penalty will be
negligible compared to IO anyway, and we don't want to penalize
SW path unnecessarily.

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>
2018-01-14 23:36:30 +01:00
..
acpi
asm-generic error-injection: Add injectable error types 2018-01-12 17:33:38 -08:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-01-05 12:10:06 -08:00
drm
dt-bindings
keys
kvm
linux bpf: offload: add map offload infrastructure 2018-01-14 23:36:30 +01:00
math-emu
media
memory
misc
net net: sch: red: Change the name of the stats struct to be generic 2018-01-10 16:07:40 -05:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace net: tracepoint: exposing sk_faimily in tracepoint inet_sock_set_state 2018-01-08 14:32:45 -05:00
uapi bpf: offload: add map offload infrastructure 2018-01-14 23:36:30 +01:00
video
xen xen: fixes for 4.15-rc5 2017-12-22 12:30:10 -08:00