diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-18 06:13:30 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-19 00:54:25 +0300 |
commit | 395cacb5f1a0a290f1ae9ca4692c400d2b57a705 (patch) | |
tree | 132e2f49411d8464a996dd4c3b6e6e7d2aeea021 /drivers/net/netdevsim/netdevsim.h | |
parent | 064a07cba2919bcfbadf9edf5c26c740e69fa585 (diff) | |
download | linux-395cacb5f1a0a290f1ae9ca4692c400d2b57a705.tar.xz |
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>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
-rw-r--r-- | drivers/net/netdevsim/netdevsim.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h index 32270de9395a..b80361200302 100644 --- a/drivers/net/netdevsim/netdevsim.h +++ b/drivers/net/netdevsim/netdevsim.h @@ -61,6 +61,9 @@ struct netdevsim { bool bpf_tc_non_bound_accept; bool bpf_xdpdrv_accept; bool bpf_xdpoffload_accept; + + bool bpf_map_accept; + struct list_head bpf_bound_maps; }; extern struct dentry *nsim_ddir; |