summaryrefslogtreecommitdiff
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2017-09-27 14:37:53 -0700
committerDavid S. Miller <davem@davemloft.net>2017-09-29 06:17:05 +0100
commitad5b177bd73f5107d97c36f56395c4281fb6f089 (patch)
tree90f03bf2a9ce3370d0979524a10784bce7714042 /include/linux/bpf.h
parentcb4d2b3f03d8eed90be3a194e5b54b734ec4bbe9 (diff)
downloadlinux-ad5b177bd73f5107d97c36f56395c4281fb6f089.tar.gz
linux-ad5b177bd73f5107d97c36f56395c4281fb6f089.tar.xz
bpf: Add map_name to bpf_map_info
This patch allows userspace to specify a name for a map during BPF_MAP_CREATE. The map's name can later be exported to user space via BPF_OBJ_GET_INFO_BY_FD. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Alexei Starovoitov <ast@fb.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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 33ccc474fb04..252f4bc9eb25 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -56,6 +56,7 @@ struct bpf_map {
struct work_struct work;
atomic_t usercnt;
struct bpf_map *inner_map_meta;
+ u8 name[BPF_OBJ_NAME_LEN];
};
/* function argument constraints */