netdevsim: bpf: support fake map offload
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 18 Jan 2018 03:13:30 +0000 (19:13 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 18 Jan 2018 21:54:25 +0000 (22:54 +0100)
commit395cacb5f1a0a290f1ae9ca4692c400d2b57a705
tree132e2f49411d8464a996dd4c3b6e6e7d2aeea021
parent064a07cba2919bcfbadf9edf5c26c740e69fa585
netdevsim: bpf: support fake map offload

Add to netdevsim ability to pretend it's offloading BPF maps.
We only allow allocation of tiny 2 entry maps, to keep things
simple.  Mutex lock may seem heavy for the operations we
perform, but we want to make sure callbacks can sleep.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/netdevsim/bpf.c
drivers/net/netdevsim/netdevsim.h