| Function report | 
| Source Code: kernel\bpf\queue_stack_maps.c | Create Date:2022-07-28 13:14:47 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:queue_stack_map_alloc
Proto:static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr)
Type:struct bpf_map
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| union bpf_attr * | attr | 
| 70 | struct bpf_map_memory mem = {0} | 
| 74 | size = max number of entries in a map + 1 | 
| 75 | cost = queue_size = size of qs + size * size of value in bytes | 
| 77 | ret = bpf_map_charge_init( & mem, cost) | 
| 81 | qs = bpf_map_area_alloc(queue_size, numa_node) | 
| 82 | If Not qs Then | 
| 83 | bpf_map_charge_finish( & mem) | 
| 89 | bpf_map_init_from_attr( & map, attr) | 
| 91 | bpf_map_charge_move( & memory, & mem) | 
| 92 | max_entries + 1 = size | 
| 94 | raw_spin_lock_init( & lock) | 
| 96 | Return map | 
| 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 |