diff options
author | John Fastabend <john.fastabend@gmail.com> | 2017-07-17 09:29:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-17 09:48:06 -0700 |
commit | 97f91a7cf04ff605845c20948b8a80e54cbd3376 (patch) | |
tree | 0d5c2872667d06e7e2a7f83253505c5170a0258b /include/linux/bpf.h | |
parent | 546ac1ffb70d25b56c1126940e5ec639c4dd7413 (diff) | |
download | linux-stable-97f91a7cf04ff605845c20948b8a80e54cbd3376.tar.gz linux-stable-97f91a7cf04ff605845c20948b8a80e54cbd3376.tar.bz2 linux-stable-97f91a7cf04ff605845c20948b8a80e54cbd3376.zip |
bpf: add bpf_redirect_map helper routine
BPF programs can use the devmap with a bpf_redirect_map() helper
routine to forward packets to netdevice in map.
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index b69e7a5869ff..d0d3281ac678 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -379,4 +379,7 @@ extern const struct bpf_func_proto bpf_get_stackid_proto; void bpf_user_rnd_init_once(void); u64 bpf_user_rnd_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5); +/* Map specifics */ +struct net_device *__dev_map_lookup_elem(struct bpf_map *map, u32 key); + #endif /* _LINUX_BPF_H */ |