aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-01-17 22:13:28 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-18 16:54:25 -0500
commit52775b33bb5072fbc07b02c0cf4fe8da1f7ee7cd (patch)
tree86ead032dc8cbdf4488b9719b9ef41e25e8bb189 /include
parent7a0ef6939548b9eb74bf464daf55ad68a23602a2 (diff)
bpf: offload: report device information about offloaded maps
Tell user space about device on which the map was created. Unfortunate reality of user ABI makes sharing this code with program offload difficult but the information is the same. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h2
-rw-r--r--include/uapi/linux/bpf.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 025b1c2f8053..66df387106de 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -586,6 +586,8 @@ void bpf_prog_offload_destroy(struct bpf_prog *prog);
586int bpf_prog_offload_info_fill(struct bpf_prog_info *info, 586int bpf_prog_offload_info_fill(struct bpf_prog_info *info,
587 struct bpf_prog *prog); 587 struct bpf_prog *prog);
588 588
589int bpf_map_offload_info_fill(struct bpf_map_info *info, struct bpf_map *map);
590
589int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value); 591int bpf_map_offload_lookup_elem(struct bpf_map *map, void *key, void *value);
590int bpf_map_offload_update_elem(struct bpf_map *map, 592int bpf_map_offload_update_elem(struct bpf_map *map,
591 void *key, void *value, u64 flags); 593 void *key, void *value, u64 flags);
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 74dc4dc98681..406c19d6016b 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -938,6 +938,9 @@ struct bpf_map_info {
938 __u32 max_entries; 938 __u32 max_entries;
939 __u32 map_flags; 939 __u32 map_flags;
940 char name[BPF_OBJ_NAME_LEN]; 940 char name[BPF_OBJ_NAME_LEN];
941 __u32 ifindex;
942 __u64 netns_dev;
943 __u64 netns_ino;
941} __attribute__((aligned(8))); 944} __attribute__((aligned(8)));
942 945
943/* User bpf_sock_ops struct to access socket values and specify request ops 946/* User bpf_sock_ops struct to access socket values and specify request ops