125763b3cSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 256f668dfSMartin KaFai Lau /* Copyright (c) 2017 Facebook 356f668dfSMartin KaFai Lau */ 456f668dfSMartin KaFai Lau #ifndef __MAP_IN_MAP_H__ 556f668dfSMartin KaFai Lau #define __MAP_IN_MAP_H__ 656f668dfSMartin KaFai Lau 756f668dfSMartin KaFai Lau #include <linux/types.h> 856f668dfSMartin KaFai Lau 956f668dfSMartin KaFai Lau struct file; 1056f668dfSMartin KaFai Lau struct bpf_map; 1156f668dfSMartin KaFai Lau 1256f668dfSMartin KaFai Lau struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd); 1356f668dfSMartin KaFai Lau void bpf_map_meta_free(struct bpf_map *map_meta); 1456f668dfSMartin KaFai Lau void *bpf_map_fd_get_ptr(struct bpf_map *map, struct file *map_file, 1556f668dfSMartin KaFai Lau int ufd); 16*1c40ec6bSHou Tao void bpf_map_fd_put_ptr(struct bpf_map *map, void *ptr, bool need_defer); 1714dc6f04SMartin KaFai Lau u32 bpf_map_fd_sys_lookup_elem(void *ptr); 1856f668dfSMartin KaFai Lau 1956f668dfSMartin KaFai Lau #endif 20