summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-01-11 20:29:06 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-14 23:36:29 +0100
commitbd475643d74e8ed78bfd36d941053b0e45974e8e (patch)
tree30fdfb7335e61f5d34c864f2abce9bf74f0f89ad /include/linux/bpf.h
parent9328e0d1bc09e96bd7dc85374f5c2a1e0e04e539 (diff)
downloadlinux-bd475643d74e8ed78bfd36d941053b0e45974e8e.tar.gz
linux-bd475643d74e8ed78bfd36d941053b0e45974e8e.tar.bz2
linux-bd475643d74e8ed78bfd36d941053b0e45974e8e.zip
bpf: add helper for copying attrs to struct bpf_map
All map types reimplement the field-by-field copy of union bpf_attr members into struct bpf_map. Add a helper to perform this operation. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 263598619f90..c60ddfb34d41 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -378,6 +378,7 @@ void bpf_map_put(struct bpf_map *map);
int bpf_map_precharge_memlock(u32 pages);
void *bpf_map_area_alloc(size_t size, int numa_node);
void bpf_map_area_free(void *base);
+void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
extern int sysctl_unprivileged_bpf_disabled;