Thomas Gleixner | 25763b3 | 2019-05-28 10:10:09 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Martin KaFai Lau | 56f668d | 2017-03-22 10:00:33 -0700 | [diff] [blame] | 2 | /* Copyright (c) 2017 Facebook |
Martin KaFai Lau | 56f668d | 2017-03-22 10:00:33 -0700 | [diff] [blame] | 3 | */ |
| 4 | #ifndef __MAP_IN_MAP_H__ |
| 5 | #define __MAP_IN_MAP_H__ |
| 6 | |
| 7 | #include <linux/types.h> |
| 8 | |
| 9 | struct file; |
| 10 | struct bpf_map; |
| 11 | |
| 12 | struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd); |
| 13 | void bpf_map_meta_free(struct bpf_map *map_meta); |
| 14 | bool bpf_map_meta_equal(const struct bpf_map *meta0, |
| 15 | const struct bpf_map *meta1); |
| 16 | void *bpf_map_fd_get_ptr(struct bpf_map *map, struct file *map_file, |
| 17 | int ufd); |
| 18 | void bpf_map_fd_put_ptr(void *ptr); |
Martin KaFai Lau | 14dc6f0 | 2017-06-27 23:08:34 -0700 | [diff] [blame] | 19 | u32 bpf_map_fd_sys_lookup_elem(void *ptr); |
Martin KaFai Lau | 56f668d | 2017-03-22 10:00:33 -0700 | [diff] [blame] | 20 | |
| 21 | #endif |