| Function report | 
| Source Code: kernel\bpf\map_in_map.c | Create Date:2022-07-28 13:13:46 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:bpf_map_meta_alloc
Proto:struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd)
Type:struct bpf_map
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| int | inner_map_ufd | 
| 15 | f = fdget(inner_map_ufd) | 
| 16 | inner_map = error is returned, fd is released.* On success caller should complete fd access with matching fdput() | 
| 23 | If map_type == BPF_MAP_TYPE_PROG_ARRAY || map_type == BPF_MAP_TYPE_CGROUP_STORAGE || map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE Then | 
| 27 | Return ERR_PTR( - Operation is not supported ) | 
| 31 | If inner_map_meta Then | 
| 36 | If map_value_has_spin_lock(inner_map) Then | 
| 38 | Return ERR_PTR( - Operation is not supported ) | 
| 41 | inner_map_meta_size = size of inner_map_meta | 
| 43 | If The first two cachelines with read-mostly members of which some * are also accessed in fast-path (e.g. ops, max_entries). == array_map_ops Then inner_map_meta_size = sizeof(structbpf_array) | 
| 46 | inner_map_meta = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 47 | If Not inner_map_meta Then | 
| 54 | value_size = value_size | 
| 56 | max_entries = max_entries | 
| 62 | unpriv_array = unpriv_array | 
| 63 | ({ | 
| 63 | __mptr = inner_map_meta | 
| 63 | Do | 
| 63 | When 0 cycle | 
| 63 | __mptr - __builtin_offsetof(structbpf_array, map) | 
| 63 | ({})->index_mask = ({ | 
| 64 | })->index_mask | 
| 68 | Return inner_map_meta | 
| Name | Describe | 
|---|---|
| array_of_map_alloc | |
| htab_of_map_alloc | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |