summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorJohn Fastabend2017-07-17 18:28:56 +0200
committerDavid S. Miller2017-07-17 18:48:06 +0200
commit546ac1ffb70d25b56c1126940e5ec639c4dd7413 (patch)
treeee72376133d162b6bacd60cc6c061458a76be88c /include/uapi/linux/bpf.h
parentxdp: add trace event for xdp redirect (diff)
downloadkernel-qcow2-linux-546ac1ffb70d25b56c1126940e5ec639c4dd7413.tar.gz
kernel-qcow2-linux-546ac1ffb70d25b56c1126940e5ec639c4dd7413.tar.xz
kernel-qcow2-linux-546ac1ffb70d25b56c1126940e5ec639c4dd7413.zip
bpf: add devmap, a map for storing net device references
Device map (devmap) is a BPF map, primarily useful for networking applications, that uses a key to lookup a reference to a netdevice. The map provides a clean way for BPF programs to build virtual port to physical port maps. Additionally, it provides a scoping function for the redirect action itself allowing multiple optimizations. Future patches will leverage the map to provide batching at the XDP layer. Another optimization/feature, that is not yet implemented, would be to support multiple netdevices per key to support efficient multicast and broadcast support. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 4dbb7a3f4677..ecbb0e7e15bc 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -104,6 +104,7 @@ enum bpf_map_type {
BPF_MAP_TYPE_LPM_TRIE,
BPF_MAP_TYPE_ARRAY_OF_MAPS,
BPF_MAP_TYPE_HASH_OF_MAPS,
+ BPF_MAP_TYPE_DEVMAP,
};
enum bpf_prog_type {